[GH-ISSUE #431] Resize disk images through UI #323

Open
opened 2026-02-27 16:38:52 +03:00 by kerem · 10 comments
Owner

Originally created by @brylie on GitHub (Sep 15, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/431

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.

Originally created by @brylie on GitHub (Sep 15, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/431 ## 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.
Author
Owner

@chamambom commented on GitHub (Sep 15, 2014):

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

<!-- gh-comment-id:55616643 --> @chamambom commented on GitHub (Sep 15, 2014): Anxiously waiting for the answer to this one , i have multiple vms i also need to resize ...
Author
Owner

@aprt5pr commented on GitHub (Sep 15, 2014):

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.

<!-- gh-comment-id:55622933 --> @aprt5pr commented on GitHub (Sep 15, 2014): Assuming you're using LVM inside of your guest, [this link](http://wiki.libvirt.org/page/Tips#Increasing_the_disk_size_of_a_virtual_machine) may be of assistance. Alternatively, you could simply attach a second disk to the guest.
Author
Owner

@MACscr commented on GitHub (Sep 25, 2014):

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.

<!-- gh-comment-id:56893389 --> @MACscr commented on GitHub (Sep 25, 2014): 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.
Author
Owner

@chamambom commented on GitHub (Oct 14, 2014):

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 ....

<!-- gh-comment-id:58989121 --> @chamambom commented on GitHub (Oct 14, 2014): 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 ....
Author
Owner

@MACscr commented on GitHub (Oct 14, 2014):

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.

<!-- gh-comment-id:59013410 --> @MACscr commented on GitHub (Oct 14, 2014): 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.
Author
Owner

@brylie commented on GitHub (Oct 20, 2014):

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

<!-- gh-comment-id:59713033 --> @brylie commented on GitHub (Oct 20, 2014): What are a couple of good examples we can look at, so that we can envision how WebVirtMgr can provide resizing functionality?
Author
Owner

@MACscr commented on GitHub (Oct 20, 2014):

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.

<!-- gh-comment-id:59755264 --> @MACscr commented on GitHub (Oct 20, 2014): 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.
Author
Owner

@brylie commented on GitHub (Oct 20, 2014):

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

  • Cloudmin
  • Apache Cloudstack ?
  • ??
<!-- gh-comment-id:59805002 --> @brylie commented on GitHub (Oct 20, 2014): OK, cool. What are some tools that we can use as comparison? - Cloudmin - Apache Cloudstack ? - ??
Author
Owner

@brylie commented on GitHub (Oct 22, 2014):

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/

<!-- gh-comment-id:60050905 --> @brylie commented on GitHub (Oct 22, 2014): 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/
Author
Owner

@soraver commented on GitHub (Feb 19, 2015):

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.

<!-- gh-comment-id:75051576 --> @soraver commented on GitHub (Feb 19, 2015): 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#323
No description provided.