Jump to content
bmdegraaf

Increase vdisk

24 posts in this topic Last Reply

Recommended Posts

I started with an initial setup of 40gb to play around. Now everything is working i would like to expand the VM disk size to 150gb.

 

How does one do this in the VM manager? Tried to add an additional vdisk, but unraid is giving me an error message that i am creating an unsupported configuration.

Share this post


Link to post

I started with an initial setup of 40gb to play around. Now everything is working i would like to expand the VM disk size to 150gb.

 

How does one do this in the VM manager? Tried to add an additional vdisk, but unraid is giving me an error message that i am creating an unsupported configuration.

 

I did this recently when toying around.

 

Think you just click on the vm 'name', this will give you a dropdown of the disks and iso images contained in the vm, then click on the vdisk size entry itself, in your case the 40G figure, and voila you'll be given an edit option to change the size.

 

Not sure if thats the 'official' way to extend the size but it certainlty worked.

  • Like 1
  • Upvote 1

Share this post


Link to post

Fidled around as you mentioned and it did the trick. Many thanks!

 

Good to hear ...

 

Howzabout changing your thread title to [sOLVED} maybe?

Share this post


Link to post

In case you wanted to know the command line that is executed.

qemu-img resize filename size

Size has to be with a G not GB e.g. 20G

Share this post


Link to post

Also, instead of putting in an absolute size, you can also do this:

 

qemu-img resize vdisk1.img +5G

 

That would simply grow the image from its current size by 5GB.

Share this post


Link to post

Also, instead of putting in an absolute size, you can also do this:

 

qemu-img resize vdisk1.img +5G

 

That would simply grow the image from its current size by 5GB.

 

*Running RC4.

 

I just came across this post because I too have the need to grow a VM .img file a little. I have always been used to doing this from the command line BUT I was interested to try the GUI route. However, no matter what menu I selected no matter where I clicked I couldn't find the size setting of the "existing" .img file to change. Has this been removed recently or am I just blind.

 

qemu-img resize vdisk1.img +5G

 

That command worked like a charm. I DID have to do some partition fiddling within the Windows 10 VM as Windows created a recovery partition after the main system partition which stopped me from extending. AND for some reason Windows 10 doesn't want to let me delete it. So for those who come across this post who have a similar issue I used this free tool.

 

http://www.easeus.com/partition-manager/epm-free.html

 

They "Push" their paid versions obviously but this free version (not trial) should work fine.

Share this post


Link to post

Click the name of the VM on the VMs page and a section will expand underneath the VM showing the size of the vdisk. Click that size and rename it to your new size, then press enter. Should do the resize command for you pretty easily.

Share this post


Link to post

Yep, got it now. I was clicking the icon and bring up then menu. I didn't pick up (despite clearly reading it several times) the "name" of the VM was a link to another menu too, which of course you describe. Just tried it out and works as advertised.

 

Still needed the partition tool for within Windows - that stupid recovery partition they put directly after the system partition which needs to be deleted (and wonderfully they remove the ability to remove it in the windows disk utility) as it prevents resizing into available space is a pain in the bum! But that isn't an Unraid issue.

 

Thank you  :)

Share this post


Link to post

Is it possible to shrink the same way?  I tried to shrink it but its still more than the allocated, but its not taking the lower size for me.

Share this post


Link to post
On 5/5/2015 at 10:14 PM, jonp said:

Also, instead of putting in an absolute size, you can also do this:

 

qemu-img resize vdisk1.img +5G

 

That would simply grow the image from its current size by 5GB.

is this going to always increase the VM size by 5GB every time it reaches a threshold space warning?

Share this post


Link to post

Hi everyone 

 

I was able to shrink something like: qemu-img resize vdisk1.img -5G

 

The only problem I've got is the initial size in Windows VM remains the same. I don't see the option to change it from VM settings in unRaid as someone suggested earlier. 

 

I'm running unRaid 6.3.5 so I can see only Primary vDisk Location and reference to the vmdisk file in the settings.

 

Also I can't find that setting in the XML file

<disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/vm_disks/Windows 10/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>

 

So how to modify the size of the drive then?

Share this post


Link to post

I must be missing a step. When I change the size of the disk in unRaid and then reboot Windows 10 it is still telling me that I am out of space and the VM is not recognizing the additional space. I started the VM with 60G, I have increased it in unRaid to 100G as listed above and get nothing. Any help would be appreciated. Thanks

Share this post


Link to post

Right click on "This PC", select Manage, and you have to expand the partition for Windows

 

Share this post


Link to post

Thanks for the quick response. I have tried what you suggested but when I am in Disk Mgmt the option to extend the volume is grayed out. I guess I will need to try some other options for extending the drives.

Share this post


Link to post
3 hours ago, GaltsGulch said:

Thanks for the quick response. I have tried what you suggested but when I am in Disk Mgmt the option to extend the volume is grayed out. I guess I will need to try some other options for extending the drives.

Make sure that you run the Action to rescan disks.   I found that this was necessary to get the extra space seen.   I\

Share this post


Link to post

so far having a issuse , with new vm setup of a sierra mac load , from my mac to unraid , running fine , but went to increase vdisk amount , in unraid no problem , vdisk was in creased in the os , i try over and over and still stays at 40gb , for the vdisk main partition , but the top main disk shows the correct amount but it is free .... and os wont let me install anything else , i have plenty of room on the system ..ie... ssd caches, and storages ,... only trying to incress the mac boot disk to 250gb , from 40 .... 

Share this post


Link to post

The method mentioned above by click on the VM name doesn't appear to work anymore. Is this true? OR am I missing something?

 

EDIT: OK. I have expanded the vdisk using the command line but when trying the extend the volume in windows, it is greyed out. Does anyone know how to get around this?

Edited by WexfordStyle

Share this post


Link to post

@bonienl This doesn't seem to be working anymore in 6.5 - I've expanded via the UI before but it's not adding the extra size.

 

I had to use:

 

qemu-img resize /mnt/disks/sm961/domains/LEGO/vdisk1.img +5G

to get it to work

Share this post


Link to post

Same issue here. I increased the vdisk size in Unraid UI. Capacity shows increased, but allocation remains at the "old" size. I went to "disk mgmt" and rescanned, but the additional space does not show up. Any thoughts?

Share this post


Link to post
4 hours ago, steve1977 said:

I went to "disk mgmt" and rescanned, but the additional space does not show up. Any thoughts?

If it's a Win8/10 VM you need to reboot, not shutdown, for the new space to show up.

Share this post


Link to post

Great, thanks, after the shutdown, all works well.

 

I have a small question. I am now using basically all of the NVME, but I guess a few GBs are unused. I have a 1 TB disk and using two VMs with 750GB and 250GB respectively. By what amount do I need to increase to make sure to fully use the disk. I know it doesn't really matter, but I found it nicer and cleaner to go to 100.0% usage rather than 99.99% usage. Is there some command to do this?

Share this post


Link to post
On 10/12/2018 at 8:48 AM, steve1977 said:

Great, thanks, after the shutdown, all works well.

 

I have a small question. I am now using basically all of the NVME, but I guess a few GBs are unused. I have a 1 TB disk and using two VMs with 750GB and 250GB respectively. By what amount do I need to increase to make sure to fully use the disk. I know it doesn't really matter, but I found it nicer and cleaner to go to 100.0% usage rather than 99.99% usage. Is there some command to do this?

Any thoughts how I can accomplish above?

Share this post


Link to post

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.