Migration of servers to Proxmox VE: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
(Apapted KVM part (new beta2 format))
(Added external links)
Line 51: Line 51:
Now you can manage resource settings on the Proxmox VE management interface.
Now you can manage resource settings on the Proxmox VE management interface.


=Physical server (or XEN or VMware or other) to Proxmox VE (Container)=
=Physical server (or XEN or VMware or other) to Proxmox VE OpenVZ Container=
tbd, see [http://wiki.openvz.org/Physical_to_container Physical_to_container]
External links:
*[http://howtoforge.com/how-to-convert-physical-systems-and-xen-vms-into-openvz-containers-debian-etch How To Convert Physical Systems And Xen VMs Into OpenVZ Containers]
*[http://wiki.openvz.org/Physical_to_container Physical_to_container]
[[Category: HOWTO]]
[[Category: HOWTO]]

Revision as of 22:22, 17 January 2009

Introduction

You can migrate existing servers to Proxmox VE.

Physical server to Proxmox VE (KVM)

There are free tools (like VMware Converter) available to migrate a physical host to VMware. So the first step is to migrate the physical server to a VMware image. The second step is to follow the howto "VMware to Proxmox VE (KVM)".

VMware to Proxmox VE (KVM)

This howto describes the migration of a Windows 2003 Server (or Windows XP) from VMware to Proxmox VE (KVM).

Prepare the Windows operating system

Before you begin make a copy of the VMware image.

Remove VMware tools

Start the Windows virtual machine on VMware and remove the VMware tools via the Windows control panel. Reboot.

Enable IDE in the registry

  • Start the Windows virtual machine on VMware and execute the mergeide.reg (see Microsoft KB article for details). Now the registry is changed that your Windows can boot from IDE, necessary for KVM.
  • Shutdown Windows.

Prepare the disk file

My disk file used for this howto: win2003.vmdk

  • Change your VMDK disk file with vmware-vdiskmanager.exe to a single growable file (vmware-vdiskmanager.exe is located in your VMware installation path, e.g. "C:\Program Files\VMware\VMware Server") - open a cmd and go to the directory where your vmdk disk files are.
"C:\Program Files\VMware\VMware Server\vmware-vdiskmanager" -r win2003.vmdk -t 0 win2003-pve.vmdk
  • Create a new KVM VM on Proxmox VE web interface and - do not start - take a look on the VMID (e.g. 102)
  • Copy the win2003-pve.vmdk to your Proxmox VE server into the following dir: /var/lib/vz/images/VMID (I used WinSCP as I worked on a Windows desktop)
  • Change the win2003-pve.vmdk file to qemu format:
qemu-img convert -f vmdk win2003-pve.vmdk -O qcow2 win2003-pve.qcow2

Adapt the new KVM Virtual Machine

  • Go to the hardware tab on the web interface and remove the default harddisk file
  • Add the migrated harddisk as IDE (for windows, only IDE works stable)
  • Start the new Virtual Machine via the management interface
  • First boot takes some time as some drives has to be loaded
  • Do not forget to install Paravirtualized_Network_Drivers_for_Windows
  • Finished!

For comments or problems please post to the Proxmox VE forum or to the mailing list

XEN to Proxmox VE (KVM)

XEN also uses qemu disk format, so it should work in the same manner as described under "VMware to Proxmox VE (KVM)".

Move OpenVZ containers to Proxmox VE

You can move existing OpenVZ containers (container=VE=VPS) with vzmigrate or vzdump:

  • Use vzmigrate offline migration to move your container to Proxmox VE
  • Use vzdump to restore from a backup

After you moved your container you need to add the following line to the corresponding config file (see /etc/vz/conf/xyz.conf):

nano /etc/vz/conf/xyz.conf

Add the following line:

ORIGIN_SAMPLE="pve.auto"

Now you can manage resource settings on the Proxmox VE management interface.

Physical server (or XEN or VMware or other) to Proxmox VE OpenVZ Container

External links: