Linux

How to Rename a VPS (VM) Disk on ZFS Storage in Proxmox

When you restore a VM on Proxmox that uses ZFS storage, the virtual disk is stored as a ZFS volume (ZVOL).
By default, Proxmox names these disks like:

rpool/vm-101-disk-0

If you want to rename that disk (for example, to rpool/vm-101-rootdisk), follow these steps.

Step 1. Check the Current Disk Name

Run:

qm config

Example:

qm config 101

Output example:

bootdisk: scsi0
scsi0: rpool:vm-101-disk-0,size=32G

That means the disk’s ZFS volume is:

rpool/vm-101-disk-0

Step 2. Stop the VM

Always stop the VM before modifying ZFS volumes:

qm stop

Example:

qm stop 101

Step 3. Rename the ZFS Volume

Use the zfs rename command:

zfs rename rpool/vm-101-disk-0 rpool/vm-101-rootdisk

Tip: The left side is the current name, the right side is the new name.

You can confirm the rename worked by running:

zfs list

Step 4. Update the Proxmox VM Configuration

Next, edit the VM’s config file manually:

nano /etc/pve/qemu-server/101.conf

Find the disk line:

scsi0: rpool:vm-101-disk-0,size=32G

Change it to match the new ZFS volume name:

scsi0: rpool:vm-101-rootdisk,size=32G

Save the file and exit.

Step 5. Start the VM Again

Now start the VM:

qm start <vmid>

Example:

qm start 101

Step 6. Verify

qm config 101

You should see the disk updated to your new name:

scsi0: rpool:vm-101-rootdisk,size=32G

Notes & Warnings

  • Always stop the VM before renaming ZFS volumes.

  • If you rename a dataset while the VM is running, it may cause I/O errors or corruption.

  • Renaming only changes the dataset name, not its location or data.

  • For ZFS pools other than rpool, replace it accordingly (e.g. zfs-pool1/vm-200-disk-0).

  • You can also rename LXC disks in the same way (config file is in /etc/pve/lxc/<ctid>.conf).

 

Thanks for visit my website