move hdd.raw from vm to vm

robytump

New Member
Oct 5, 2020
10
0
1
48
hi I need to make a move via shell: (I have a vm191 with hhd sata0: local-lvm: vm-191-disk-0, size = 10G & sata1: storage: vm-191-disk-0, size = 1200G, and a vm102 with hhd sata0: local-lvm: vm-102-disk-0, size = 10G!

from vm191 hhd "sata1: storage: vm-191-disk-0, size = 1200G" I wanted to move to "vm102 and rename (sata1: storage: vm-102-disk-0, size = 1200G)", after detaching " hhd vm-191 "what commands to move and rename by attacking hhd?
Thank you
 
ok
with command: cd / etc / pve / local / qemu-server and nano vmid.conf i change the disks of the vm!

Now it rename "sata1: storage: vm-191-disk-0, size = 1200G" how to rename the .raw file "sata1: storage: vm-102-disk-0, size = 1200G" ??

Thank you

cd /dev/pve
da vm numero 105 a vm numero 100:

mv vm-105-disk-1 vm-100-disk-1
 
Last edited:
ok
with command: cd / etc / pve / local / qemu-server and nano vmid.conf i change the disks of the vm!

Now it rename "sata1: storage: vm-191-disk-0, size = 1200G" how to rename the .raw file "sata1: storage: vm-102-disk-0, size = 1200G" ??

Thank you
I think that depends on the underlaying storage. For files just a mv /path/to/file/oldname /path/to/file/newname. For datasets/zvols a zfs rename YourPool/oldname YourPool/newname, for LVs a lvrename /dev/yourVg/oldname yourVg/newname, ...
 
"storage" and "local-lvm" are block storages without any filesystem. They can't store any files. Just block storages in form of LVs. Only "local" can store files and then you usually should have virtual disk images as qcow2 and not as raw files.