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

Jarvar

Active Member
Aug 27, 2019
317
10
38
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!