New Question
0

VM converted from vhdx to qcow2 not booting

asked 2019-03-31 15:05:55 +0300

ronynov gravatar image

updated 2019-04-01 11:52:11 +0300

Hi everyone, I am trying to migrate some VM from Hyper-V 2012 R2 to openstack. Most VM are gen2 and EFI enabled. Most of my VM are windows server 2012 R2. Below are the steps i followed for gen2: - Install VirtIO (all of them) drivers while VM is booted on the Hyper-V host - Converted the vhdx to qcow2 using cloudbase qemu-img - installed OVMF on compute nodes -Imported the qcow2 file into glance and set hwfirmwaretype=uefi - created instance from image FAILURE: windows not booting and getting message "your pc ran into a problem and needs to restart. We're just collecting some error info and then we wil restart for you"

I managed to boot windows with the same image by setting "hwdiskbus=ide" however i can't attach any secondary volume to the instance since it will only attach as /dev/hda/ instead of "/dev/vdb" and windows guest cannot see it.

Anyone has an idea on what i am doing wrong and how i can fix this. Thank you in advance. Regards RZ

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2019-04-04 10:59:33 +0300

ronynov gravatar image

Hi Lucian, thank you for your answer. I ended up setting a KVM host outside of openstack and booted my converted VM as IDE. Once the VM is booted i added a second disk as virtio disk this time, which triggered Windows to somehow "correctly" instal the viostor and vioscsi drivers knowing that i have already installed these drivers using pnputil while the VM was on hyper-v.. I then shutdown the VM changed the bootable disk to VirtIO and rebooted, and windows guest booted normaly, which allowed me to move it to Openstack. It is a bit longer process but i can move forward. I hope this will help anyone in the future.

Regards, Rony

edit flag offensive delete link more

Comments

Virtio drivers can even be installed offline using dism.exe. We have some scripts that prepare Windows images which may serve as an example: https://github.com/cloudbase/windows-openstack-imaging-tools/blob/master/Examples/create-windows-cloud-image.ps1

lpetrut gravatar imagelpetrut ( 2019-04-05 11:05:25 +0300 )edit
0

answered 2019-04-04 10:43:50 +0300

lpetrut gravatar image

updated 2019-04-04 10:47:53 +0300

For what is worth, you can use Hyper-V compute nodes with OpenStack. I assume you're using KVM now, since you've mentioned virtio.

Anyway, the fact that the instance boots when using IDE makes me think there's something wrong with the virtio drivers. Double check that those are properly installed (especially viostor/vioscsi). If so, you can try a different version.

however i can't attach any secondary volume to the instance since it will only attach as /dev/hda/ instead of "/dev/vdb" and windows guest cannot see it.

I think that's because your guest cannot use virtio block devices, not because of the device path.

Here are some more ideas:

  • check the libvirt domain xml by doing "virsh dumpxml <vm_name>".

  • use bcdedit to enable boot logging

Feel free to post any meaningful logs (but please use pastebin or similar services).

Regards, Lucian

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-03-31 15:05:55 +0300

Seen: 33 times

Last updated: Apr 04