problem migrating vmware vm > pve kvm on lmv, disk not bootable.

m.ardito

Famous Member
Feb 17, 2010
1,473
18
103
Torino, Italy
[solved] problem migrating vmware vm > pve kvm on lmv, disk not bootable.

Hi, i was testing the migration
- from a ubuntu vm we have on vmware on a dedicated linux server
- to a kvm vm on our test pve server
- wishing to use lvm storage for that disk

i found this wiki page
http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE

whick contains the section "VMware to Proxmox VE (KVM)"
the guide it is really about win2003 vmdk but think it should apply to any guest os

1) first i copied the vmdk on the vmware server, using vmware-vdiskmanager:
Code:
vmware-vdiskmanager -r  ubuntu.vmdk -t 0  ubuntu.copy.vmdk
2) then transferred that vmdk to our test pve server with rsync

3) then followed what guide suggested:
- created a new vm without starting it (VMID 115),
- assigned disk storage to the vm on a pve "test" lvm unit, slightly bigger than the vmdk file
- pve created a /dev/test_vg/vm-115-disk-1 lv
- used dd to copy the vmdk to the lvm disk:
Code:
 dd if=ubuntu.copy.vmdk of=/dev/test_vg/vm-115-disk-1
everything went fine.

4) the vm starts but on the vnc console i can see:
Code:
booting from hard disk...
boot failed: not a bootable disk
5) vm hard disk is IDE and SCSI does not boot (pve 2.6.18)

...so, what is wrong? and/or how to debug the problem?

Thanks, Marco
 
Last edited:
Solved!
this was the wrong step
Code:
vmware-vdiskmanager -r  ubuntu.vmdk -t 0  ubuntu.copy.vmdk
because the "-t 0" parameter implies that you are making a copy as "single growable virtual disk", see:

Code:
Disk types:
      0                   : single growable virtual disk
      1                   : growable virtual disk split in 2GB files
      2                   : preallocated virtual disk
      3                   : preallocated virtual disk split in 2GB files
      4                   : preallocated ESX-type virtual disk
      5                   : compressed disk optimized for streaming
tried using "-t 2" and it worked. only the vmware conversion utility created a ubuntu.copy.vmdk file that is really a "txt" config file, and another file called ubuntu.copy-flat.vmdk, which is the real "preallocated" disk.

i guess that the real problem was that, with "-t 0" i saw a 4.9GB vmdk file, and created a 5GB LVM logical volume. After using "-t 2" the ubuntu.copy-flat.vmdk file was over 6.4 GB (i could have noticed this first from the vmware guest os...), so i extended the LV to 8GB with

Code:
lvextend -L8G /dev/test_vg/vm-115-disk-1
then used dd to copy the new vmdk, and the pve vm worked at first boot...

FYI & HTH...

Marco
 
Hi, i was testing the migration
- from a ubuntu vm we have on vmware on a dedicated linux server
- to a kvm vm on our test pve server
- wishing to use lvm storage for that disk

i found this wiki page
http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE

whick contains the section "VMware to Proxmox VE (KVM)"
the guide it is really about win2003 vmdk but think it should apply to any guest os

1) first i copied the vmdk on the vmware server, using vmware-vdiskmanager:
Code:
vmware-vdiskmanager -r  ubuntu.vmdk -t 0  ubuntu.copy.vmdk
2) then transferred that vmdk to our test pve server with rsync

3) then followed what guide suggested:
- created a new vm without starting it (VMID 115),
- assigned disk storage to the vm on a pve "test" lvm unit, slightly bigger than the vmdk file
- pve created a /dev/test_vg/vm-115-disk-1 lv
- used dd to copy the vmdk to the lvm disk:
Code:
 dd if=ubuntu.copy.vmdk of=/dev/test_vg/vm-115-disk-1
everything went fine.

4) the vm starts but on the vnc console i can see:
Code:
booting from hard disk...
boot failed: not a bootable disk
5) vm hard disk is IDE and SCSI does not boot (pve 2.6.18)

...so, what is wrong? and/or how to debug the problem?

Thanks, Marco
Hi Marco,
perhaps it's a problem with the boot-loader, because before was the disk sda now hda...
First you can try to boot the VM with a live-distro like grml to see if all content on the disk and repair the bootloader (upload disk-iso, select this iso as cdrom and make the cdrom as boot-device).
Or you use a newer kernel (2.6.24) and use the disk as scsi-disk.

Udo
 
Thanks Udo, as you can see it was another (much simpler) problem, now i solved it.
If it failed, i was going to boot with a livecd to examine the lvm disk from the vm perspective, muche as you suggested.

Thanks, Marco