Windows 7 fails to install on KVM with qemu
Posted
by kief_morris
on Super User
See other posts from Super User
or by kief_morris
Published on 2009-11-18T14:44:35Z
Indexed on
2010/06/12
19:23 UTC
Read the original article
Hit count: 464
I'm trying to install Windows 7 on a virtual machine on my 64 bit Ubuntu Karmic box. I get to the point of selecting my language settings and clicking 'install now', but a short while later I get a blue screen of death.
I've tried a few variations, including using the 32 bit (fails very quickly). The virt-install command I've tried includes this:
sudo virt-install --connect qemu:///system -n ksm-win7 -r 2048 \
--disk path=/home/kief/VM-Images/ksm-win7.qcow2,size=50 \
-c /var/Software/Windows7/Full/64bit/SW_DVD5_SA_Win_Ent_7_64BIT_English_Full_MLF_X15-70749.ISO \
--vnc --os-type windows --os-variant vista --hvm
The limited info I could find suggested that 'vista' should work as the --os-variant, I haven't found any values specific to windows 7.
Here's my blue screen:
I've found very little by Googling, so I'm guessing this isn't a case of KVM simply not supporting Windows 7.
Thanks for any help.
Update:
I have been able to successfully create a Windows 7 VM using the graphical "Virtual Machine Manager" app, although I don't really understand the cause of the problem with the VM created with virt-install. Comparing the configuration files under /etc/libvirt/qemu provides some clues, although I don't know enough to interpret them properly. The interesting differences in the two VM configurations are:
--- win7-virt-install.xml
+++ win7-vmm.xml
-<domain type='qemu'>
+<domain type='kvm'>
@@ -21 +21 @@
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <emulator>/usr/bin/kvm</emulator>
@@ -23 +23 @@
- <source file='/home/kief/VM-Images/ksm-win7.qcow2'/>
+ <source file='/var/lib/libvirt/images/ksm-win7x64.img'/>
I'm not sure if this means the working VM is not using qemu at all, or if there is some other difference in the way it's used with kvm.
Update2:
So I've answered my own question (mostly) below. A KVM VM needs to use KVM's own CPU emulation rather than qemu's in order for me to get Windows 7 installed. I'm not sure whether there is something that can be done to get it working on a qemu-emulation CPU, or whether a newer version will support it. But at least it is possible to get it running on a KVM VM.
© Super User or respective owner