[libvirt-users] snapshot troubles

Eric Blake eblake at redhat.com
Tue Jan 22 16:06:37 UTC 2013


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>


More information about the libvirt-users mailing list