Dear all, I created some snapshots, a long time ago, using the xml description option, so the snapshots have a name with a space in it... Really a bad choice apparently, since it seems impossible to delete them now: I cannot find how to enter the snapshot name properly due to the space. Quotes don't seem to help; escaping the space doesn't help either. Anybody knows how to solve this? eg: snapshot-delete DOMINO1-prealloc --snapshotname 'W2K3-virgin install' error: Domain snapshot not found: no snapshot with matching name ''W2K3-virgin' (-> notive also the extra ' added ) root at VLET3:~# time virsh snapshot-delete DOMINO1-prealloc "W2K3-virgin\ install" error: unexpected data 'install' Thanks, Juergen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130121/30da0784/attachment.htm>
On 01/21/2013 03:43 PM, jurgen.depicker at let.be wrote:> Dear all, > I created some snapshots, a long time ago, using the xml description > option, so the snapshots have a name with a space in it... > Really a bad choice apparently, since it seems impossible to delete them > now: I cannot find how to enter the snapshot name properly due to the > space. Quotes don't seem to help; escaping the space doesn't help either. > Anybody knows how to solve this? > eg: > snapshot-delete DOMINO1-prealloc --snapshotname 'W2K3-virgin install'What version of libvirt are you using? And is this within the virsh batch mode, or from the command line?> error: Domain snapshot not found: no snapshot with matching name > ''W2K3-virgin' > (-> notive also the extra ' added )That's not supposed to happen; quoting of spaces is supposed to mimic shell quoting, so that you can use arguments with spaces in both command line and batch mode. To test: # virsh echo two spaces two spaces # virsh echo 'two spaces' two spaces # virsh Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # echo two spaces two spaces virsh # echo 'two spaces' two spaces virsh # quit> > root at VLET3:~# time virsh snapshot-delete DOMINO1-prealloc "W2K3-virgin\ > install" > error: unexpected data 'install'I'm not reproducing this; I tested with libvirt 0.10.2.2 (Fedora 18): # virsh snapshot-list fedora-local Name Creation Time State ------------------------------------------------------------ name with spaces 2013-01-22 09:05:07 -0700 shutoff # virsh snapshot-delete fedora-local 'name with spaces' Domain snapshot name with spaces deleted -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 621 bytes Desc: OpenPGP digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130122/0157246b/attachment.sig>
Hi Juergen, if you are using kvm/qemu with libvirt you can try to delete the snapshot with the qemu monitor commands. The general syntax is virsh qemu-monitor-command --hmp <domain> '<command> [...]' So you can try virsh qemu-monitor-command --hmp DOMINO1-prealloc 'info snapshots' and thne delete it with the provided snapshot ID virsh qemu-monitor-command --hmp DOMINO1-prealloc 'delvm <ID>' This will delete the snapshot from your diskimage. Christian. On Di, 2013-01-22 at 18:00, libvirt-users-request at redhat.com wrote:> Message: 3 > Date: Mon, 21 Jan 2013 23:43:57 +0100 > From: jurgen.depicker at let.be > To: libvirt-users <libvirt-users at redhat.com> > Subject: [libvirt-users] snapshot troubles > Message-ID: > <OF4AE792B7.46B8D599-ONC1257AFA.0073C652-C1257AFA.007D0C38 at let.be> > Content-Type: text/plain; charset="us-ascii" > > Dear all, > I created some snapshots, a long time ago, using the xml description > option, so the snapshots have a name with a space in it... > Really a bad choice apparently, since it seems impossible to delete > them > now: I cannot find how to enter the snapshot name properly due to the > space. Quotes don't seem to help; escaping the space doesn't help > either. > Anybody knows how to solve this? > eg: > snapshot-delete DOMINO1-prealloc --snapshotname 'W2K3-virgin install' > error: Domain snapshot not found: no snapshot with matching name > ''W2K3-virgin' > (-> notive also the extra ' added ) > > root at VLET3:~# time virsh snapshot-delete DOMINO1-prealloc > "W2K3-virgin\ > install" > error: unexpected data 'install' > > Thanks, Juergen > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <https://www.redhat.com/archives/libvirt-users/attachments/20130121/30da0784/attachment.html> >