How to add a hard disk with vm image to a new PVE?

wolfboy

Member
Dec 5, 2022
10
5
8
My Machine has two hard disk, one called "disk A" for pve system and a small thinlvm , and another larger one "disk B" has a single lvm named "VM".
The pve has broken and reinstalled, the old pve and thinlvm in "disk A" has lost. and /etc/pve , vm configuration also lost.
So I want attach "disk B", and import all the vm file include snap,
Now I do: datacenter- storage- add- lvm , and import the "VM" in disk B ,
And then go to my node- VM- vmdisk ,but nothing there.
So how should I do next? how can I see the vmdisk list?
Thanks in advance.
1670257743236.png
 
Last edited:
Are you sure your "disk B" was a LVM and not a LVM-Thin? What is lvs reporting?
 
Are you sure your "disk B" was a LVM and not a LVM-Thin? What is lvs reporting
Thank you, you are right , I import as LVM-thin and the image list appeared.
1670302607673.png1670302640070.png


Now a now question is , once I create a new vm with id 101, the vm-101-disk-* did not appeae in the 101 vm hardware list as a disk unreferenced, the only way is edit vm config file right? or need to do someting else that I can see it in the list?
and if I delete the vm 101 and check “Destroy unreferenced disks owned by guest”,the all " vm-101-disk-* " deleted,(I used vm 100 tested^^)。
and also how to include the snap shot together with vm can be operate?