EFI/TPM disk order changed after clone - is this a bug and where should I report it?

Replicant

Member
May 31, 2021
10
3
8
41
I set up a Windows VM with EFI disk and TPM. After setup, the disk order was
1. Boot HDD (vm-XXX-disk-0)
2. EFI Disk (vm-XXX-disk-1)
3. TPM Disk (vm-XXX-disk-2)

During cloning, the EFI disk is always cloned first in the task viewer, the order then becomes:
1. EFI Disk (vm-XXX-disk-0)
2. Boot HDD (vm-XXX-disk-1)
3. TPM Disk (vm-XXX-disk-2)

This has no effect on the usage of the VM but bothers my tech-OCD. So what I did was I used `zfs rename` to rename the disks to the correct order (storage is zfs)
disk-0 -> disk-tmp
disk-1 -> disk-0
disk-tmp -> disk-1

Then I modify the vm .conf file to reflect this.
 
I'm not sure but I think the clone operation goes down the vm's .conf file (whose options are alphabetical) line by line and "efidisk0" is followed by "scsi0" then "tpmstate0", so that's why efidisk0 is cloned first. I tested this by moving scsi0 to the top of the .conf file and cloning, which didn't change the results.

Without speaking specifically of proxmox, a clone seems like it should be identical to the original, whatever arbitrary order the disks are in, whether user defined or proxmox defined, should be preserved.

Either it should either check what the original disk order was and clone in that order or the vm setup process should set up disks in alphabetical order that they will appear in the .conf file. Because right now the vm setup creates disk in a certain order, scsi0 then efidisk0, at least for my choice of disk controller type, which is not the alphabetical order that cloning does (again, I think it's alphabetical)
 
Last edited:
A VM clone is not the same thing as block device clone. You have things that are different:
- vm name
- vm id
- mac address
- creation time
- smbios uuid
- vmgenid
- optionally:
different cluster host
different storage
new cloudinit

If a proxmox-internal disk ID, which is not exposed to the guest in any way, is important to you and feel deserves development time - feel free to file a bug in https://bugzilla.proxmox.com/ , or even better write a patch yourself and submit it to the repo https://pve.proxmox.com/wiki/Developer_Documentation


Blockbridge: Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

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!