LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 07-18-2019, 01:00 PM   #1
samweis2111
LQ Newbie
 
Registered: Dec 2005
Location: Sweden
Posts: 11

Rep: Reputation: 0
Win XP boot loop with qemu --enable-kvm


Hello,

I have an old Win XP VM that I occasionally need. It is managed by libvirt and virt-manager.
It no longer boots with kvm enabled. I guess the update from Debian stretch to buster broke something (I cannot tell for sure when it broke, because I rarely use it).

A little investigation revealed that I can start the VM manually from the command line with:
Code:
qemu-system-x86_64 -cpu qemu64 -m 3072 -drive file=./Win_XP.qcow2,format=qcow2
If I call it with --enable-kvm like so:
Code:
qemu-system-x86_64 -enable-kvm -cpu qemu64 -m 3072 -drive file=/mnt/Work/virtual/Win_XP_work.qcow2,format=qcow2
Windows stops booting after the line
multi(0)disk(0)rdisk(0)partition(1)\Windows\System32\Drivers\Mup.sys and then offers to boot into safe mode (which does not work either).

Similarly the VM boots with option -machine pc-1.1,accel=tgz,... and it fails with -machine pc-1.1,accel=kvm,...
So I changed the XML definition of the VM in /etc/libvirt/qemu and replaced <domain type='kvm'> with <domain type='qemu'> and also the emulator-tag to qemu-system-x86_64.
Now the VM can be started from virt-manager - but

Why does an existing Windows XP VM no longer work with kvm?
What changed here? Is this intentional? Bug or feature?

How can I find out more about the issue? I did not find any errors in the logs in /var/log/libvirt/qemu. The host seems completely unaware that the guest has a problem.
 
Old 07-18-2019, 03:33 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,091

Rep: Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903
"\Mup.sys"

You can't easily move windows. Mup is saying that the machine was created on a system that is now not the same. Either fix hal or return to original hal.
 
Old 07-19-2019, 12:56 AM   #3
samweis2111
LQ Newbie
 
Registered: Dec 2005
Location: Sweden
Posts: 11

Original Poster
Rep: Reputation: 0
Hi Jefro,

Thank you for your answer.

Just to make sure we are on the same page:

I have not changed the VM, the VM definition in /etc/libvirt/qemu, the Windows XP installation on it, the CPU of the host, the BIOS settings of the host, or the settings for libvirtd in /etc/libvirt.
The only thing that changed is the upgrade of the host to Debian buster.
So the version of the package qemu-kvm has changed, and the new kvm apparently treats the VM differently now, so that Windows believes it is running on a different hardware.

Quote:
Originally Posted by jefro View Post
"\Mup.sys"
Either fix hal or return to original hal.
How do I do that?

I do not know what changed in kvm.
Surprisingly the VM runs with kvm disabled (accel=tgz) but not with kvm enabled (accel=kvm), even though it must have run with kvm enabled before the upgrade to buster.
I have checked older backups of the XML definition of the VM in /etc/libvirt/qemu, and the VM has been created and always been used with kvm enabled.
 
Old 07-19-2019, 02:51 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,091

Rep: Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903
Since one set of command line options work we have to assume that the image you have is at least mostly correct. Since it replies with mup.sys I usually assume hal. Plenty of web articles how to fix hal on windows xp.

Not sure about your build of kvm/qemu and your choices of options. Guess you could start with simply qemu or use 32 bit.

Not sure what changed either. You could downgrade or create new test system. I'd save off this vm image and only use copies while testing. I assume that as each update of a vm program they tend to make it more closely integrated with the host. But some set of hal would be my first guess has changed. There may be some import or export options with other vm's that can fix hal to their vm product.

The normal way to fix has by MS web pages is something like make backup with system state and then reload clean xp to new hardware and then apply backup with system state. (if I recall correctly) See technet.

Some helpful info. https://wiki.archlinux.org/index.php...ualized_system

Last edited by jefro; 07-19-2019 at 02:53 PM.
 
Old 07-20-2019, 04:13 AM   #5
samweis2111
LQ Newbie
 
Registered: Dec 2005
Location: Sweden
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jefro View Post
Since one set of command line options work we have to assume that the image you have is at least mostly correct.
I think it us fair to say that the image is "proven good beyond doubt".
I have numerous backups of different states of this image for the last 5 years. They all worked, and none does now.
So it has nothing at all to do with the image itself or the Windows installation on it.
Meanwhile I also tried to repair the image using the Windows XP installation CD. Even the CD ends up in a boot loop after "Setup is starting Windows...".

Something has changed in kvm that XP does not cope with.
Qemu works - but using the VM without acceleration is a bit tedious.

So I was hoping there was a compatibility switch that makes 'qemu-system-x86_64 --enable-kvm' behave like it did before: accelerated, but still compatible with Win XP.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "No KVM, No qemu-kvm" Available error while trying to install KVM on CentOS 6.3 sriramdas Linux - Virtualization and Cloud 5 01-01-2013 10:46 AM
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM
[Debian/Qemu/KVM] Why qemu --enable-kvm works but not kvm directly? gb2312 Linux - Virtualization and Cloud 2 03-21-2011 02:05 PM
LXer: Attempt of qemu-kvm-0.14 patching via Gerds Hoffmann spice/qxl: locking fix for qemu-kvm on LXer Syndicated Linux News 0 03-14-2011 01:20 PM
On qemu-kvm, qemu-ifup script not found on Slackware 13 AndrewGaven Linux - Virtualization and Cloud 14 01-29-2010 03:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 09:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration