Skip to contentSkip to conversation

Are VM snapshots on Ubuntu host compatible with Fedora host?

Qemu-devel David Barrett 6 participants 12 messages Mar 20, 2008 – Apr 3, 2008

lore
Share & tools
lore
#0 lore raw

Should I be able to use "loadvm" on one computer to load a VM snapshot created with "savevm" on another?

Essentially, I've got my image working great on a local box (dual CPU Ubuntu), and I've got qemu working on one of my servers (quad CPU Fedora Core 4), so I've uploaded the guest image to the server and tried to start it. Unfortunately, it reliably spits out the following:

Quoted 1 line

qemu -nographic -serial vc -smb qemu -kernel-kqemu -localtime -m 512 -monitor stdio -loadvm boot winxp.qcow2

(qemu) qemu: warning: error while loading state for instance 0x0 of device 'ram'
qemu: fatal: triple fault
EAX=000676c8 EBX=ffdff000 ECX=ffdffc50 EDX=e0010031
ESI=80559320 EDI=80559580 EBP=ffdff980 ESP=805508d4
EIP=806f372a EFL=00010202 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0023 00000000 ffffffff 00cff300
CS =0008 00000000 ffffffff 00cffb00
SS =0010 00000000 ffffffff 00cff300
DS =0023 00000000 ffffffff 00cff300
FS =0030 ffdff000 00001fff ff40f3df
GS =0000 00000000 00000000 00000000
LDT=0000 00000000 00000000 00008000
TR =0028 80042000 000020ab 80008904
GDT= 8003f000 000003ff
IDT= 8003f400 000007ff
CR0=e001003b CR2=8003f440 CR3=00039000 CR4=000006d8
CCS=00000015 CCD=00000000 CCO=EFLAGS
FCW=027f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80 FPR0=0000000000000000 0000 FPR1=0000000000000000 0000 FPR2=0000000000000000 0000 FPR3=0000000000000000 0000 FPR4=0000000000000000 0000 FPR5=0000000000000000 0000 FPR6=0000000000000000 0000 FPR7=0000000000000000 0000 XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000 XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000

If I take out the "-loadvm boot" clause, it loads fine (well, it uses 100% CPU, but that's a different matter). And I can see that the snapshot is actually there:

(qemu) info snapshots
Snapshot devices: ide0-hd0
Snapshot list (from ide0-hd0):
ID TAG VM SIZE DATE VM CLOCK
1 boot 97M 2008-03-07 19:04:46 01:24:45.824
(qemu)

But it consistently crashes when I attempt to load the VM, whether using "-loadvm" at the command line or "loadvm" from the monitor. Similarly, I can save/load *new* snapshots just fine:

(qemu) savevm blah
(qemu) info snapshots
Snapshot devices: ide0-hd0
Snapshot list (from ide0-hd0):

ID        TAG                 VM SIZE                DATE       VM CLOCK
1         boot                    97M 2008-03-07 19:04:46   01:24:45.824
2         blah                   2.8M 2008-03-19 19:06:16   00:01:02.286

(qemu) loadvm blah
(qemu)

What I'm wondering is:

1) Is this supposed to work? Or are VM snapshots saved on one host unable to be loaded on another?

2) Do you have any tips for how to fix the above problem? I've tried an old patch that I found from the list that looked promising, but didn't help:

http://www.mail-archive.com/[email protected]/msg01624.html

Thanks!

-david

#1 lore raw

Hi..

Quoted 10 lines · David Barrett

Should I be able to use "loadvm" on one computer to load a VM snapshot
created with "savevm" on another?

Essentially, I've got my image working great on a local box (dual CPU Ubuntu), and I've got qemu working on one of my servers (quad CPU Fedora Core 4), so I've uploaded the guest image to the server and tried to start it. Unfortunately, it reliably spits out the following:

Quoted 1 line

qemu -nographic -serial vc -smb qemu -kernel-kqemu -localtime -m 512

-monitor stdio -loadvm boot winxp.qcow2

Fast advice, try to take out "-kernel-kqemu" and check if it helps somehow.

regards,

Mulyadi.

#2 lore raw

Good idea, but no luck -- same failure.

Quoted 22 lines · Mulyadi Santosa

Hi..

Quoted 10 lines · David Barrett

Should I be able to use "loadvm" on one computer to load a VM snapshot
created with "savevm" on another?

Essentially, I've got my image working great on a local box (dual CPU Ubuntu), and I've got qemu working on one of my servers (quad CPU Fedora Core 4), so I've uploaded the guest image to the server and tried to start it. Unfortunately, it reliably spits out the following:

Quoted 1 line

qemu -nographic -serial vc -smb qemu -kernel-kqemu -localtime -m 512

-monitor stdio -loadvm boot winxp.qcow2

Fast advice, try to take out "-kernel-kqemu" and check if it helps somehow.

regards,

Mulyadi.

#3 lore raw
Quoted 1 line · David Barrett

Good idea, but no luck -- same failure.

ok, how about -no-kqemu or simply modprobe -r kqemu? the triple fault happen in CPL=0, means it is likely a user mode code, thus kqemu could be the cause.

And IIRC, qcow2 has a bug but I am quite what it is and whether it is related to your problem...so, I ask, is it possible for you to temporarily convert your qcow2 image to..let's say raw type? but don't delete the qcow2

regards,

Mulyadi.

#4 lore raw
In reply to David Barrett

Following up on this, I created a brand-new WinXP image from scratch (on my Ubuntu box), uploaded to my headless Fedora box, and it still has the
exact same crash:

qemu: warning: error while loading state for instance 0x0 of device 'ram'
qemu: fatal: triple fault

So is it safe to say that QEMU VM snapshots are not transferable between hosts?

-david

Quoted 30 lines · David Barrett

Good idea, but no luck -- same failure.

Quoted 23 lines · Mulyadi Santosa

Hi..

Quoted 11 lines · David Barrett

Should I be able to use "loadvm" on one computer to load a VM snapshot
created with "savevm" on another?

Essentially, I've got my image working great on a local box (dual CPU Ubuntu), and I've got qemu working on one of my servers (quad CPU Fedora Core 4), so I've uploaded the guest image to the server and
tried
to start it. Unfortunately, it reliably spits out the following:

Quoted 1 line

qemu -nographic -serial vc -smb qemu -kernel-kqemu -localtime -m 512

-monitor stdio -loadvm boot winxp.qcow2

Fast advice, try to take out "-kernel-kqemu" and check if it helps somehow.

regards,

Mulyadi.

#5 lore raw

Hi

Quoted 10 lines · David Barrett

Following up on this, I created a brand-new WinXP image from scratch (on
my Ubuntu box), uploaded to my headless Fedora box, and it still has the
exact same crash:

qemu: warning: error while loading state for instance 0x0 of device 'ram'
qemu: fatal: triple fault

So is it safe to say that QEMU VM snapshots are not transferable between hosts?

I think something is "hard coded"....but I still can't figure it out. It could be memory layout, registers state, side effect of memory protection such as exec shield or things like SELinux.

http://en.wikipedia.org/wiki/Triple_fault makes me wonder, does this bug tell something about improper restore of IDT?

regards,

Mulyadi.

#6 lore raw
In reply to David Barrett
Quoted 6 lines · David Barrett

Following up on this, I created a brand-new WinXP image from scratch (on my Ubuntu box), uploaded to my headless Fedora box, and it still has the exact same crash:

qemu: warning: error while loading state for instance 0x0 of device 'ram'
qemu: fatal: triple fault

So is it safe to say that QEMU VM snapshots are not transferable between hosts?

KVM images are not compatible with QEMU. If one of your servers is running KVM, that's likely your problem.

Regards,

Anthony Liguori

Quoted 37 lines

-david

Quoted 31 lines · David Barrett

Good idea, but no luck -- same failure.

Quoted 24 lines · Mulyadi Santosa

Hi..

Quoted 9 lines · David Barrett

Should I be able to use "loadvm" on one computer to load a VM snapshot
created with "savevm" on another?

Essentially, I've got my image working great on a local box (dual CPU Ubuntu), and I've got qemu working on one of my servers (quad CPU Fedora Core 4), so I've uploaded the guest image to the server and
tried
to start it. Unfortunately, it reliably spits out the following:

Quoted 3 lines
Quoted 1 line

qemu -nographic -serial vc -smb qemu -kernel-kqemu -localtime

-m 512
-monitor stdio -loadvm boot winxp.qcow2

Fast advice, try to take out "-kernel-kqemu" and check if it helps somehow.

regards,

Mulyadi.

#7 lore raw
Quoted 9 lines · Anthony Liguori
Quoted 6 lines · David Barrett

Following up on this, I created a brand-new WinXP image from scratch (on my Ubuntu box), uploaded to my headless Fedora box, and it still has the exact same crash:

qemu: warning: error while loading state for instance 0x0 of device 'ram'
qemu: fatal: triple fault

So is it safe to say that QEMU VM snapshots are not transferable between hosts?

KVM images are not compatible with QEMU. If one of your servers is running KVM, that's likely your problem.

Ahh, very interesting.

Just to make sure I understand correctly, this means VM snapshots made when QEMU has KQEMU enabled will not transfer between machines, right?

Or do you mean that the *whole image* (the entire qcow2) cannot be transferred?

I ask because now that I've got VNC working on my headless server, I note that my XP guest -- despite being started from a binary identical image that works fine on my Ubuntu host -- immediately and infinitely BSoDs on startup.

I assumed (perhaps incorrectly) that the same QEMU XP image would work across multiple hosts, even those with different processors and motherboards. Am I misunderstanding this?

(Just for grins I even converted the qcow2 image to raw, to filter out any special qcow2 issues. No effect.)

-david

#8 lore raw
Quoted 12 lines · David Barrett
Quoted 11 lines · Anthony Liguori
Quoted 9 lines · David Barrett

Following up on this, I created a brand-new WinXP image from scratch (on my Ubuntu box), uploaded to my headless Fedora box, and it still has the exact same crash:

qemu: warning: error while loading state for instance 0x0 of device 'ram'
qemu: fatal: triple fault

So is it safe to say that QEMU VM snapshots are not transferable between hosts?

Quoted 8 lines
Quoted 2 lines

KVM images are not compatible with QEMU. If one of your servers is running KVM, that's likely your problem.

Ahh, very interesting.

Just to make sure I understand correctly, this means VM snapshots made when QEMU has KQEMU enabled will not transfer between machines, right?

No, as long as you are using qemu (with kqemu or without) an image should run identically on any host. Unless you're using kvm on one of the hosts, what you're seeing is some bug.

Cheers

Signature · 2 lines
Please do not print this email unless absolutely necessary. Spread
environmental awareness.
#9 lore raw
Quoted 17 lines · andrzej zaborowski
Quoted 16 lines · David Barrett
Quoted 13 lines · Anthony Liguori
Quoted 9 lines · David Barrett

Following up on this, I created a brand-new WinXP image from scratch (on my Ubuntu box), uploaded to my headless Fedora box, and it still has the exact same crash:

qemu: warning: error while loading state for instance 0x0 of device 'ram'
qemu: fatal: triple fault

So is it safe to say that QEMU VM snapshots are not transferable between hosts?

KVM images are not compatible with QEMU. If one of your servers is running KVM, that's likely your problem.

Quoted 8 lines
Quoted 4 lines

Ahh, very interesting.

Just to make sure I understand correctly, this means VM snapshots made when QEMU has KQEMU enabled will not transfer between machines, right?

No, as long as you are using qemu (with kqemu or without) an image should run identically on any host. Unless you're using kvm on one of the hosts, what you're seeing is some bug.

Good, thanks for that information. I don't think KVM is on any of the systems, but how can I confirm this?

At any rate, the "kvm" package hasn't been installed on either of the Ubuntu boxes -- both of which work -- and I'm not sure how to check on the Fedora Core 4 box (but I note /dev/kvm doesn't exist, and "yum list | grep kvm" comes up blank).

So in summary, everything works perfectly on two different Ubuntu 7.10 boxes (one single-core laptop, one dual-core desktop), but doesn't work on the quad-core Fedora Core 4 box. In all cases, I'm using the exact same qcow2 file, and starting with the exact same command line:**

qemu -monitor stdio -serial vc -smb qemu -kernel-kqemu -localtime -m 512 -loadvm boot winxp.qcow2

** I add "-vnc :0" to the FC4 command line as it's a headless server.

The one ray of light is I can get it to partially work on the FC4 box by removing "-loadvm" from the command line. However, then the WinXP image just BSODs immediately after the countdown timer to boot selection (Start Windows Normally). So, no luck, despite being the same image as works under Ubuntu. (Seems to use 100% CPU under Fedora, as well.)

What's the proper command line to use for a headless server? "-vnc :0" seems to work fine -- I'm able to VNC in and watch it repeatedly BSOD, at least -- but I'm thinking maybe the lack of physical video or audio card might be causing Windows to crash? I've tried these options, but nothing helped:

-nographic: Seems to start, but can't connect via VNC -no-acpi: No effect
-std-vga: No effect

The BSOD reboots instantly so it's hard to tell what it's complaining about, but it looks like something with an IRQ -- and perhaps something about it being less than something else. Not very helpful, I realize, but it's all I can get.

Any suggestions for how to get this thing to work on a headless server?

I'm going to try a couple other servers (one is running a Debian-based environment), so I'll let you know how that goes.

Thanks for all your help!

-david

#10 lore raw

Hello david

do you have the same version of qemu, and even the same patch-level. Probably not, when you use precompiled binaries. Try to build the package yourself on both systems, it's not difficult to do.

Regards
Tom

So in summary, everything works perfectly on two different Ubuntu 7.10 boxes

Quoted 5 lines

(one single-core laptop, one dual-core desktop), but doesn't work on the quad-core Fedora Core 4 box. In all cases, I'm using the exact same qcow2 file, and starting with the exact same command line:**

#11 lore raw

Re: [Qemu-devel] Are VM snapshots on Ubuntu host compatible withFedora host?

In reply to David Barrett

----- Original Message ----- From: "David Barrett" <[email protected]>
To: <[email protected]>
Sent: 3.04.2008 5:40
Subject: Re: [Qemu-devel] Are VM snapshots on Ubuntu host compatible withFedora host?

Quoted 3 lines

The BSOD reboots instantly so it's hard to tell what it's complaining about, but it looks like something with an IRQ -- and perhaps something about it being less than something else. Not very helpful, I realize, but it's all I can get.

Any suggestions for how to get this thing to work on a headless server?

Boot with vnc and press F8, select "Disable automatic restart on system failure" in WinNT boot benu, then You could read BSOD, if it happens.

BTW, You also could run vncserver on your server and run qemu with sdl. But vnc in qemu is enough.

Sergey Bychkow
ICQ: 21014758
FTN: 2:450/118.55