Guest images resized, OS - not. What virtualization type is the easiest to change sizes?

5 posts / 0 new
Last post
#1 Mon, 12/24/2012 - 13:41
yngens

Guest images resized, OS - not. What virtualization type is the easiest to change sizes?

First time trying to resize KVM guest image. I had 30GB, now it shows 100GB. At least that's what 'fdisk -l' shows:

fdisk -l

Disk /dev/vda: 107.4 GB, 107374182400 bytes
4 heads, 32 sectors/track, 1638400 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c67e

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1              17     1638400   104856576   83  Linux

Disk /dev/vdb: 3221 MB, 3221225472 bytes
4 heads, 32 sectors/track, 49152 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009ce93

   Device Boot      Start         End      Blocks   Id  System
/dev/vdb1              17       49152     3144704   82  Linux swap / Solaris

However, 'df -h' still shows 30GB:

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vda1              30G   18G   11G  64% /
tmpfs                 758M     0  758M   0% /dev/shm

I tried to delete and re-create partition per instructions on http://akyl.net/how-do-you-increase-kvm-guests-disk-space, starting from #6, since as I understand steps from 1 to 5 are taken care of by Cloudmin. Unfortunately, deleting and re-creating partitions change nothing, it just uses all the available number of cylinders and remain the same as before. So I tried to skip and continue from #8, however my system couldn't fine 'pvdisplay' command. Too many missing points, so I am quitting to try that method. But then maybe there is another method? How exactly we should grow OS inside of resized guest image?

Sun, 12/30/2012 - 13:57
yngens

I guess I am having troubles because my host system is not built on LVM. Is it still possible to expand guest systems or not?

I wonder what is the easiest virtualization type to change sizes - KVM, XEN or another type? Should they necessarily be built on LVM to be resized any time or not? Could anyone elaborate on this, please?

Thu, 01/03/2013 - 20:41
JamieCameron

You probably also need to resize the filesystem as well - the resize2fs command can do this.

Both Xen and KVM behave similarly when it comes to disk resizes. OpenVZ is much easier, as it doesn't actually use disk images - just a per-VM disk limit.

''

Thu, 01/03/2013 - 20:49 (Reply to #3)
yngens

Thanks for advice about resize2fs, I'll try that later tonight.

As for OpenVZ, I'd like to give it a try if you say it is easier to manage. However, does OpenVZ allow to provide guaranteed amounts of server resources (RAM, CPU cores) to guest systems?

Thu, 01/03/2013 - 21:20
andreychek

OpenVZ does allow you to setup a variety of resource limits, though OpenVZ is a feature only available to Cloudmin Pro... Cloudmin GPL can only make use of Xen and KVM.

-Eric

Topic locked