10 KVM - Migration

 

 

 


Esxi to KVM

 

# cp image out

scp vm.vmdk kvm-host:/vm/kvm/upload

# from LSI SAS disk controllers to virtio

add the modules and recreate the initramfs

/etc/initramfs-tools/modules

virtio
virtio-blk     # This is the virtio block-device driver
virtio-ring
virtio-pci
virtio-net

 

 


Migrating a virtual machine from KVM to ESXi

 

# 舊版 qemu-img

qemu-img convert -p -i DiskImage.img -O vmdk DiskImage.vmdk

"compat6"
# Create a VMDK version 6 image (instead of version 4)
# The -o compat6 ensures that we do not split into 2GB disk chunks.

vmkfstools -i /vmfs/volumes/nfs1/DiskImage.vmdk -d thin /vmfs/volumes/datastore1/MyServer/DiskImage.vmdk

# 新版 qemu-img

# By default qemu-img will use adapter_type=ide
qemu-img convert -f qcow2 -O vmdk -o adapter_type=lsilogic,compat6 disk.qcow2 disk.vmdk

* qemu-img  | grep version # 要 version 2 才 support

Help

qemu-img convert -O vmdk -o ?

 

 

Creative Commons license icon Creative Commons license icon