> -----Oorspronkelijk bericht----- > Van: Lentes, Bernd [mailto:bernd.lentes@helmholtz-muenchen.de] > Verzonden: donderdag 3 december 2015 13:54 > Aan: libvirt-ML > CC: Dominique Ramaekers > Onderwerp: RE: snapshot of running vm's > > > ... > > > > > > Hi, > > > > > > i have inserted: > > > > > > <channel type='unix'> > > > <source mode='bind' > > > > > path='/var/lib/libvirt/qemu/channel/target/sles11.org.qemu.guest_age > > nt > > > .0'/ > > > > > > > <target type='virtio' name='org.qemu.guest_agent.0'/> > > > <address type='virtio-serial' controller='0' bus='0' > > > port='2'/> </channel> > > > > > > > > > I didn't insert the path, it was added automatically, the same with > > > "<address type='virtio-serial' controller='0' bus='0' port='2'/>". > > > I tried already port 1 and 2, but get this error: > > > > > > sunhb58820:~/libvirt_1.2.11 # virsh start sles11 > > > error: Failed to start domain sles11 > > > error: internal error: process exited while connecting to monitor: > > > qemu-kvm: -chardev > > > > > socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/sles1 > > > 1.or > > > g.qemu.guest_agent.0,server,nowait: Failed to bind socket: No such > > > file or directory > > > chardev: opening backend "socket" failed > > > > Does the path /var/lib/libvirt/qemu/channel/target/ exists? > > Is libvirt able to write to this path? > > > Hi Dominique, > > no, the path does not exist. But from where does libvirt derive it ?I think the path is compiled into the binaries. Just create the path and make sure libvirt can write to it root@CmsrvVH3:/var/lib/libvirt/qemu/channel# ls -lh totaal 4,0K drwxr-xr-x 2 libvirt-qemu kvm 4,0K nov 23 20:49 target> > I forgot: I'm still running libvirt 1.2.5. Do I need to update also for this problem > ?I don't think so... Until you want to use active block commit, your good with 1.2.5> > > Bernd > > > > Helmholtz Zentrum Muenchen > Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) > Ingolstaedter Landstr. 1 > 85764 Neuherberg > www.helmholtz-muenchen.de > Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe > Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Nikolaus Blum, Dr. Alfons > Enhsen > Registergericht: Amtsgericht Muenchen HRB 6466 > USt-IdNr: DE 129521671
Dominique wrote:> >Having this configuration in the xml it worked: <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/sles11.org.qemu.guest_agent.0'/><target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='2'/> </channel> The file exists now: srwxrwxr-x 1 root root 0 Dec 3 14:15 /var/lib/libvirt/qemu/channel/target/sles11.org.qemu.guest_agent.0 I had to add the directories channel and target. VM is starting fine, snapshot is possible. But still some slight problems: virsh # snapshot-create-as --domain sles11 --name sn_sles11 --atomic --disk-only --live --quiesce error: Operation not supported: live snapshot creation is supported only with external checkpoints I thought --disk-only would create external snapshots ? virsh # snapshot-create-as --domain sles11 --name sn_sles11 --atomic --disk-only --live --quiesce --diskspec vdb,snapshot=external error: Operation not supported: live snapshot creation is supported only with external checkpoints Hm. Specifying external explicitely also does not help. virsh # snapshot-create-as --domain sles11 --name sn_sles11 --atomic --disk-only --quiesce --diskspec vdb,snapshot=external,file=/var/lib/kvm/images/sles11/sn_disk0.qcow2 Domain snapshot sn_sles11 created Omitting --live is the key. But I thought I need it because i'm snapshotting a running vm ?> > I forgot: I'm still running libvirt 1.2.5. Do I need to update also > > for this problem ? > I don't think so... Until you want to use active block commit, your good > with 1.2.5 >I still have 1.2.5. I tried to blockcommit: virsh # blockcommit sles11 vdb --path /var/lib/kvm/images/sles11/sn_disk0.qcow2 --wait --verbose --delete error: option --path already seen what does that mean ? virsh # blockcommit sles11 --path /var/lib/kvm/images/sles11/sn_disk0.qcow2 --wait --verbose --delete error: unsupported flags (0x2) in function qemuDomainBlockCommit virsh # blockcommit sles11 --path /var/lib/kvm/images/sles11/sn_disk0.qcow2 --wait --verbose error: Operation not supported: committing the active layer not supported yet Ok. Omitting --delete removes one error, but now I have another one. What means "not supported yet" ? Does that mean I have a software which offers blockcommit in the help, but it is not completely implemented ? virsh # blockcommit sles11 --path /var/lib/kvm/images/sles11/sn_disk0.raw --wait --verbose error: invalid argument: No device found for specified path Which path do I have to provide ? The one to the base or the one to the snapshot ? I tried both, but not working. Do I have all these problems because I'm using 1.2.5 ? That's the official version of libvirt which is included by SuSE for SLES 11 SP4. But it's lacking functionality which is offered in the help ? Oh my god. Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Nikolaus Blum, Dr. Alfons Enhsen Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671
Dominique wrote:> > As stated in http://wiki.libvirt.org/page/Live-disk-backup-with-active- > blockcommit > You'll need libvirt 1.2.9 ... > > It seems even Suse enterprise 12 is still using libivrt 1.2.5... > > Bad luck. > > Before 1.2.9 I made my backups with a "virsh save $VM" but it cost a lot > of time to save a VM... >I managed to update to libvirt 1.2.11. Guest Agent is running in the vm. I'm trying to snapshot: virsh # snapshot-create-as --domain sles11 --name sn_sles11 --atomic --disk-only --quiesce error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been disabled for this instance What is now going on ? Guest Agent in VM is qemu-guest-agent-2.0.2-1.35. Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Nikolaus Blum, Dr. Alfons Enhsen Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671
Dominique wrote:> > Never had that problem. Can it be a setting of the guest agent on the > guest? With me all the commands of the ga are enabled... >Where can i change the settings of the agent ?> You can check the commands by using this: > virsh qemu-agent-command $VM '{"execute": "guest-info"}' > > This way you can at least check that the command is really disabled.You'll> have to find a way to enable the command then... > > I can't help you further with this... > > > > > I managed to update to libvirt 1.2.11. Guest Agent is running in thevm.> > I'm trying to snapshot: > > > > virsh # snapshot-create-as --domain sles11 --name sn_sles11 --atomic > > --disk- only --quiesce > > error: internal error: unable to execute QEMU agent command > > 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been > > disabled for this instance > > > > What is now going on ? > > Guest Agent in VM is qemu-guest-agent-2.0.2-1.35. > >virsh # qemu-agent-command sles11 '{"execute": "guest-info"}' {"return":{"version":"2.0.2","supported_commands":[{"enabled":true,"name": "guest-set-vcpus","success-response":true},{"enabled":true,"name":"guest-g et-vcpus" ,"success-response":true},{"enabled":true,"name":"guest-network-get-interf aces","success-response":true},{"enabled":true,"name":"guest-suspend-hybri d","succe ss-response":false},{"enabled":true,"name":"guest-suspend-ram","success-re sponse":false},{"enabled":true,"name":"guest-suspend-disk","success-respon se":false },{"enabled":true,"name":"guest-fstrim","success-response":true},{"enabled ":true,"name":"guest-fsfreeze-thaw","success-response":true}, {"enabled":true,"name":"guest-fsfreeze-freeze","success-response":true} ,{"enabled":true,"name":"guest-fsfreeze-status","success-response":true},{ "enabled":true,"name":"guest-file- flush","success-response":true},{"enabled":true,"name":"guest-file-seek"," success-response":true},{"enabled":true,"name":"guest-file-write","success -response ":true},{"enabled":true,"name":"guest-file-read","success-response":true}, {"enabled":true,"name":"guest-file-close","success-response":true},{"enabl ed":true, "name":"guest-file-open","success-response":true},{"enabled":true,"name":" guest-shutdown","success-response":false},{"enabled":true,"name":"guest-in fo","succ ess-response":true},{"enabled":true,"name":"guest-set-time","success-respo nse":true},{"enabled":true,"name":"guest-get-time","success-response":true },{"enabl ed":true,"name":"guest-ping","success-response":true},{"enabled":true,"nam e":"guest-sync","success-response":true},{"enabled":true,"name":"guest-syn c-delimit ed","success-response":true}]}} It shows: "...{"enabled":true,"name":"guest-fsfreeze-freeze","success-response":true } It understand this that it should work. Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Nikolaus Blum, Dr. Alfons Enhsen Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671