Attach existing drive to VM

invgr

New Member
Jul 9, 2024
6
1
3
I had installed ProxMox, created a VM and then decided to reinstall ProxMox. I created a new VM with the same name as in the previous installation and now i want to attach the existing drive of the previous installation to the new vm. Is there a way to do that (preferably from the GUI)?

All this in a home lab i have created to try out proxmox so even if what i'm asking is not possible, i don't really care. :)
 
That depends on a lot of things. Can you share the output of lsblk -o+FSTYPE,LABEL,MODEL in a code block?
You can add existing storage via Datacenter > Storage > Add but what to select I cannot tell you yet.
 
Last edited:
That depends on a lot of things. Can you share the output of lsblk -o+FSTYPE,LABEL,MODEL in a code block?
You can add existing storage via Datacenter > Storage > Add but what to select I cannot tell you yet.
Wow, that was really fast! :)

I added the storage (type LVM) and i can see the drive with the virtual disk in it but i don't know how to attach it to the new VM.

Code:
NAME                              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS FSTYPE             LABEL MODEL
sda                                 8:0    0 232.9G  0 disk                                      Samsung SSD 840 EVO 250GB
├─sda1                              8:1    0  1007K  0 part                                    
├─sda2                              8:2    0     1G  0 part /boot/efi   vfat                    
└─sda3                              8:3    0 231.9G  0 part             LVM2_member            
  ├─pve-swap                      252:2    0     8G  0 lvm  [SWAP]      swap                    
  ├─pve-root                      252:3    0    68G  0 lvm  /           ext4                    
  ├─pve-data_tmeta                252:4    0   1.4G  0 lvm                                      
  │ └─pve-data                    252:6    0 137.1G  0 lvm                                      
  └─pve-data_tdata                252:5    0 137.1G  0 lvm                                      
    └─pve-data                    252:6    0 137.1G  0 lvm                                      
sdb                                 8:16   0 698.6G  0 disk                                      WDC WD7502ABYS-01A6B0
└─sdb1                              8:17   0 698.6G  0 part             VMFS_volume_member      
sdc                                 8:32   0   2.7T  0 disk                                      WDC WD30EZRX-00AZ6B0
└─sdc1                              8:33   0   2.7T  0 part             VMFS_volume_member      
sdd                                 8:48   0   2.7T  0 disk                                      WDC WD30EZRX-00MMMB0
└─sdd1                              8:49   0   2.7T  0 part             VMFS_volume_member      
sde                                 8:64   1  59.8G  0 disk             iso9660            PVE   Flash Drive FIT
├─sde1                              8:65   1   270K  0 part                                    
├─sde2                              8:66   1     8M  0 part             vfat                    
├─sde3                              8:67   1   1.5G  0 part             hfsplus            PVE  
└─sde4                              8:68   1   300K  0 part                                    
nvme0n1                           259:0    0 931.5G  0 disk             LVM2_member              Samsung SSD 990 EVO Plus 1TB
├─Samsung_EVO990-vm--100--disk--0 252:0    0    32G  0 lvm                                      
├─Samsung_EVO990-vm--100--disk--1 252:1    0     4M  0 lvm                                      
└─Samsung_EVO990-vm--100--disk--2 252:7    0    32G  0 lvm

I also can't delete a virtual disk.
 
Last edited:
If you don't have backups recreate the guest with the same 100 ID and then call pct rescan or qm rescan depending on the guest type to add the disks to it.
I also can't delete a virtual disk.
Can you elaborate on that?
 
Last edited: