* loadvm: "Error -1 while loading VM state"
@ 2008-07-01 19:27 Slohm Gadaburi
2008-07-01 20:47 ` Soren Hansen
0 siblings, 1 reply; 5+ messages in thread
From: Slohm Gadaburi @ 2008-07-01 19:27 UTC (permalink / raw)
To: kvm
Hi,
I can't get qemu/kvm to loadvm a saved state.
I use the official package that comes with Ubuntu 8.04.
The binary itself is called 'kvm', it is based on QEMU 0.9.1 (kvm-62).
The image is qcow2 (created with qemu-img create -f qcow2 guest.img 10G).
My monitor sequence looks like (while guest is running):
QEMU 0.9.1 monitor
(qemu) info snapshots
Snapshot devices: ide0-hd0
Snapshot list (from ide0-hd0):
ID TAG VM SIZE DATE VM CLOCK
(qemu) savevm 1
(qemu) info snapshots
Snapshot devices: ide0-hd0
Snapshot list (from ide0-hd0):
ID TAG VM SIZE DATE VM CLOCK
1 1 42M 2008-....<snip>...
(qemu) loadvm 1
Error -1 while loading VM state
(qemu)
If I quit the guest and I run "qemu-img info guest.img",
I can see the snapshot info. But If I start the guest with the command
"kvm -loadvm 1 guest.img", it fails to load the snapshot (same error
message), and just bootstrap the machine normally.
Any suggestions ?
Thanks,
Slohm.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: loadvm: "Error -1 while loading VM state"
2008-07-01 19:27 loadvm: "Error -1 while loading VM state" Slohm Gadaburi
@ 2008-07-01 20:47 ` Soren Hansen
2008-07-02 7:31 ` Slohm Gadaburi
0 siblings, 1 reply; 5+ messages in thread
From: Soren Hansen @ 2008-07-01 20:47 UTC (permalink / raw)
To: kvm
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
On Tue, Jul 01, 2008 at 10:27:19PM +0300, Slohm Gadaburi wrote:
> I can't get qemu/kvm to loadvm a saved state.
This is a known issue. We applied a patch to fix a security problem in
kvm that allowed guests to write outside the boundaries of the
designated disk image. savevm works by writing the snapshot data at the
end of qcow2 files, which is conveniently located just outside
aforementioned boundary. This means 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.
I fixed this in Ubuntu Intrepid (our upcoming release) and Debian
unstable by simply allowing writes outside the disk image boundaries if
the guest isn't running. I sent the updated security patch back to the
original source (Dan Berrange from RedHat), but I'm not sure what
happened after that.
FWIW, the preferred way to save VM state (or to use KVM at all, really)
in Ubuntu is through libvirt/virt-manager anyway, but this bug really
should be fixed. It's on my todo-queue somewhere, but that queue is
rather long, I'm afraid.
You're welcome on the ubuntu-server mailing list with these questions by
the way. You can see how to subscribe here:
http://lists.ubuntu.com/ubuntu-server
--
Soren Hansen |
Virtualisation specialist | Ubuntu Server Team
Canonical Ltd. | http://www.ubuntu.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: loadvm: "Error -1 while loading VM state"
2008-07-01 20:47 ` Soren Hansen
@ 2008-07-02 7:31 ` Slohm Gadaburi
2008-07-02 7:38 ` Soren Hansen
0 siblings, 1 reply; 5+ messages in thread
From: Slohm Gadaburi @ 2008-07-02 7:31 UTC (permalink / raw)
To: kvm
On Tue, Jul 1, 2008 at 11:47 PM, Soren Hansen <soren@ubuntu.com> wrote:
> On Tue, Jul 01, 2008 at 10:27:19PM +0300, Slohm Gadaburi wrote:
>> I can't get qemu/kvm to loadvm a saved state.
>
> This is a known issue. We applied a patch to fix a security problem in
I guess I will have to use vanilla kvm as I really must have these
snapshots working on my Hardy.
> FWIW, the preferred way to save VM state (or to use KVM at all, really)
> in Ubuntu is through libvirt/virt-manager anyway, but this bug really
Hmm, couldn't see any snapshots mechanism in virt-manager (at least
not in the distributed package). do you mean using its GUI or virsh ?
> You're welcome on the ubuntu-server mailing list with these questions by
Thanks! sorry I didn't realize this is Ubuntu specific beforehand.
And thanks again for all the help !
Slohm
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: loadvm: "Error -1 while loading VM state"
2008-07-02 7:31 ` Slohm Gadaburi
@ 2008-07-02 7:38 ` Soren Hansen
2008-07-02 7:54 ` Slohm Gadaburi
0 siblings, 1 reply; 5+ messages in thread
From: Soren Hansen @ 2008-07-02 7:38 UTC (permalink / raw)
To: kvm
[-- Attachment #1: Type: text/plain, Size: 955 bytes --]
On Wed, Jul 02, 2008 at 10:31:59AM +0300, Slohm Gadaburi wrote:
>> FWIW, the preferred way to save VM state (or to use KVM at all,
>> really) in Ubuntu is through libvirt/virt-manager anyway, but this
>> bug really
> Hmm, couldn't see any snapshots mechanism in virt-manager (at least
> not in the distributed package). do you mean using its GUI or virsh ?
Mind you, what libvirt offers isn't proper snapshotting. It saves the VM
state, but not your disk image state, so it's only useful for suspending
VM's and resuming them again, and not for saving multiple snapshots and
resuming any of them at random at a later time. Trying to do so will
cause headaches, heartburn, kill your cat, and likely make your coffee
cold. You've been warned.
> And thanks again for all the help !
You're welcome.
--
Soren Hansen |
Virtualisation specialist | Ubuntu Server Team
Canonical Ltd. | http://www.ubuntu.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: loadvm: "Error -1 while loading VM state"
2008-07-02 7:38 ` Soren Hansen
@ 2008-07-02 7:54 ` Slohm Gadaburi
0 siblings, 0 replies; 5+ messages in thread
From: Slohm Gadaburi @ 2008-07-02 7:54 UTC (permalink / raw)
To: kvm
On Wed, Jul 2, 2008 at 10:38 AM, Soren Hansen <soren@ubuntu.com> wrote:
> Mind you, what libvirt offers isn't proper snapshotting. It saves the VM
> state, but not your disk image state, so it's only useful for suspending
Sounds great. How can one use libvirt ? What are the existing front ends ?
I tried the graphical virt-manager but I didn't see there
loadvm/savevm buttons. maybe I overlooked.
Are there any textual ways to control libvirt ? (I find GUI stuff to
be slow and uncomfortable..)
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-02 7:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01 19:27 loadvm: "Error -1 while loading VM state" Slohm Gadaburi
2008-07-01 20:47 ` Soren Hansen
2008-07-02 7:31 ` Slohm Gadaburi
2008-07-02 7:38 ` Soren Hansen
2008-07-02 7:54 ` Slohm Gadaburi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox