Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a KVM-host with a lot of local disk for virtual machines that I administer using virtmanager. I want an easy solution for addressing disk for my virtual hosts. I also want to be able to add storage to the virtualmachines from time to time.

LVM are nice and have a lot of features for increasing partition size and for snapshots. But since KVM makes its own partition table on LVM-partitions its not so easy to change size for both the partition and the underlying filesystem. Virtmanager are not able to use all LVM-features so if I should continue with LVM I have to use other administrations tools to.

Any thoughts?

share|improve this question

2 Answers 2

Hmm, good feature :). I haven't come across this need myself yet. I believe the functionality you're looking for lives in libguestfs: http://libguestfs.org/ .

See virt-resize and virt-filesystems

This article shows how to make use of these tools for the purposes you've outlined.

http://askaralikhan.blogspot.com/2011/07/expanding-kvm-guest-disk-image-using.html

Let us know how it works out.

share|improve this answer
    
Thanks for the link, I will test this! –  Anders Wallenquist Nov 9 '11 at 21:58

A blog article at http://hyperthese.net/post/kvmized-debian-on-lvm/ suggests that you create LVM logical volumes on the host (physical machine) and create filesystems directly on them, without creating partitions, and before creating the virtual machines.

I tried it out, and long story short: seemed to work, and I was able to grow a LV and the filesystem on it. The long story can be found in my answer at http://serverfault.com/questions/100892/kvm-lvm-where-to-put-lvm/348408#348408 .

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.