change disk owner

abranca

Well-Known Member
Mar 6, 2017
47
5
48
37
hello everyone.
I have a problem with disk permissions.

tonight one of the nodes stopped working and i had to restore the backup of the virtual machines.

unfortunately the backup was from the day before but i had active replication from node 1 to node 2.

I then restored my virtual machine 101 which has now become 115.
To retrieve the most up-to-date information I modified the conf file of the machine and set, instead of the new disk 115, the disk 101.

Now, however, if I try to migrate machine 101 to a new node it tells me that it cannot because disk 101 because it is owned by 101.
What can I do?
I also have a second machine in the same condition and I necessarily need to use these disks because they are more up to date.

Thanks to all

Migrate Log:
Code:
2021-06-20 12:24:55 shutdown CT 115
2021-06-20 12:25:02 starting migration of CT 115 to node 'kve3' (xxx.xxx.xxx.xxx)
2021-06-20 12:25:02 found local volume 'local-zfs:subvol-101-disk-0' (in current VM config)
2021-06-20 12:25:02 found local volume 'local-zfs:subvol-115-disk-0' (via storage)
2021-06-20 12:25:02 can't migrate local volume 'local-zfs:subvol-101-disk-0': owned by other guest (owner = 101)
2021-06-20 12:25:02 ERROR: can't migrate CT - check log
2021-06-20 12:25:02 aborting phase 1 - cleanup resources
2021-06-20 12:25:02 start final cleanup
2021-06-20 12:25:02 start container on source node
2021-06-20 12:25:04 ERROR: migration aborted (duration 00:00:09): can't migrate CT - check log
TASK ERROR: migration aborted
 
The naming scheme of the disks is important for PVE - attaching a disk that has a different VMID in it's name is not a supported configuration.

Easy solution: rename the disk. Assuming you're using zfs, it's as simple as zfs rename local-zfs/subvol-101-disk-0 local-zfs/subvol-115-disk-0 (and then update the config accordingly of course). Note that currently you seem to also have a local disk called 115, presumably created when you did the restore - if you don't need it (make sure you don't need it!) you can just remove it with zfs destroy, alternatively change the rename command to 'disk-1' at the end and add it that way to avoid conflict.
 

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!