Single ZFS based storage - How to move in VM image?

Brian Read

Well-Known Member
Jan 4, 2017
120
5
58
74
I am trying to install a Virtual Box image on to Proxmox. I have converted it to .raw format, created a VM in proxmox of the same size etc, and now need to overwrite the hard drive image on the Proxmox system with the one from Virtual Box (converted to .raw).

In the GUI the local-zfs (pve) / content screen does not allow me to upload or overwrite the image. I've also tried ssh in the proxmox box, but of course the images do not show up in a console.

I've done this in past by having two disc image areas, one that is LVM based, and one that is for raw files (zfs, and then copied it in to the LVM based area and used the GUI to move it.

However my current installation does not have the LVM disc image are only the raw file ZFS area. How can I access the raw file to overwrite it?
 
If I understand what you're trying to do correctly, I believe the dd command will work here. Proxmox uses zvols for virtual disks on ZFS file systems. In order to access those, you'll want to look in /dev/zvol/rpool/. In there you will find a reference to each virtual disk. For example, we'll use vm-100-disk-1.

Code:
dd bs=1M if=/path/to/VirtualBoxFile.raw of=/dev/zvol/rpool/vm-100-disk-1

That should set you up nicely.
 
I think the last bit ought to be:

of=/dev/zvol/rpool/data/vm-100-disk-1

.. and it worked - many thanks.
 

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!