Unable to find vm image files in "/var/lib/vz/images"

pranit

Member
Oct 10, 2019
28
0
6
34
Where are the VMs Images are stored on Proxmox ? As it should be under
/var/lib/vz/images/<VMID>

But I have nothing inside images, even though I have 2 running VMs on my proxmox

showing output of following which may need you to understand problem

1] #pvesm path local:100/vm-100-disk-0.raw
/var/lib/vz/images/100/vm-100-disk-0.raw

2] # ls -la /var/lib/vz/images/
total 8
drwxr-xr-x 2 root root 4096 Nov 25 20:50 .
drwxr-xr-x 5 root root 4096 Mar 25 14:52 ..

3] #lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part
└─sda3 8:3 0 1.8T 0 part
├─pve-root 253:0 0 96G 0 lvm /
├─pve-swap 253:1 0 8G 0 lvm [SWAP]
├─pve-data_tmeta 253:2 0 15.8G 0 lvm
│ └─pve-data-tpool 253:4 0 1.7T 0 lvm
│ ├─pve-data 253:5 0 1.7T 0 lvm
│ ├─pve-vm--100--disk--0 253:6 0 200G 0 lvm
│ └─pve-vm--101--disk--0 253:7 0 200G 0 lvm
└─pve-data_tdata 253:3 0 1.7T 0 lvm
└─pve-data-tpool 253:4 0 1.7T 0 lvm
├─pve-data 253:5 0 1.7T 0 lvm
├─pve-vm--100--disk--0 253:6 0 200G 0 lvm
└─pve-vm--101--disk--0 253:7 0 200G 0 lvm
sr0 11:0 1 1024M 0 rom


4] #cat /etc/pve/storage.cfg
dir: local
path /var/lib/vz
content iso,vztmpl,backup

lvmthin: local-lvm
thinpool data
vgname pve
content rootdir,images
 
hi,

1] #pvesm path local:100/vm-100-disk-0.raw
/var/lib/vz/images/100/vm-100-disk-0.raw
the input for this is only verified based on the volume name, if that's not how your disk is called it will output wrongly.

i would guess your disks are likely in the local-lvm.

can you check the output of qm config VMID? there you will see in the configuration where the disks are.

you can also go on the GUI: Storage -> select your storage -> VM Images -> you should see a listing of the VM disk images
 
hi,


the input for this is only verified based on the volume name, if that's not how your disk is called it will output wrongly.

i would guess your disks are likely in the local-lvm.

can you check the output of qm config VMID? there you will see in the configuration where the disks are.

you can also go on the GUI: Storage -> select your storage -> VM Images -> you should see a listing of the VM disk images
ok here is the output of

#qm config 100
boot: order=scsi0;ide2
cores: 2
ide2: local:iso/ubuntu-16.04.1-server-amd64.iso,media=cdrom,size=667M
memory: 4096
name: ubuntu-test
net0: virtio=16:01:4C:87:28:28,bridge=vmbr1,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-0,size=200G
scsihw: virtio-scsi-pci
smbios1: uuid=e5910fa6-b27a-4501-a702-e49cd5ec2f2a
sockets: 2
vmgenid: 305a83ca-e4cf-4280-a973-761ad476caf3


Also find screenshots from GUI
 

Attachments

  • Screenshot 2021-03-30 134701.png
    Screenshot 2021-03-30 134701.png
    30.3 KB · Views: 19
  • Screenshot 2021-03-30 134735.png
    Screenshot 2021-03-30 134735.png
    23.5 KB · Views: 17
scsi0: local-lvm:vm-100-disk-0,size=200G
so your disks are on the local-lvm device like i guessed (can also be seen on your screenshot). but what is your question?
 
ok here is the output of

#qm config 100
boot: order=scsi0;ide2
cores: 2
ide2: local:iso/ubuntu-16.04.1-server-amd64.iso,media=cdrom,size=667M
memory: 4096
name: ubuntu-test
net0: virtio=16:01:4C:87:28:28,bridge=vmbr1,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-0,size=200G
scsihw: virtio-scsi-pci
smbios1: uuid=e5910fa6-b27a-4501-a702-e49cd5ec2f2a
sockets: 2
vmgenid: 305a83ca-e4cf-4280-a973-761ad476caf3


Also find screenshots from GUI
So since its Local-lvm , how can i find those vm image files on server? like if i have to take backup of all vm images , from which locations i ll get those *.raw images of vm? as default location "/var/lib/vz/images" shows null.
 
Last edited:
if you want to make a backup, you can use the built-in backup functionality, which will create an archive file with the VM disk and the configuration inside. this can then be restored from the same menu (VM -> Backup). if you want you can also download the backup archive file with SCP or other file transfer means.
 
if you want to make a backup, you can use the built-in backup functionality, which will create an archive file with the VM disk and the configuration inside. this can then be restored from the same menu (VM -> Backup). if you want you can also download the backup archive file with SCP or other file transfer means.
Ok thank you, but may I know why can't I see vm .raw files in it's default location where as uploaded iso files can be seen in /var/lib/vz/template/iso
 
Ok thank you, but may I know why can't I see vm .raw files in it's default location where as uploaded iso files can be seen in /var/lib/vz/template/iso
probably because you chose the local-lvm storage for your VMs as you were creating them. if you move the disks to local storage then you should see them. you can move the disks in the VM -> Hardware menu.

also make sure that the local storage allows disk images: Datacenter- > Storage -> local -> double click -> Content -> Disk images
 
  • Like
Reactions: pranit
probably because you chose the local-lvm storage for your VMs as you were creating them. if you move the disks to local storage then you should see them. you can move the disks in the VM -> Hardware menu.

also make sure that the local storage allows disk images: Datacenter- > Storage -> local -> double click -> Content -> Disk images
yes , im aware of the fact after changing storage to local while VM creation will sort the issue but the size of this local storage is just around 93.99GB . can i increase this local volume?? OR how can we set path to local-lvm as like path to local storage is set.
 

Attachments

  • local storage.png
    local storage.png
    31 KB · Views: 6
  • path.png
    path.png
    27.9 KB · Views: 6
this is confusing , there is no possible to select local during the VM creation we can only select local-xxx in my case called local-zfx .....

also where can i find this storage ..... after failed to restore backups i manage to extract backup.vma and get 2 file

qemu-server.conf and tmp-disk-drive-scsi0.raw
its possible to attach this disk to new vm and how
 
You can import the disk with qm importdisk. You can probably also copy the conf file to /etc/pve/qemu-server/<vmid>.conf
 
Last edited:
Dear Ph)x thx for reply can you pls help me with extact command as i am getting error


root@nyc:~# qm importdisk 105 /var/backups/23/tmp-disk-drive-scsi0.raw


400 not enough arguments


qm importdisk <vmid> <source> <storage> [OPTIONS]


root@nyc:~# qm importdisk 105 /var/backups/23/tmp-disk-drive-scsi0.raw xxxxx
 
Thank you for reply i still could not made it i try many ways all times error

maybe i am doing something wrong let me explain
i had BK from other server this bk failed to be restored by GUI so i extracted and i got this 2 files qemu-server.conf and tmp-disk-drive-scsi0.raw

then i created new VM centos 7 same as old one the new VM has in Hardware menu show scsi0: local-zfs:vm-104-disk-0,size=320G

so now when i try to

qm importdisk 104
/var/backups/23/tmp-disk-drive-scsi0.raw scsi0: local-zfs:vm-104-disk-0,size=320G
i get this error

400 too many arguments


qm importdisk <vmid> <source> <storage> [OPTIONS]

when i try


root@nyc:/rpool/ROOT/pve-1# qm importdisk 104 /var/backups/23/tmp-disk-drive-scsi0.raw vm-104-disk-0


storage 'vm-104-disk-0' does not exist

when i try


root@nyc:/rpool/ROOT/pve-1# qm importdisk 104 /var/backups/23/tmp-disk-drive-scsi0.raw vm-104


storage 'vm-104' does not exist

i am really lost please help
 
You can only type the name of the storage there (local-zfs) not more.
The disk gets imported as an unused disk (scsi1) and you can then replace the disk 0 with it.
 
thank you very much but i guess proxmox document they should think how to make it easy

now import success but could not boot many error in kernel

Starting Dracut Emergency Shell...
Warning: /dev/root does not exist
Generating "/run/initramfs/rdsosreport.txt"
Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt to a USB stick or /boot
after mounting them and attach it to a bug report.
 
Did you set the new disk as boot disk? Maybe boot a live system and try to solve the boot issues from there.
 
thank yo for the help .... do you know where the disk file are stored now or how can i find them at least if i can access the files will move them by scp to new Vm witch already run centos 7 with DA
 

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!