qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] correct workflow for qemu commit and snapshots


From: Michael Mair-Keimberger
Subject: [Qemu-discuss] correct workflow for qemu commit and snapshots
Date: Wed, 03 Oct 2012 19:49:57 +0200
User-agent: KMail/4.9.1 (Linux/3.5.4-gentoo; KDE/4.9.1; x86_64; ; )

Hi all,

For some time now i'm experimenting with snapshots. I saw that the qemu 
monitor has an command  (qemu commit [1]) which should commit changes in a 
virtual guest back to the device.
Unfortunately i couldn't get it to work and i'm asking now how it supposed to 
work.
Basically i start virtual guest with:

/usr/bin/qemu-system-x86_64 -name g64 -runas kvm -m 4096
        -smp 2 -monitor unix:/var/run/kvm/g64.sock,server,nowait \
        -pidfile /var/run/kvm/g64.pid -daemonize -snapshot -device 
virtio-serial \ 
        -chardev spicevmc,id=vdagent,name=vdagent \
        -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
        -drive file=/media/btrfs/g64.qcow2,if=virtio,cache=none,aio=threads \
        -netdev type=tap,id=g64_1,vhost=on,ifname=qtap1,script=no,downscript=no 
\
        -device virtio-net-pci,netdev=g64_1,mac=DE:AD:BE:EF:A9:13 \
        -spice port=5801,addr=192.168.2.60,password=verysecret -k de \
        -cpu host -usb -usbdevice tablet -vga qxl

Usually i have those virtual machines on lvm partitions, but i also tried it 
with qcow2 files.
After i've started a guest i connect to the socket with nc and "stop" "commit" 
and "c" (continue) the guest.

On lvm partitions i get lots of read/write errors, looking like that (from 
dmesg):
[   35.046893] end_request: I/O error, dev vda, sector 86153264
[   35.046903] Buffer I/O error on device vda3, logical block 10236422
[   35.046905] lost page write due to I/O error on vda3
[   35.047116] end_request: I/O error, dev vda, sector 86153248
[   35.047125] Buffer I/O error on device vda3, logical block 10236420
[   35.047127] lost page write due to I/O error on vda3
[   35.047316] end_request: I/O error, dev vda, sector 86068608


On qcow2 basically nothing happen. No read/write error but also nothing get 
saved.

I also tried it with the qemu-guest-agent and added those lines to the guest: 
        -chardev socket,path=/tmp/qga-g64.sock,server,nowait,id=qga0 \
        -device virtio-serial \
        -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

The agent worked as expected, but unfortunately it didn't help with snapshots.

Anyone have an idea what i'm doing wrong, or did i just misunderstand the 
purpose of the "commit" command? Otherwise i would make an bugreport.


[1] http://en.wikibooks.org/wiki/QEMU/Monitor#commit

Thanks in advance,
Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]