VM doesn't boot after qemu-img convert from VMDK to RAW/QCOW2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm trying to migrate a Windows Server (2016/2019) VM from vSphere/VMWare to OpenStack (KVM-QEMU). I followed these instructions: https:/
After downloading the VMDK file vCenter/vSphere in an Ubuntu Server with GUI installed (a server used for this purpose), I used this command:
```
~# qemu-img convert -O qcow2 win2016-
~# qemu-img convert -O raw win2016-
```
I tried with both formats, RAW and QCOW2, and after importing into my controller node that image with the next command:
```
~# openstack image create --insecure --container-format bare "win2016-raw" --disk-format raw --file /tmp/win2016.qcow2
~# openstack image create --insecure --container-format bare "win2016-qcow2" --disk-format qcow2 --file /tmp/win2016.qcow2
```
Finally, I tested creating a new instance and I obtain this error message:
Booting from Hard Disk...
Boot failed: not a bootable disk
No bootable device.
(Exactly like this issue: https:/
After googling a lot and a couple of days, I tried another way, to change the chipset of the image from i440fx to q35, also, enabling the boot menu and secure boot, like in this link: https:/
Then, my instance continues without booting, with a different message but with the same result, something link this: https:/
Also, I explored the possibility of the partition table being corrupted and I tried to repair it with `gdisk` command; with the same result. So, which other way can I test?
Context, I have my services of OpenStack running over a Ubuntu Servers cluster with 3 nodes and 1 controller, deployed with kolla-ansible over docker to have high availability, and CEPH as storage, configured with rbd (rados) to work with Glance/Cinder.
I have tested different Windows Server editions from scratch, installing the S.O. locally with KVM and VirtManager, then uploading the QCOW2 disk to OpenStack, and works fine, and other Linux distributions. But this specific scenario migrating with Windows Server from vSphere to OpenStack crashes on that point, with the bootable device.
Thank you for reading and for your time.
Changed in nova: | |
status: | New → Invalid |
this issue is outside the scope of nova.
# qemu-img convert -O qcow2 win2016- copy-flat. vmdk win2016.qcow2
this should work provided the vmdk is not referencing a backing file or that file is locally accessabvle
qemu-img convert -O raw win2016- copy-flat. vmdk win2016.qcow
will write a raw image over the qcow created in the previous step
if you did it in that order then you would have cupproted the file effectively
this should be
qemu-img convert -O raw win2016- copy-flat. vmdk win2016.img
this would be the correct way to upload the raw file
~# openstack image create --insecure --container-format bare "win2016-raw" --disk-format raw --file /tmp/win2016.img
and this would correctly upload the qcow2
~# openstack image create --insecure --container-format bare "win2016-qcow2" --disk-format qcow2 --file /tmp/win2016.qcow
assuming that you didn't acidently override the file and this was just a typo in the bug report
what i would advice checking is how was the VM created in vshpere.
for example /platform9. com/docs/ openstack/ tutorials- migrate- windows- vm-vmware- kvm
https:/
assumes the VM is using scsi
to use the same with libvirt/kvm you would have to set hw_disk_bus=scsi as an image property.
we default to virtio-blk and its possible the windows instance you are using do not have virtio drivers if they were installed in vsphere with a scsi bus.
you might also want to set os_type=windows in the image
wether you use i440fx or q35 depend on what you are trying to achieve
if the vm was installed using secure boot then you will need uefi and that will force you to use q35 however I'm not sure if secure boot will cause issues since the nvram data is not going to be present.
changing form i440fx to q35 will not enable uefi by default you need to do that by setting type=uefi as an image property.
hw_firmware_
hw_firmware_ type=uefi requires hw_machine_type=q35 to be set on the image or set in the nova.conf as the default machine type
the default in kolla and nova is to use libvirt default which is the PC machine type.
so to summarise you probably need to set type=q35, hw_firmware_ type=uefi and hw_disk_bus=scsi
os_type=windows, hw_machine_
on the image if the vm was originally booted with uefi and SCSI disks on vmware.
you should also check the format fo the converted disk that you uploaded to make sure that they are the format you expect and that you did not overwrite the qcow with a raw file.
you should also check your source image to make sure that it is not a delta disk and if it is that you cal locally access the backing file of the vmdk when you are doing the conversion.
beyond that i don't think there is much more the nova project can do here as this is not a nova probelm.