You are not logged in.

#1 2010-10-18 15:18:14

satishk
Member
Registered: 2010-10-18
Posts: 2

Problems in starting windows using qemu-kvm from arch

Hello,

I am facing problems in launching windows XP & 7 using qemu-kvm / qemu from arch. I have arch 2010.05 installed (kernel 2.6.33.4) which has kvm.ko, intel & amd modules. System is Intel Core 2 Duo 3.0GHz. Windows XP is installed on partition 0 (real) and i am trying to start windows from that real partition using qemu-kvm.

I installed qemu-kvm using pacman -S qemu-kvm. I am running modprobe kvm and modprobe kvm-intel. Also, i have added username to kvm group.

Command -

qemu-kvm /dev/sda - I have grub menu.lst which gives me list and i am selecting windows to boot but windows does not start. I can see startup but then fails.

qemu-kvm /dev/sda1 - sda1 has windows. With this qemu-kvm just hangs at Booting from Hard-disk...

qemu-kvm -no-kvm /dev/sda - Selecting windows but this time get Windows XP activation error however i can boot same windows XP directly without any error.

For Windows 7 - I have another HDD with Windows 7 installed on partition 0 and Arch. Everytime when i try to start Windows 7 using qemu-kvm (with kvm or without kvm) it gives blue screen with STOP: 0x... If i start Windows 7 directly it works fine.

Also, i downloaded kernel 2.6.35 and built with KVM but still facing same problems. I also tried with qemu.

Can anyone help me in resolving this issue? I want to qemu-kvm Windows from real partition. Let me know if it is not possible.
Am i missing any installation/configuration steps?

I searched on google and on arch forum/wiki but was not able to resolve this issue. Let me know if you need more details.

Thank you,
Satish.

Last edited by satishk (2010-10-18 15:21:06)

Offline

#2 2010-10-21 13:50:56

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Problems in starting windows using qemu-kvm from arch

You've run into a known windows bug (i guess MS calls it a feature).

During installation of windows the driver for the harddrive controller is kinda hardcoded.
On boot windows can change most drivers, but NOT the driver for HDD.
(this is also the reason why windows refuses to boot if you transfer the HDD to another system with a different motherboard).

All VM software has this problem, but there is a workaround.

The workaround is to create 2 hardware profiles for windows, 1 for direct boot and 1 for virtual boot.
In the virtual boot you replace the driver for the HDD controller with the most generic driver for HDD you can find (usually IDE).
I remember having to do this a few years ago to get windows xp running both physical and in VM using vmware.
As this problem is similar for all VM software, VMWare site should give you enough details to apply this workaround.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2010-10-22 13:24:29

satishk
Member
Registered: 2010-10-18
Posts: 2

Re: Problems in starting windows using qemu-kvm from arch

Hi,

Thanks a lot for your suggestion.
I will search on vmware site for more details. Do i need to create two hardware profiles in Windows or Linux?

Also, can you please comments on following questions -

1. Can i run qemu-kvm from linux kernel with only command support. No desktop environment installed (X11)? If yes, what is the procedure?

2. If i restart/shutdown from quest OS that is windows in my case, is it possible to restart/shutdown the complete system (i.e. host OS
too)?

3. Whether Windows would be able to detect USB drivers and other devices by default or i need to do anything special in qemu-kvm?

Thank you for your help,
Satish.

Offline

#4 2010-10-22 14:08:09

linux-ka
Member
From: ADL
Registered: 2010-05-07
Posts: 232

Re: Problems in starting windows using qemu-kvm from arch

Hm, that's rather new to me. You can run kvm from grub boot menu? I thought it's simply a VM to use under X11. win7 runs fine under these conditions.

Offline

#5 2010-10-22 18:21:39

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Problems in starting windows using qemu-kvm from arch

satishk wrote:

Hi,
Do i need to create two hardware profiles in Windows or Linux?

the hardware profiles are only needed for windows , linux guest doesn't need it (unless you have compiled your own kernel without more then 1 HDD controller..  specifically for the guest)

satishk wrote:

1. Can i run qemu-kvm from linux kernel with only command support. No desktop environment installed (X11)? If yes, what is the procedure?

qemu-KVM uses SDL, NOT X11 .
added : SDL can be installed seperately, it doesn't require X11 .

you can run qemu-kvm without SDL by using a special startup parameter, -nodisplay
you have to connect with a serial connection to get to the console of the VM.

satishk wrote:

2. If i restart/shutdown from quest OS that is windows in my case, is it possible to restart/shutdown the complete system (i.e. host OS
too)?

you can do that by using a bash script to start the VM, that script can also be used to stop the host.

satishk wrote:

3. Whether Windows would be able to detect USB drivers and other devices by default or i need to do anything special in qemu-kvm?

USB devices are normally detected, although you have to test how well they work.
You may have to use udev rules to prevent the host from using those devices, they can't be used by both host and guest at the same time.

Network cards will not be detected, but you can link a physical network device with qemu-kvm virtual network devices.
search for qemu documentation, it also applies to qemu-kvm.

Last edited by Lone_Wolf (2010-10-22 18:35:13)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2010-11-04 10:30:18

maxmat
Member
Registered: 2010-11-04
Posts: 2

Re: Problems in starting windows using qemu-kvm from arch

Hi,

Regarding question n°1 it is possible with GNU/Linux guests with -nodisplay option as already explained. Using screen application is here really useful to attach serial output.
For MS Windows guest as these systems have always a desktop it should also be possible if you can attach your video card to this guest using iommu which permit to "remove" some card from host to attach it directly some guest. Unfortunately really few motherboards are iommu-able (for my understanding).

kindly regards

mat

Offline

Board footer

Powered by FluxBB