hi
I'm migrating a disk image (scsi) from one vm to another, it's just a filesystem on it with configuration files basically.
The way I did it was like below, and it works. But after a reboot of the server, the disk image renamed itself back to the old name and therefore is no longer attached to the new vm. I'm guessing there might be a configuration file somewhere which keeps track of this?
How can I move a disk image between virtual machines end keep it consistent between reboots?
The procedure I did is mostly taken from this guide: https://pve.proxmox.com/wiki/Moving_disk_image_from_one_KVM_machine_to_another
Moving vm-105-disk-1 from vm number 105 to vm number 100:
"Rename" disk
* Removing config line "scsi1: local-lvm:vm-105-disk-1,size=50G" from /etc/pve/qemu-server/105.conf
Update configuration file for vm-100:
I'm migrating a disk image (scsi) from one vm to another, it's just a filesystem on it with configuration files basically.
The way I did it was like below, and it works. But after a reboot of the server, the disk image renamed itself back to the old name and therefore is no longer attached to the new vm. I'm guessing there might be a configuration file somewhere which keeps track of this?
How can I move a disk image between virtual machines end keep it consistent between reboots?
The procedure I did is mostly taken from this guide: https://pve.proxmox.com/wiki/Moving_disk_image_from_one_KVM_machine_to_another
Moving vm-105-disk-1 from vm number 105 to vm number 100:
Code:
root@homelab:/dev/pve# ls -l
lrwxrwxrwx 1 root root 7 May 10 16:44 root -> ../dm-3
lrwxrwxrwx 1 root root 7 May 10 16:44 swap -> ../dm-2
lrwxrwxrwx 1 root root 8 May 10 16:46 vm-100-cloudinit -> ../dm-15
lrwxrwxrwx 1 root root 8 May 10 16:46 vm-100-disk-0 -> ../dm-14
(...)
lrwxrwxrwx 1 root root 8 May 10 16:44 vm-105-cloudinit -> ../dm-12
lrwxrwxrwx 1 root root 8 May 10 16:44 vm-105-disk-0 -> ../dm-11
lrwxrwxrwx 1 root root 8 May 10 16:44 vm-105-disk-1 -> ../dm-13 <---Move this to vm 100
"Rename" disk
Code:
root@homelab:/dev/pve# mv vm-105-disk-1 vm-100-disk-1
* Removing config line "scsi1: local-lvm:vm-105-disk-1,size=50G" from /etc/pve/qemu-server/105.conf
Update configuration file for vm-100:
Code:
root@homelab:/dev/pve# cat /etc/pve/qemu-server/100.conf
scsi0: local-lvm:vm-100-disk-0,size=32G
scsi1: local-lvm:vm-100-disk-1,size=50G