2

We have an old rack server with Windows Server 2008 (not R2)

Our goal is to virtualize it and move into new hardware.

The new PC has a Debian10 as a main OS with KVM enabled.

I have used disk2vhd (by MS) to convert whole windows system into an image.

The problem is that once i set up virtual machine in KVM, Windows will BSOD at boot time.
I have started investigating what could be the cause of this and it turned out, that this vhd required IDE emulation.

I found this out by taking vhd into another Windows machine where i have VirtualBox installed. At first it would BSOD as well, but i noticed VirtualBox used a SATA controller. Removed it, added IDE controller, assigned the vhd disk and it worked. System booted normaly.

I then tried to find the way to enable IDE controller inside KVM but with no success.
There is no IDE selection in the controllers dropdown.
Some suggested changing virtual machine configuration file and write "bus=ide" instead of what was there, but it didnt work either.

So i need some help figuring this all out. What other options do i have? How can i force KVM to use IDE for this machine?

I am not even sure why is it requiring IDE controller. From what i know it uses SAS HDDs, so it should work as SCSI drives(?) but settings SCSI as the controller inside KVM does nothing to solve the issue.

2 Answers 2

0

Don't panic - there is a way around this problem, but it's a bit convoluted.

Install virtualbox, set up a temporary VM there with the guest boot disk you want to move to KVM, on a IDE controller, and with an additional small blank disk image on an additional sata controller.

It should boot ok (if you have the right kind of contoller configured, YMMV) because windows expects there to be a controller of that kind present, and is bluescreening because all other disk controller drivers are not enabled (deliberately disabled, in fact).

Then, it will notice that there's now also a SATA drive and controller present, and it will automatically enable those with some generic driver as well. Shutdown and reboot a couple times, ensure it sees both virtual disks. No need to format the dummy drive).

You can now shutdown and move the boot disk image you want to 'save' between the two controllers. Reboot, and you'll find that Windows will continue to boot it anyway (guess they never thought that would be possible - else they'd have added measures to make it fail, obviously).

Finally, once you're happy, shutdown the VM export/convert the disk image (that now boots on a SATA controller) to the format that KVM needs (qcow2), and set it up there: It will work.

KVM doesn't have a virtual IDE controller, whereas Hyper-V does and defaults to it. VirtualBox has both, and like KVM defaults to SATA. So (modulo some games converting images - best done with qemu-img, which seems to properly support everything), you can use VirtualBox on a temperary basis to do this windows-bsod-7B-on-boot-avoidance dance.

I think some VMWare VM's default to SCSI, which everyone supports, to varying extents. I have been able to move such a guest windows vm, without using VMWare, but I can't recall which combination of controllers finally worked.

You always want to end up running Windows-hosted VMs on Hyper-V where windows-hosting is required, and all others on KVM, ideally with the 'virtio' type of disk controller (using the signed drivers).

Old windows on Hyper-V never can have 'enhanced modes' working - there are no guest drivers (you can on KVM, because there are - even signed ones).

But if you start the VM from vmconnect, you get a guest-driver-like video experience (can have larger resolutions by just setting them within the guest, for instance). And, as a bonus, software that detects and spits the dummy for RDP connections don't play up. If you start and connect to a running VM with vmconnect, it registers as a RDP connection to the guest, with all of the consequences that entails.

1
  • Thank you very much for an in depth instructions. Much have changed since i asked the question and we switched to ESXi with new installations. I hope your information will help others seeking to solve their problem.
    – Deerjon
    Commented Mar 10, 2023 at 6:19
2

Hi I came across exactly same problem. It seems the newly added VM you have one chance (only) to change the Chipset. The Q35 chipset seemingly not support any IDE bus. In order to boot Windows XP or unpatched Windows 7 you have to use the old i440fx chipset.

There are better explainations in this serverfault question How can I change qemu KVM machine architecture

I know it is kinda late and hopefully it could help other people. (This question seemingly is the only one that mentions Debian 10)

1
  • 1
    I had same issue in Alma Linux 8.4. Your solution solved my issue. Commented Oct 30, 2021 at 12:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .