On Sat, Sep 03, 2016 at 06:45:55PM +0800, gunnar.wagner(a)netcologne.de wrote:
tried it (--live wasn't accepted, so I shut the VM down) and
produced a snapshot
$ sudo virsh snapshot-delete [domain] [sn-id]
returns an error though
>> error: Failed to delete snapshot [sn-id]
>> error: unsupported configuration: deletion of 1 external disk snapshots not
supported yet
so do I have to look into the block commit area to proceed here?
Deletion of external disk snapshots is not supported yet. There's
nothing you did wrong, it's exactly what the message says.
> On September 3, 2016 at 6:28 PM vrms(a)netcologne.de wrote:
>
> hi Martin,
>
> thanks again for the feedback. maybe you have noted that I am not yet all too
familiar with those tools.
>
> this is now sort of working for me. But I sense that you seem this method to be less
then ideal.
Don't get me wrong, it's OK not to be familiar with something. I also
had to look up what each of those commands you sent do. I don't use
snapshots very often, heck I used it like three times and already forgot
everything. It's just that it looked to me like you haven't looked at
some places where it's described (like man page ;) )
> Reading through the virsh manual it looks like ...
>
Great, you checked the man page ;)
> $ virsh snapshot-create [domain] --disk-only --live
>
> ... might be doing a similar thing. Maybe more elegant (pure virsh) and on a running
machine
> what I can't qite figure out is where to squeeze in the name (or description,
even) for the snapshot
>
If you read the whole thing, there's a parameter in which you can
specify the whole XML of that snapshot. It's not straightforward or
easy to do, but there you can specify the name, what disks should have
snapshots and so on.
If you look at the next command (or press <Tab> in the interactive mode
twice) you'll see there's yet another command, snapshot-create-as, which
is exactly what you want. It's the same thing, but it has parameters
for bunch of things that you'd have to supply in the XML normally.
That's the same thing as we have with vol-create(-as), it's a syntax
sugar for users to have it easier.
So what you want to do is (I guess):
virsh snapshot-create-as $domain --name $snap_id --diskspec $vda,snapshot=internal
And to list them you do:
virsh snpashot-list $domain
HTH,
Martin
> > On September 3, 2016 at 3:37 PM Martin Kletzander
<mkletzan(a)redhat.com> wrote:
> >
> > On Sat, Sep 03, 2016 at 03:07:37PM +0800, vrms(a)netcologne.de wrote:
> >
> > > I take an internal snapshot (VM is 'shutdown' when taking it) of a
qcow2 image like this:
> > >
> > > $ qemu-img snapshot -c sn1 [my_image].qcow2
> > >
> > > I see that snapshot when asking for:
> > >
> > > $ qemu-img info [my_image].qcow
> >
> > Firstly, you are doing this behind libvirt's back, so libvirt will most
> > likely not know about that snapshot.
> >
> > > but do NOT see it with:
> > >
> > > $ virsh domblklist [my_domain]
> >
> > Well, what would you expect to see there? Have a look at the man page,
> > virsh(1) says:
> >
> > domblklist domain [--inactive] [--details]
> > Print a table showing the brief information of all block devices associated
with
> > domain. If --inactive is specified, query the block devices that will be used
on
> > the next boot, rather than those currently in use by a running domain. If
> > --details is specified, disk type and device value will also be printed. Other
> > contexts that require a block device name (such as domblkinfo or
snapshot-create
> > for disk snapshots) will accept either target or unique source names printed
by
> > this command.
> >
> > > is that how it is meant to be?
> >
> > Well, yeah (if the above is really what you wanted to run)...
> >
> > > _______________________________________________
> > > libvirt-users mailing list
> > > libvirt-users(a)redhat.com
> > >
https://www.redhat.com/mailman/listinfo/libvirt-users