Extending Unraid VM Storage
More and more I find myself quickly spinning up a new Windows VM on my unraid server. It is always a ‘temporary’ VM which, after setting up exactly how I like, I invariably then wish I’d set a much larger virtual disk size. The standard VM disk size is 30G and that always seems to be enough.
Fast forward an hour or two and I really wish I had set something more realistic. The problem is, the vdisk is too small, and Windows configures the partitions in such a way that I can’t simply extend the partition (due to the recovery partition being the last partition in the sequence).
As a reminder for my future self, this is actually quite simple to resolve.
First, login to the unraid via SSH and issue the following command to add 50 GB to the vdisk:
qemu-img resize /mnt/user/domains/Temporary-VM-Name/vdisk1.img +50G
This will magically add an additional 50 GB of capacity to the VM.
After restarting the VM via the unraid GUI, the second (and final!) step of the process is to expand the partition to use the newly added unallocated space.
Usually, this could be done via the Disk Management console in Windows, however, as mentioned, this isn’t possible with the standard partition layout.
Thankfully a free tool called ‘MiniTool Partition Wizard` that makes this final step a breeze. Simply open the application, right click on the C drive and click expand. Use the slider to set the full capacity of the unallocated space and then click Apply. It’s as simple as that!