Convert VMs from image to LVM

decibel83

Renowned Member
Oct 15, 2008
210
1
83
Hi.

I wish to begin using LVM for the storage of my virtual machine to install and configure drbd, but now I have virtual machines all with the storage as raw images in /var/lib/vz.

Is there a way to convert the virtual machines from image to LVM?

Thank you very much!
Bye.
 
Hi.

I wish to begin using LVM for the storage of my virtual machine to install and configure drbd, but now I have virtual machines all with the storage as raw images in /var/lib/vz.

Is there a way to convert the virtual machines from image to LVM?

Thank you very much!
Bye.
Hi,
the official way: backup and restore (and select the right storage for restore).
the fast way: shut down VM - create disk on lvm, copy disk via "dd", change vm-config, start vm again.

Udo
 
Hi,
the official way: backup and restore (and select the right storage for restore).
the fast way: shut down VM - create disk on lvm, copy disk via "dd", change vm-config, start vm again.

Udo

Thank you very much for your answer!

Now the question is: the drbd howto for Proxmox tells about LVM based storage for virtual machines, but could I use drbd with .raw images too? This should permits me to avoid the conversion of all virtual machines!

Thank you very much!
 
Thank you very much for your answer!

Now the question is: the drbd howto for Proxmox tells about LVM based storage for virtual machines, but could I use drbd with .raw images too? This should permits me to avoid the conversion of all virtual machines!

Thank you very much!

Hi,
yes and no. For raw-files you need an filesystem and for an storage which is mounted on more than one host this filesystem must be an clusterfilesystem.

So for an easy way with ext/xfs/... is the answer no. For an clusterfs is the answer yes, but normaly this is oversized (and IMHO has not the same performance like an lvm-storage).
I don't have experiences with cluster-filesystem - if you want look further, there are some threads about this.

Udo
 
I understand what you're telling.
I'm interested in activate drbd, which can have a file system on it (a drbd resource can be formatted as a LVM physical volume or a "true" file system), so this shouldn't be a problem for the raw files...

I was asking if a configuration like this could be bad for Proxmox and DRBD...
 

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!