I installed a fresh CentOS 7.2 guest (babybrighton) on my host (brighton), and then did this from brighton (where /dev/sdb is a physical device connected to brighton):
virsh attach-disk --persistent babybrighton /dev/sdb vdb
This worked fine and the disk shows up fine:
[root@babybrighton ~]# ls -l /dev/vdb* brw-rw----. 1 root disk 252, 16 Dec 4 20:37 /dev/vdb brw-rw----. 1 root disk 252, 17 Dec 4 20:37 /dev/vdb1 brw-rw----. 1 root disk 252, 18 Dec 4 20:37 /dev/vdb2 brw-rw----. 1 root disk 252, 19 Dec 4 20:37 /dev/vdb3
I now want
virsh snapshot-create-as to save babybrighton's state and
the data on /dev/vda*, the psuedo-disk I made when creating
However, I do not want
virsh snapshot-create-as to save the
state of /dev/vdb* on babybrighton, because /dev/sdb is an 8TB drive
on brighton that holds the babybrighton VM itself.
I do want the snapshot to remember that it's mapping /dev/vdb to the host's /dev/sdb, but that's the only information about /dev/vdb that the snapshot should have.
I've tried things like:
virsh snapshot-create-as --diskspec=vda,snapshot=internal --diskspec=vdb,snapshot=no babybrighton test1 "semi external disk" # result error: unsupported configuration: disk 'vdb' must use snapshot mode 'internal'
and many similar, but haven't found anything that works, or even if this is possible.
I need /dev/vdb available when babybrighton boots, so I can't just run a command after I log into babybrighton.
Is there any easy way to accomplish this?
If not, what's a good way to keep /dev/vda* synced so I can rollback when needed?
Does VirtualBox handle this better?