Cannot find VM disks or Local-LVM

eMikey

Member
Jun 9, 2019
4
0
21
44
Hello,

I have read as many posts and articles as I can but still haven't been able to find a solution.

I have installed Proxmox and created a VM but I cannot find the qcow2 or raw image.

root@hs1:~# find / -name "*.qcow2"
root@hs1:~# find / -name "*.raw"

The disk and partition information is as follows:

root@hs1:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 pve lvm2 a-- 931.01g 15.99g

root@hs1:~# cd /dev/sda3
-bash: cd: /dev/sda3: Not a directory

root@hs1:~# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 4 0 wz--n- 931.01g 15.99g

root@hs1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotz-- 794.79g 1.47 0.11
root pve -wi-ao---- 96.00g
swap pve -wi-ao---- 8.00g
vm-100-disk-0 pve Vwi-a-tz-- 120.00g data 9.72

root@hs1:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 9.0M 1.6G 1% /run
/dev/mapper/pve-root 94G 89G 191M 100% /
tmpfs 7.8G 43M 7.8G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/sda2 511M 304K 511M 1% /boot/efi
/dev/fuse 30M 16K 30M 1% /etc/pve

I am trying to migrate our infrastructure from Hyper-V to Proxmox and need to find the VM image so I can overwrite it with the migrated vhdx VM.

The one location I saw coming up a few times is empty:

root@hs1:~# ls /var/lib/vz/images
root@hs1:~#

and this (symlink) is also empty:

root@hs1:~# ls /dev/pve
root swap vm-100-disk-0
root@hs1:~# ls /dev/pve/vm-100-disk-0
/dev/pve/vm-100-disk-0
root@hs1:~#

The VM (Win10) I created runs perfectly so it must exist somewhere which is why this is so confusing...
 

Attachments

  • 1.jpg
    1.jpg
    122.8 KB · Views: 29
Your image is an LV, as you can see with the cmd 'lvs'.
If this is an new infrastructure I would recommend to use LVM-Thin or shared storage like CEPH.
 
Hi, thanks for the reply. Does that mean that it's a *.lv file? If so, where would they usually reside?

How do I set up a LVM-Thin volume? Do I have to re-install?

Also, would you recommend installing CEPH on separate storage servers and have the Proxmox servers as separate hosts from the storage?

Finally, which would you go for LVM-Thin or CEPH?

Many thanks! :)
 
I can't seem to see where it could be anywhere:

root@hs1:~# lsblk /dev/sda
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part /boot/efi
└─sda3 8:3 0 931G 0 part
├─pve-swap 253:0 0 8G 0 lvm [SWAP]
├─pve-root 253:1 0 96G 0 lvm /
├─pve-data_tmeta 253:2 0 8.1G 0 lvm
│ └─pve-data-tpool 253:4 0 794.8G 0 lvm
│ ├─pve-data 253:5 0 794.8G 0 lvm
│ └─pve-vm--100--disk--0 253:6 0 120G 0 lvm
└─pve-data_tdata 253:3 0 794.8G 0 lvm
└─pve-data-tpool 253:4 0 794.8G 0 lvm
├─pve-data 253:5 0 794.8G 0 lvm
└─pve-vm--100--disk--0 253:6 0 120G 0 lvm
root@hs1:~#
 
It looks to me as if you have already created it on a thin pool. In your "lvs" output it shows:

Code:
data pve twi-aotz-- 794.79g 1.47 0.11
root pve -wi-ao---- 96.00g
swap pve -wi-ao---- 8.00g
vm-100-disk-0 pve Vwi-a-tz-- 120.00g data 9.72

The last line is your VM's disk. It is going to show up as a block device under /dev/pve. Not a file, but a block device. Look again at the output of "lsblk". Your volume is right there. It is a logical block device, not a regular file.

If you have a RAW image file from your previous hypervisor (NOT a qcow2 or vmdk or anything else), then you can use 'dd if=old-file.raw of=/dev/pve/vm-100-disk0' or something like that to copy the disk image to the disk device. If your image is not a raw copy of what would be on a real hard disk then you will need to convert it somehow. I'm not sure how to do that for Hyper-V files, never having used it.
 
Thank you for your replies guys! :)

I will have a look at this when I get home as this is currently in my home lab to iron out any issues before I begin migrating the live infrastructure at work.

Once I have the solution I will post on here for others future reference.

Thanks again and all the best! :)
 

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!