Silver Sky Soft Services, Inc.
2015-Aug-07 15:53 UTC
[libvirt-users] virsh create snapshot not honoring diskspec?
Hi, I'm trying to create a snapshot on a specific disk by using diskspec option. However, libvirt/virsh seems to ignore it and takes a snapshot of all disks. Am I using this option incorrectly? In below examples, I'm trying to snapshot only vdb. However even vda is getting snapshotted regardless of diskspec. Is this a known issue? I'm on CentOS 7.1, libvirtd (libvirt) 1.2.8, virsh 1.2.8 [root@localhost scripts]# virsh domblklist centos_nfs Target Source ------------------------------------------------ vda /var/lib/libvirt/images/centos_nfs.SNAP_2015-08-07-081800 vdb /var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-081800 hdc - [root@localhost scripts]# virsh snapshot-create-as --domain centos_nfs --name SNAP_2015-08-07-090909 --no-metadata --disk-only --atomic --diskspec vdb,snapshot=external Domain snapshot SNAP_2015-08-07-090909 created [root@localhost scripts]# virsh domblklist centos_nfs Target Source ------------------------------------------------ vda /var/lib/libvirt/images/centos_nfs.SNAP_2015-08-07-090909 vdb /var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-090909 hdc - [root@localhost scripts]# virsh snapshot-create-as --domain centos_nfs --name SNAP_2015-08-07-101010 --no-metadata --disk-only --atomic --diskspec vdb,snapshot=external,file=/var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-101010 Domain snapshot SNAP_2015-08-07-101010 created [root@localhost scripts]# virsh domblklist centos_nfs Target Source ------------------------------------------------ vda /var/lib/libvirt/images/centos_nfs.SNAP_2015-08-07-101010 vdb /var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-101010 hdc - Thanks, KiranK
Silver Sky Soft Services, Inc.
2015-Aug-13 20:03 UTC
Re: [libvirt-users] virsh create snapshot not honoring diskspec?
Checking in if anyone has thoughts on this? Thanks, KiranK On Fri, Aug 7, 2015 at 8:53 AM, Silver Sky Soft Services, Inc. < contactus@silverskysoft.com> wrote:> Hi, > I'm trying to create a snapshot on a specific disk by using diskspec > option. However, libvirt/virsh seems to ignore it and takes a snapshot of > all disks. Am I using this option incorrectly? > > In below examples, I'm trying to snapshot only vdb. However even vda is > getting snapshotted regardless of diskspec. Is this a known issue? > > I'm on CentOS 7.1, libvirtd (libvirt) 1.2.8, virsh 1.2.8 > > [root@localhost scripts]# virsh domblklist centos_nfs > Target Source > ------------------------------------------------ > vda /var/lib/libvirt/images/centos_nfs.SNAP_2015-08-07-081800 > vdb > /var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-081800 > hdc - > > [root@localhost scripts]# virsh snapshot-create-as --domain centos_nfs > --name SNAP_2015-08-07-090909 --no-metadata --disk-only --atomic --diskspec > vdb,snapshot=external > Domain snapshot SNAP_2015-08-07-090909 created > > [root@localhost scripts]# virsh domblklist centos_nfs > Target Source > ------------------------------------------------ > vda /var/lib/libvirt/images/centos_nfs.SNAP_2015-08-07-090909 > vdb > /var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-090909 > hdc - > > > [root@localhost scripts]# virsh snapshot-create-as --domain centos_nfs > --name SNAP_2015-08-07-101010 --no-metadata --disk-only --atomic --diskspec > vdb,snapshot=external,file=/var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-101010 > Domain snapshot SNAP_2015-08-07-101010 created > > [root@localhost scripts]# virsh domblklist centos_nfs > Target Source > ------------------------------------------------ > vda /var/lib/libvirt/images/centos_nfs.SNAP_2015-08-07-101010 > vdb > /var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-101010 > hdc - > > Thanks, > KiranK >
Eric Blake
2015-Aug-13 20:16 UTC
Re: [libvirt-users] virsh create snapshot not honoring diskspec?
On 08/07/2015 09:53 AM, Silver Sky Soft Services, Inc. wrote:> Hi, > I'm trying to create a snapshot on a specific disk by using diskspec > option. However, libvirt/virsh seems to ignore it and takes a snapshot of > all disks. Am I using this option incorrectly? > > In below examples, I'm trying to snapshot only vdb. However even vda is > getting snapshotted regardless of diskspec. Is this a known issue? > > I'm on CentOS 7.1, libvirtd (libvirt) 1.2.8, virsh 1.2.8 > > [root@localhost scripts]# virsh domblklist centos_nfs > Target Source > ------------------------------------------------ > vda /var/lib/libvirt/images/centos_nfs.SNAP_2015-08-07-081800 > vdb /var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-081800 > hdc - > > [root@localhost scripts]# virsh snapshot-create-as --domain centos_nfs > --name SNAP_2015-08-07-090909 --no-metadata --disk-only --atomic --diskspec > vdb,snapshot=externalThis command line did not give a diskspec for vda, so the action for vda defaults to whatever the <domain> XML says is default for that disk . Try giving: --diskspec vdb,snapshot=external --diskspec vda,snapshot=none to explicitly override the <domain> defaults for both disks at once. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Silver Sky Soft Services, Inc.
2015-Aug-13 21:51 UTC
Re: [libvirt-users] virsh create snapshot not honoring diskspec?
On Thu, Aug 13, 2015 at 1:16 PM, Eric Blake <eblake@redhat.com> wrote:> > On 08/07/2015 09:53 AM, Silver Sky Soft Services, Inc. wrote: > > Hi, > > I'm trying to create a snapshot on a specific disk by using diskspec > > option. However, libvirt/virsh seems to ignore it and takes a snapshot of > > all disks. Am I using this option incorrectly? > > > > In below examples, I'm trying to snapshot only vdb. However even vda is > > getting snapshotted regardless of diskspec. Is this a known issue? > > > > I'm on CentOS 7.1, libvirtd (libvirt) 1.2.8, virsh 1.2.8 > > > > [root@localhost scripts]# virsh domblklist centos_nfs > > Target Source > > ------------------------------------------------ > > vda /var/lib/libvirt/images/centos_nfs.SNAP_2015-08-07-081800 > > vdb /var/lib/libvirt/images/centos_nfs_storage.SNAP_2015-08-07-081800 > > hdc - > > > > [root@localhost scripts]# virsh snapshot-create-as --domain centos_nfs > > --name SNAP_2015-08-07-090909 --no-metadata --disk-only --atomic --diskspec > > vdb,snapshot=external > > This command line did not give a diskspec for vda, so the action for vda > defaults to whatever the <domain> XML says is default for that disk . > > Try giving: > --diskspec vdb,snapshot=external --diskspec vda,snapshot=none > to explicitly override the <domain> defaults for both disks at once. >Thanks Eric. That helped. Although minor note was the option was "snapshot=no" instead of "snapshot=none". Just to put in these archives, the working command: virsh snapshot-create-as --domain cento_os --name snap3 --no-metadata --disk-only --atomic --diskspec vdb,snapshot=no --diskspec vda,snapshot=external -KiranK
Possibly Parallel Threads
- Re: virsh create snapshot not honoring diskspec?
- Re: KVM incremental backup using CBT
- Re: KVM incremental backup using CBT
- Efficient live disk backup with active blockcommit : Failed 'block-commit': Could not reopen file: Permission denied
- Live Disk Backup with Active Blockcommit