Expand vdisk Online?


Recommended Posts

Hello All,

 

I was wondering if someone will be able to help me. I am running a Windows VM and preferably don't want to have to turn it off to increase the disk.

 

From what I can see it can't be done via the GUI? Is this a new feature that needs to be requested?

 

In either case what would be the best command to run to increase the disk?

 

Many Thanks

Link to comment

Where are you seeing that it's even possible to expand a KVM guest vdisk without stopping it? The googling I've done suggests it's required to stop the guest.

https://computingforgeeks.com/how-to-extend-increase-kvm-virtual-machine-disk-size/

 

When the guest is stopped, it's easy to expand the disk from the GUI, on the VM page click on the NAME of the VM, and click on the disk capacity. Enter the new larger number with G modifier and hit enter.

 

NEVER EVER EVER set a smaller size. I know that's not what you asked, I'm just posting as a reference if someone searches and finds this answer thinking they can shrink a vdisk just as easily. You can, but you will break the vdisk permanently, and probably not be able to recover your data.

Link to comment
10 hours ago, jonathanm said:

Where are you seeing that it's even possible to expand a KVM guest vdisk without stopping it? The googling I've done suggests it's required to stop the guest.

https://computingforgeeks.com/how-to-extend-increase-kvm-virtual-machine-disk-size/

 

When the guest is stopped, it's easy to expand the disk from the GUI, on the VM page click on the NAME of the VM, and click on the disk capacity. Enter the new larger number with G modifier and hit enter.

 

NEVER EVER EVER set a smaller size. I know that's not what you asked, I'm just posting as a reference if someone searches and finds this answer thinking they can shrink a vdisk just as easily. You can, but you will break the vdisk permanently, and probably not be able to recover your data.

Proxmox would be my example of live disk increase, it uses QEMU KVM.

Link to comment
On 4/5/2020 at 2:02 PM, jonathanm said:

Can you link to official documentation that walks through the live expansion? All I can find are work arounds and hacks that come with data loss warnings. I guess my google-fu is failing me.

For Proxmox here is the documentation: https://pve.proxmox.com/wiki/Resize_disks

 

Although looking further it may seem that Proxmox uses a different vdisk handling method not sure myself. I just know it is possible with Proxmox both in the GUI and via CLI

Link to comment
24 minutes ago, jonathanm said:

It would appear the qm command is specific to proxmox, not a generic QEMU-KVM command.

Yeh it seems that way, unsure if it is possible to do with the current setup unraid/lime tech use. But it would be a nice feature to allow live disk expansion as most newer operating systems would support it.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.