Is it possible to clone a single zfs vm-disk from a VM which contains more than one disk?

Jarvar

Well-Known Member
Aug 27, 2019
317
10
58
I'd like to just copy or clone a zfs disk from a VM which contains two or more disks, such as vm-100-disk-0 and vm-100-disk-1.

My usual method is:
1. Backup vmid 100
2. Restore vmid 100 to a different ID #
3. Detach the disk I want from the vm.
4. Shell zfs list
5. zfs rename vm-100-disk-1 to new vm disk
6. Edit /etc/pve/qemu-server/vmid.conf with the new disk name for the corresponding vmid
7. qm rescan
Another way is to skip the editing of .conf file and just doing a qm rescan and using the gui to add the disk which shows up as unattached with the correct vmid.

Is there a way to just copy the disk I want from the vm instead of going through the first half of my process?
Any assistance would be much appreciated.
Thank you.