Importing vmdk into proxmox 6.2

dhoskinson

New Member
Oct 15, 2020
4
0
1
62
I have a new install of proxmox 6.2 and attempting to convert 2 physical application servers to virtual servers.

I used vmware converter to send them to a vmware 6.7 machine and am then using scp to copy them to the proxmox box

I must be misunderstanding something as i am getting no space on device errors. It copies for 2 hours till it is 100% then gives the no space left on device error.

appsrv12-flat.vmdk 100% 932GB 99.7MB/s 2:39:27
/var/lib/vz/images//appsrv12-flat.vmdk: No space left on device
root@hasrv2:/var/lib/vz/images#

what i am left with is a 91 GB vmdk file in /var/lib/vz/images

More info, the original server has sda as 930 GB and sda as 930 GB so there are 2 vmdk's to copy

The proxmox server has 3.5 TB of space and there is nothing on it yet, so it is not out of space.

Where can i check and see whats going on?

Thank you
 
What command do you use? What is the output of the following?
Code:
pvesm status?
 
root@hasrv1:~# pvesm status
Name Type Status Total Used Available %
local dir active 98559220 4132756 89376916 4.19%
local-lvm lvmthin active 3590189056 5026264 3585162791 0.14%

When i create new basic vm's they get created in /dev/pve, however instructions i have say to copy them to /var/lib/vz/images, which is empty. Is this the correct location for the transfer?

Thanks for the command, i will make note of it, and start getting to know the commands
 
Your Proxmox VE server has two storages:
  1. local: 93 GiB = 99 GB
  2. local-lvm: 3423 GiB = 3675 GB
That's what you see in the pvesm output. Those storages are defined in /etc/pve/storage.cfg, so you can see their definition by running
Code:
cat /etc/pve/storage.cfg
There you see, that /var/lib/vz belongs to your storage local. You can also see something useful if you run
Code:
df -h /var/lib/vz
It should also say size about 93G and 85G available.

So, as far as I see it, you're trying to copy a nearly 932GB file to a place with about 85GB free storage. What is not out of space is your LVM storage local-lvm. You might get it directly to the LVM storage. It might be less headache to copy the images to some network storage or external disk that you can mount on Proxmox VE and run qm importdisk with that storage as source path and the LVM storage as parameter. That command handles the correct renaming and places for you then.
 
Last edited:
Ok i am making progress but getting more confused by the second. We have a existing proxmox cluster i inherited. Storage seems to be /var/lib/vz/images. If i create new vm's they show up there.

df -h
/dev/mapper/pve-data 5.4T 2.2T 2.9T 44% /var/lib/vz

This cluster is running 4.4-18

My new setup is running 6.2.1 and doing a regular install, now it seems that data is stored in /dev/pve? Also this space doesn't seem to show in df

root@hasrv2:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 126G 1.1G 125G 1% /dev
tmpfs 26G 11M 26G 1% /run
/dev/mapper/pve-root 94G 3.7G 86G 5% /
tmpfs 126G 43M 126G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 126G 0 126G 0% /sys/fs/cgroup
/dev/sda2 511M 324K 511M 1% /boot/efi
/dev/fuse 30M 16K 30M 1% /etc/pve
tmpfs 26G 0 26G 0% /run/user/0

This should be about 3.5 TB of space. Is this a change on how proxmox works?

I have converted my vmdk above to /dev/pve using the following command
qemu-img convert -p -O gcow2 /media/usb-drive/appsrv12-flat.vmdk /dev/pve/vm-100-disk-0 but i seem stuck after that. I read post where i just delete the default hard drive for the vm-100 that i created and the new one would magically appear, but its now. Im pretty sure i am close if someone could help

Thanks
 
As side note, in the forum editor there is a code function in the toolbar 1603265971546.png which makes your code snippets easier to read :)

Please compare the output of
Code:
cat /etc/pve/storage.cfg
on both your clusters.
/var/lib/vz is the location of the default storage "local" which is likely to exist on both clusters.
When you create a VM, you can always select one of the defined storages. In the screenshot, I selected the storage "local".

1603266178678.png

My /etc/pve/storage.cfg looks contains this:
Code:
dir: local
    path /var/lib/vz
    content snippets,vztmpl,rootdir,backup,iso,images
    maxfiles 2
    shared 0
You can see, that the storage local is on path /var/lib/vz



I have converted my vmdk above to /dev/pve using the following command
qemu-img convert -p -O gcow2 /media/usb-drive/appsrv12-flat.vmdk /dev/pve/vm-100-disk-0 but i seem stuck after that.
This is the more complicated path. The other storage that you have by default is local-lvm. It's called local-lvm because it is of type LVM (thin). That means, you need a bunch of additional commands. One of those is
Code:
lvdisplay
Its output contains a line "LV Path". That path will be /dev/pve/... which is exactly what you have observed
now it seems that data is stored in /dev/pve?
This is because there is a default volume group (try vgdisplay) called pve.

Instead of taking the complicated path, can you try to run qm importdisk?
Code:
qm importdisk 200 /media/usb-drive/appsrv12-flat.vmdk local-lvm
This should solve it for you.
 
Ok i am making progress but getting more confused by the second. We have a existing proxmox cluster i inherited. Storage seems to be /var/lib/vz/images. If i create new vm's they show up there.

df -h
/dev/mapper/pve-data 5.4T 2.2T 2.9T 44% /var/lib/vz

This cluster is running 4.4-18

My new setup is running 6.2.1 and doing a regular install, now it seems that data is stored in /dev/pve? Also this space doesn't seem to show in df

root@hasrv2:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 126G 1.1G 125G 1% /dev
tmpfs 26G 11M 26G 1% /run
/dev/mapper/pve-root 94G 3.7G 86G 5% /
tmpfs 126G 43M 126G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 126G 0 126G 0% /sys/fs/cgroup
/dev/sda2 511M 324K 511M 1% /boot/efi
/dev/fuse 30M 16K 30M 1% /etc/pve
tmpfs 26G 0 26G 0% /run/user/0

This should be about 3.5 TB of space. Is this a change on how proxmox works?

I have converted my vmdk above to /dev/pve using the following command
qemu-img convert -p -O gcow2 /media/usb-drive/appsrv12-flat.vmdk /dev/pve/vm-100-disk-0 but i seem stuck after that. I read post where i just delete the default hard drive for the vm-100 that i created and the new one would magically appear, but its now. Im pretty sure i am close if someone could help

Thanks
Ok i am getting frustrated here. Let me layout the scenario clearly and see if anyone has any hints

I had a physical server with /dev/sda1 (1 TB) as / and system running ubuntu 14. I also have /dev/sdb1 (1 TB) which is mounted as /var/www

it created a appsrv12.vmdk and 2 system files appsrv12-flat.vmdk and appsrv12_1-flat.vmdk. Each of these are 1 TB in size

I used vmware converter to upload those to a vmware esxi 6.7 server, and am able to start the vm in vmware just fine.

I copied those to my proxmox host and converted them using qemu-img convert appsrv12-flat.vmdk -O raw appsrv12-flat.raw. ran again for the other one as well

I created a new vm of the appropriate size and detached and removed the disk

I then did a cat appsrv12-flat.raw appsrv12_1-flat.raw > appsrv12.raw to combine them

then i ran qm importdisk 100 appsrv12.raw local-lvm

No issues

Took a long time but said successfully import disk as unued0:local-lvm:vm-100-disk-0

However when i start the vm it goes goes and then says

Gave up waiting for root device
ALERT! /dev/appsrv12-vg/root does not exist
dropping to a shell

Busybox v1.21.1

(initramfs)


Every way i have tried this for the last week i get the same result.

I have tried converting to qcow2 and importing with same result

Any help is greatly appreciated, its been a week now and i need to finish this project
 
Took a long time but said successfully import disk as unued0:local-lvm:vm-100-disk-0
This means that the copying itself was successful. It doesn't say that what you have copied will boot as expected.
Note that you have to go to the GUI and double click on the unused0 and then you can select IDE/SATA/... as @KagwaiMaina mentioned. And you actually have to select one of those. I'd also suggest IDE or SATA as start.

Could you also try to do this with appsrv12-flat.raw only, not with the combined image?
 

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!