On 01/22/2013 09:27 AM, jurgen.depicker(a)let.be wrote:
> What version of libvirt are you using? And is this within the
virsh
> batch mode, or from the command line?
root@VLET3:~# virsh --version
0.8.3
That explains it. Older virsh had lousy command line handling.
root@VLET3:~# virsh echo two spaces
error: unknown command: 'echo'
Yep, I added the 'virsh echo' command when I fixed command line parsing.
Meanwhile, you don't have to use virsh. You could write your own C
program that directly calls virDomainSnapshotDelete() from libvirt.so,
or you could use python bindings. I'm not a python whiz, but I think it
would probably be something like:
$ python
>> import libvirt
>> conn = libvirt.open(None)
>> dom = conn.lookupByName("DOMINO1-prealloc")
>> snap = dom.snapshotLookupByName("W2K3-virgin install", 0)
>> snap.delete(0)
>> quit()
So, or I pray that my 20G remaining will suffice for one more month, or
maybe someone knows how to rename a snapshot, or edit some config file
where that name is configured?
Just because virsh command-line parsing is lousy doesn't mean that the
underlying APIs won't work - you just have to get at them from somewhere
other than virsh.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org