loadvm/savevm unreliable

Bug #244467 reported by Michael Vogt on 2008-07-01
4
Affects Status Importance Assigned to Milestone
kvm (Ubuntu)
Low
Unassigned
Hardy
Low
Dustin Kirkland 
Intrepid
Low
Dustin Kirkland 

Bug Description

Binary package hint: kvm

Hi,

the loadvm/savevm commands in kvm work unreliable for me. Loadvm tends to cause problems in the client virtual machine, I see random segfaults (e.g. login, swapper). For example: "swapper[0]: default at 080cb760 eip c011ec62 esp c0102f7c error 7". Sometimes the virtual console does not accept terminal input anymore.

I tried this both on a i386 and a amd64 machine with both hardy (0.62) and intrepid (0.69) with similar results.

Michael Vogt (mvo) wrote :

Maybe releated (not sure). loadvm sometimes refuses to load at all:

$ kvm test-image -monitor stdio
QEMU 0.9.1 monitor - type 'help' for more information
(qemu) info snapshots
Snapshot devices: ide0-hd0
Snapshot list (from ide0-hd0):
ID TAG VM SIZE DATE VM CLOCK
1 clean-base 67M 2008-06-26 23:05:30 00:01:27.554
2 foo 47M 2008-07-01 11:11:20 00:01:03.399
3 bar 47M 2008-07-01 11:21:51 00:01:58.776
(qemu) loadvm 1
qemu: warning: error while loading state for instance 0x0 of device 'ram'
Error -22 while loading VM state
(qemu) loadvm 2
[work]

I have no found a pattern yet, which ones load and which ones fail.

Michael Vogt (mvo) wrote :

Please ignore comment #1 about the "qemu: warning: error while loading state for instance 0x0 of device 'ram' Error -22 while loading VM state". This is caused by different RAM sizes between the snapshots (for testing I ran kvm without -m parameter, but my app that uses kvm as backend uses the -m switch). Sorry for the noise.

Changed in kvm:
importance: Undecided → Low
Dustin Kirkland  (kirkland) wrote :

Hi Michael-

loadvm/savevm has been completely rewritten recently. Can you reproduce this on Hardy's kvm-84?

:-Dustin

Changed in kvm:
status: New → Incomplete
Dustin Kirkland  (kirkland) wrote :

mvo-

That last comment should have asked you:
 "Can you reproduce this on JAUNTY's kvm-84?"

Also, I have provided kvm-84 for Hardy in a PPA. You could also try testing it too:
 * https://launchpad.net/~ubuntu-virt/+archive/ppa

Does this solve the issue, or is it reproducible?

:-Dustin

savevm/loadvm is broken in QEMU 0.10.0 (and therefore also in kvm-85rc1) upstream. I haven't tried ubuntu's kvm-84 package yet, but upstream kvm-84 works fine for me.
http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg01123.html

Dustin Kirkland  (kirkland) wrote :

Okay, this should be fixed in kvm-84 in Jaunty. I will nominate it for release against Hardy and Intrepid, as part of the kvm-84 backport/sru.

:-Dustin

Changed in kvm (Ubuntu):
status: Incomplete → Fix Released
Changed in kvm (Ubuntu Hardy):
assignee: nobody → Dustin Kirkland (kirkland)
importance: Undecided → Low
milestone: none → ubuntu-8.04.3
status: New → In Progress
Changed in kvm (Ubuntu Intrepid):
assignee: nobody → Dustin Kirkland (kirkland)
importance: Undecided → Low
milestone: none → intrepid-updates
status: New → In Progress
Anthony O. (netangel+launchpad) wrote :

I'm using libvirt and virt-manager for my VM in production with Ubuntu 8.04 LTS.
I have a similar error when trying to restore a snapshot :

(qemu) info snapshots
Snapshot devices: ide0-hd0
Snapshot list (from ide0-hd0):
ID TAG VM SIZE DATE VM CLOCK
1 before_zimbra_install 37M 2009-07-09 18:35:03 00:40:19.840
(qemu) loadvm 1
loadvm 1

Error -1 while loading VM state

Do you think the fix will be backported to hardy version kvm-62 ? Else, how could I switch to kvm-84 (I would not prefer that solution as it is really risky, that server is our main virtualizer, and manages about 10 VM) ?

I'm sorry, this sort of thing will not be backported to Hardy's kvm-62.

I have uploaded a backported version of kvm-84 to hardy-backports,
where this should be solved.

Generally speaking, your choices are:
 1) continue using kvm-62 with hardy
 2) upgrade to the kvm-84 in hardy-backports
 3) upgrade to 9.04 and use its kvm-84
 4) hold out until 10.04 and whatever kvm magic we harden for the next LTS

:-Dustin

Anthony O. (netangel+launchpad) wrote :

Thanks for the quick reply.

I've read here http://<email address hidden>/msg01244.html that
"the savevm actually fails, but
that error is never reported back to the user and everythings seems to
be in working order. However, when you try to loadvm, you'll notice that
the snapshot was never actually saved."

Is this meaning that all the snapshot I make currently are useless ?

Second question, how do I do to upgrade to the kvm-84, do I just have to add a line in the sources.list ? Is there only kvm-84 inside that source, or will I have other softwares updated with those backports ? Isn't it too risky to have that sort of "mixed OS" ? That server will be our main host for all our VM production servers ... I don't want to choose a buggy solution...

Well, I've added the sources.list entries as described here https://launchpad.net/~ubuntu-virt/+archive/ppa in order to have kvm-84.
I've updated all the packages (which includes kvm), halted all my VMs, rebooted my server.
Now, I try to load my snapshot (released with the kvm-62), and here is what I get :

info snapshots
Snapshot devices: ide0-hd0
Snapshot list (from ide0-hd0):
ID TAG VM SIZE DATE VM CLOCK
1 before_zimbra_install 37M 2009-07-09 18:35:03 00:40:19.840
(qemu) loadvm 1
loadvm 1
Error -22 while loading VM state

Is that mean that my snapshot released with the previous version of kvm is dead ? More important question : will my future snapshots with kvm-84 be "loadable" ?

Thanks

Steve Langasek (vorlon) wrote :
Changed in kvm (Ubuntu Hardy):
milestone: ubuntu-8.04.3 → none
status: In Progress → Won't Fix
Dustin Kirkland  (kirkland) wrote :

This bug was fixed in kvm-84 as published to hardy-backports and intrepid-backports. If you're suffering from this bug, please try that package.

:-Dustin

Changed in kvm (Ubuntu Intrepid):
milestone: intrepid-updates → none
status: In Progress → Fix Released
Changed in kvm (Ubuntu Hardy):
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers