retspen / webvirtmgr

WebVirtMgr panel for manage virtual machine
http://retspen.github.io
2.04k stars 536 forks source link

Resize disk images through UI #431

Open brylie opened 10 years ago

brylie commented 10 years ago

User story

As an administrator I sometimes need to resize Virtual Machine disk images So that I can grow or shrink the storage capacity and manage resources

User flow

  1. (Administrative) user locates Virtual Machine in dashboard list
  2. User clicks on 'resize virtual disk' action item (or similar)
  3. Modal or screen presents user with current size, maximum storage available, and slider to resize
  4. User moves slider, or other interface widget, to select new storage capacity
  5. User clicks apply or save
  6. VM resize script runs in background, indicating to user that action is being preformed.
  7. User can verify the new storage capacity under the VM storages page

    Initial question

How does one resize a disk image or volume? E.g. we install an OS with 20GB of disk space and decide to double the storage to 40GB.

chamambom commented 10 years ago

Anxiously waiting for the answer to this one , i have multiple vms i also need to resize ...

aprt5pr commented 10 years ago

Assuming you're using LVM inside of your guest, this link may be of assistance.

Alternatively, you could simply attach a second disk to the guest.

MACscr commented 10 years ago

Definitely need an automated way to take the system offline and resize its disk and file system. LVM wouldnt be of any help if the OS resides on it if you are trying to do it live.

chamambom commented 10 years ago

You could try using the following design scenario ...... just make sure your storage partitions reside in an LVM of the underlying host ,that way you wont have to take it offline ....

MACscr commented 9 years ago

chamambom, thats obviously not how must VM's are setup and not relevant to the request. I would never recommend LVM within a VM. Makes maintenance a pain. When you resize a VM's storage, you take it offline, resize the img file or logical volume its in, then resize its file system. Obviously it has to be scripted and will only work with file systems you have created a process for, but this is how its done with other cloud systems.

brylie commented 9 years ago

What are a couple of good examples we can look at, so that we can envision how WebVirtMgr can provide resizing functionality?

MACscr commented 9 years ago

some examples of cli commands that could be scripted to accomplish this? I mean, thats the only way they could do it. I know Cloudmin heavily uses bash scripts to resize guests and reset root passwords on guests.

brylie commented 9 years ago

OK, cool. What are some tools that we can use as comparison?

brylie commented 9 years ago

Also, there may be some reasons for admins to use LVM for host/guest systems, such as live backup: http://vitobotta.com/kvm-lvm-virtual-machines-backup-cloning/

soraver commented 9 years ago

It would indeed be very nice to have this feature. Either with lvm or with image files. Preferable lvm of course. There are some cli ways to accomplish it of course.

http://blog.oneiroi.co.uk/linux/kvm/virt-resize/RHEL/LVM/kvm-linux-expanding-a-lvm-guest-file-system-using-virt-resize/ http://chr4.org/blog/2014/08/28/online-resizing-lvm-guest-partitions-on-opennebula-slash-libvirt-guests/

Since its been months since the last comment, I'd like to ask if there is a roadmap on this.