Ho wo add existing vms to new instalation

Thank you, so you can just create a VM configuration (make sure the VM 124 is NOT present):

Code:
cat > /etc/pve/qemu-server/124.conf <<EOF
boot: order=scsi0;net0
cores: 1
memory: 2048
meta: creation-qemu=7.1.0,ctime=1686246385
name: DNS-14-full-work
net0: virtio=B6:04:37:0A:84:C1,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: drive2:vm-124-disk-0,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=cfa56a33-d418-4521-9ef2-1e0af8ef7c5a
sockets: 1
vmgenid: 8753dffd-b51f-4645-acdd-e5ae2db32e98
EOF

and backup it as a test (don't start). If everything works AFTER the backup, restore the backup to a new VM. If everything works, you just move the disk to your final destination and everything should be fine. Repeat for each VM.
OK I tryed this but something goes wrong...
 

Attachments

  • 1.png
    1.png
    38.2 KB · Views: 7
  • 2.png
    2.png
    58.6 KB · Views: 7
Ok, some basics on lvm:

LVM has 3 tiers:

1. physical volumes (disks or partitions), display with pvs or pvdisplay

2. Volume Groops, a VG can span one or more Partitions / Disks, display with vgs or vgdisplay

3. Logical Volumes, display with lvs or lvdisplay

In your System the logical volumes are device files under /dev/mapper/*

They are Blockdevices and can be used like partitions or disks


In case of your Proxmox system, a logical volume is used as a disk image for your vm
On /dev/mapper/* looks like links - how to find where exaclly are my files with machines on my drive2?
 

Attachments

  • Bez tytułu.png
    Bez tytułu.png
    268.6 KB · Views: 1
Post Proxmox Storage Configuration in /etc/pve/storage.cfg and the Output of pvs, vgs and lvs
 
Post Proxmox Storage Configuration in /etc/pve/storage.cfg and the Output of pvs, vgs and lvs
Ok i understund that but if I add by GUI drive2 in my case with old machines shoutl I mount somehow by CLI LVM partition - this is magic to me ... I am new in that and do not wanna destoy the system, so I only see links to machines, I know there is a way to create empty machine and copy there a image but the main problem is do not know how from my drive2...
 
Please post the Output, you dou Not need to mount the logical volumes, they Just need to be there and active
 
So like you see drive2 is there, but machines has 7kb (so it is only a liks -I am think), like i sead before I only add this drive by GUI, no command pvcreate pgcreate etc...
i was tryed and mount this but:
root@mila:/dev/drive2# mount /dev/drive2 /mnt/nowy mount: /mnt/nowy: /dev/drive2 is not a block device. dmesg(1) may have more information after failed mount system call. mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload. root@mila:/dev/drive2#
 

Attachments

  • Bez tytułu.png
    Bez tytułu.png
    225.3 KB · Views: 0
I cannot help you if you do not post the info i require, namely the output of pvs, vgs and lvs commands, and the content of /etc/pve/storage.cfg, this is the last time i will write this
 
OK, ok that is oput of this file:
root@mila:~# cat /etc/pve/storage.cfg dir: local path /var/lib/vz content backup,iso,vztmpl lvmthin: local-lvm thinpool data vgname pve content images,rootdir cifs: QNAP path /mnt/pve/QNAP server 10.10.0.2 share prox content iso,rootdir,images,backup,vztmpl,snippets smbversion 2.1 username przemyslaw lvm: Drive2 vgname drive2 content rootdir,images nodes mila shared 1 root@mila:~#
 
Ok, this are your storages,

TYPE: NAME

So the Name of the Storage is Drive2, the Type is lvm.

The name of the volume group is drive2.

If you type vgs or vgdisplay (like i told you) you will see you will see this volume group, pvs or pvdisplay will show you the physical volumes and
lvs or lvdisplay will show you your logical volumes.

/dev/drive2/vm-102-disk-0 or similar will be the name of the Logical Volume that is your Disk image for the vm 102

fdisk -l /dev/drive2/vm-102-disk-0 will show you the partitions on this disk.

You do not need to mount this on the host, look at the example vm-config LnxBil has posted,
the line

scsi0: drive2:vm-124-disk-0,iothread=1,size=32G

will make the LV show up as first disk in your vm
 
Last edited:
Ok, I see a litle, I was tryed LnxBil solution but there is error "drive2 does not exist" you can see that few post abowe
 
If you d not post the output of the

pvs

vgs

lvs

commands right now, as i asked you to do since the beginning of this thread i cannot help you any more
 
outputs

root@mila:~# pvs PV VG Fmt Attr PSize PFree /dev/nvme0n1p3 pve lvm2 a-- <930.51g 16.00g /dev/sda1 drive2 lvm2 a-- <1.82t 1.41t root@mila:~# vgs VG #PV #LV #SN Attr VSize VFree drive2 1 13 0 wz--n- <1.82t 1.41t pve 1 9 0 wz--n- <930.51g 16.00g root@mila:~# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert vm-104-disk-0 drive2 -wi-a----- 32.00g vm-105-disk-0 drive2 -wi-a----- 32.00g vm-106-disk-0 drive2 -wi-a----- 32.00g vm-107-disk-0 drive2 -wi-a----- 32.00g vm-108-disk-0 drive2 -wi-a----- 32.00g vm-109-disk-0 drive2 -wi-a----- 32.00g vm-110-disk-0 drive2 -wi-a----- 32.00g vm-111-disk-0 drive2 -wi-a----- 32.00g vm-113-disk-0 drive2 -wi-a----- 32.00g vm-117-disk-0 drive2 -wi-a----- 32.00g vm-118-disk-0 drive2 -wi-a----- 32.00g vm-119-disk-0 drive2 -wi-a----- 32.00g vm-124-disk-0 drive2 -wi-a----- 32.00g data pve twi-aotz-- 794.30g 23.14 0.81 root pve -wi-ao---- 96.00g swap pve -wi-ao---- 8.00g vm-100-disk-0 pve Vwi-a-tz-- 32.00g data 96.21 vm-101-disk-0 pve Vwi-a-tz-- 32.00g data 93.65 vm-102-disk-0 pve Vwi-a-tz-- 32.00g data 96.14 vm-103-disk-0 pve Vwi-a-tz-- 32.00g data 96.19 vm-104-disk-0 pve Vwi-a-tz-- 32.00g data 96.03 vm-105-disk-0 pve Vwi-a-tz-- 32.00g data 96.17 root@mila:~#
 
Sorry, but this is really frustrating
outputs

root@mila:~# pvs PV VG Fmt Attr PSize PFree /dev/nvme0n1p3 pve lvm2 a-- <930.51g 16.00g /dev/sda1 drive2 lvm2 a-- <1.82t 1.41t root@mila:~# vgs VG #PV #LV #SN Attr VSize VFree drive2 1 13 0 wz--n- <1.82t 1.41t pve 1 9 0 wz--n- <930.51g 16.00g root@mila:~# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert vm-104-disk-0 drive2 -wi-a----- 32.00g vm-105-disk-0 drive2 -wi-a----- 32.00g vm-106-disk-0 drive2 -wi-a----- 32.00g vm-107-disk-0 drive2 -wi-a----- 32.00g vm-108-disk-0 drive2 -wi-a----- 32.00g vm-109-disk-0 drive2 -wi-a----- 32.00g vm-110-disk-0 drive2 -wi-a----- 32.00g vm-111-disk-0 drive2 -wi-a----- 32.00g vm-113-disk-0 drive2 -wi-a----- 32.00g vm-117-disk-0 drive2 -wi-a----- 32.00g vm-118-disk-0 drive2 -wi-a----- 32.00g vm-119-disk-0 drive2 -wi-a----- 32.00g vm-124-disk-0 drive2 -wi-a----- 32.00g data pve twi-aotz-- 794.30g 23.14 0.81 root pve -wi-ao---- 96.00g swap pve -wi-ao---- 8.00g vm-100-disk-0 pve Vwi-a-tz-- 32.00g data 96.21 vm-101-disk-0 pve Vwi-a-tz-- 32.00g data 93.65 vm-102-disk-0 pve Vwi-a-tz-- 32.00g data 96.14 vm-103-disk-0 pve Vwi-a-tz-- 32.00g data 96.19 vm-104-disk-0 pve Vwi-a-tz-- 32.00g data 96.03 vm-105-disk-0 pve Vwi-a-tz-- 32.00g data 96.17 root@mila:~#
So yo have 2 volume groups, pve and drive2.
pve is almost full, see VFree 16g in vgs.

data is used for lvmthin, which i am not very familliar with.

root and swap are used for filesystems on your host.

Please show the config of lxc 104,

cat /etc/pve/lxc/104.conf
 
Last edited:
there is nothing
root@mila:~# cat /etc/pve/lxc/104.conf cat: /etc/pve/lxc/104.conf: No such file or directory root@mila:~# cat /etc/pve/lxc/104.conf cat: /etc/pve/lxc/104.conf: No such file or directory root@mila:~# cat /etc/pve/lxc/104.conf cat: /etc/pve/lxc/104.conf: No such file or directory root@mila:~# cd /etc/pve/lxc root@mila:/etc/pve/lxc# ls root@mila:/etc/pve/lxc# ls -l total 0 root@mila:/etc/pve/lxc# ^C root@mila:/etc/pve/lxc#
 

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!