Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Finally, after quite a bit of this vs that, I have chosen to virtualize a couple of my servers with KVM. I did do a test setup as well, but I have a few questions about setting VM's in KVM. Would appreciate pointers.

  1. What is the best storage to use - Qcow2 or LVM? I like the fact that I can copy the VM file easily with a Qcow2 but what about LVM, how do I take a backup or make copy on a development server to play with? I know I can clone a LVM, but how do I bring to my development server?

  2. How do I setup the guest partitioning? For example, when setting up Ubuntu inside Ubuntu, do I choose LVM for that VM or regular fdisk partitioning? Can I increase the partition size then later, if I need a bigger disk?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The answer to your first question depends on your requirements and priorities. Using an LVM volume for a guest disk will definitely perform a little better, especially under high disk usage, but qcow2 virtual disks are -- as you point out -- more flexible and easily portable. We use qcow images for just about everything for this reason, and pass through entire hard disks as block devices where performance is more important. Of course, where performance is absolutely critical it may be best to forgo virtualization altogether.

In regard to your second question, to use your example of an Ubuntu host/guest combination with a qc2 image, we would select the install option to create and install to a single LVM volume using the entire (virtual qcow2) disk. This is relatively quick and painless and should work for most scenarios, but be advised that if you've selected an encrypted LVM volume for the host, do NOT choose encryption for the guest's volume, as this generally isn't necessary and has caused problems for us in the past. In fact, even encrypting the home directories on the guest has caused freeze-ups for us when the guest VM image files were run from on an encrypted LVM host volume.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.