Migrate from esxi 4.1For *nix OS is more simple than Windows. This example is for linux (Ubuntu) OS. Remove vmware-tools from guest OS. #vmware-unistall-tools.pl Create virtual machine flat disk backup on esxi hypervisor. E.g. by ghettoVCB script: #ghettoVCB.sh -f vmltemp -c vmspec where vmltemp Aserver and vmspec/Aserver VM_BACKUP_VOLUME=/vmfs/volumes/Backup DISK_BACKUP_FORMAT=zeroedthick VM_BACKUP_ROTATION_COUNT=1 POWER_VM_DOWN_BEFORE_BACKUP=0 ENABLE_HARD_POWER_OFF=0 ITER_TO_WAIT_SHUTDOWN=4 POWER_DOWN_TIMEOUT=5 SNAPSHOT_TIMEOUT=15 ENABLE_COMPRESSION=0 ADAPTER_FORMAT=lsilogic VM_SNAPSHOT_MEMORY=0 VM_SNAPSHOT_QUIESCE=1 VMDK_FILES_TO_BACKUP=all EMAIL_LOG=0 Prepare KVM storage for copy virtual flat disk. # lvcreate -L 20G -n vmware kvm2 # mkdir /vmware # mkfs.ext4 /dev/kvm2/vmware # mount /dev/kvm2/vmware /vmware Copy virtual flat disk to local disk. # cd /vmware/ # mkdir Aserver # cd Aserver/ # scp root@EsxiHypervisor.my.org:/vmfs/volumes/Backup/Aserver/Aserver-2012-09-02_12-00-01/Aserver_1-flat.vmdk ./ To verify it is a flat disk: #file Aserver_1-flat.vmdk /vmware/Aserver/Aserver_1-flat.vmdk: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0x83, active, starthead 1, startsector 63, 15952482 sectors; partition 2: ID=0x5, starthead 0, startsector 15952545, 819315 sectors, code offset 0x48 For virtual machine file based: #qemu-img convert Aserver_1-flat.vmdk -O qcow2 Aserver_1-flat.qcow2 For virtual machine LVM based: #ls -l Aserver_1-flat.vmdk -rw------- 1 root root 8589934592 Sep 3 13:49 /vmware/Aserver/Aserver_1-flat.vmdk #lvcreate -L 8589934592B -n aserver iscsi2 #dd if=Aserver_1-flat.vmdk | pv -s 8G | dd of=/dev/iscsi2/aserver Define new virtual machine using this virtual disk (qcow2 or LVM) #virsh dumpxml aserver <domain type='kvm'> <name>aserver</name> <uuid>e0261d4a-ac1e-0dba-1aec-8b945102b1cf</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-1.0'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/iscsi2/aserver'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='bridge'> <mac address='12:14:10:1b:11:16'/> <source bridge='br2'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> </devices> </domain> โ Hypervisor |