How to decrease or limit disk size? VirtualBox

As I use Qiime2 2018.8 (installed in VirtualBox), the virtual machine disk expands. This has already gone to the point where my host machine (Win 10) is running out of space, and so I have to delete and reinstall the Qiime2 virtual machine.

This happens even though I work inside a shared folder. Basically, inside my host machine’s Documents folder.

While the Qiime2 virtual machine starts out with disk size ca 14 GB, it expands to around 30 GB once I use Deblur. And it is sure to expand again from time to time.

Is there anything I can do to fix this? Limit the expansion or reclaim the space somehow?

To shrink the disk, I have tried the command “VBoxManage modifymedium --compact” on the Qiime2 disk, but it gave me an error: “Compact medium operation for this format is not implemented yet!”

Other things I tried didn’t work either.

P.S. I was considering asking for a fixed-disk version of Qiime2 in the suggestions forum, but I wasn’t sure if it’s too early.

Hey there @polajev!

A quick Google search shows a few different techniques, including converting to VDI and then zero-writing. I personally haven't tried to do any of these options, so I don't think I can be much help here.

It is fixed size already:

That is 1000 GB. So, it'll expand dynamically up to that point on the host machine, then cease.

:qiime2: :t_rex:

Can I use vm-playbooks to create my own Qiime2 disk image, with a different size limit?
After editing the vbox-bootstrap.json file you mentioned in your reply, of course.
Sorry, but I didn’t understand that bit from the vm-playbooks readme file.

Also, thought I should mention: I tried editing the .ovf file from the Qiime2 virtualbox image I downloaded. It didn’t work. Disk still expands beyond what I set. Just saying in case someone else got the idea to try.

In the .ovf file, I edited line 8 (changed the ovf:capacity). The original line looked like this:
Disk ovf:capacity=“1048576000000” ovf:diskId=“vmdisk1” ovf:fileRef=“file1” ovf:format=“http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized” vbox:uuid=“089458ec-2e9a-487e-bf6a-de485c16d731”/>

Hey there @polajev!

Yep! But, be warned, it isn't necessarily the fastest or easiest way to accomplish your goal. My recommendation is to abandon the QIIME 2 Virtualbox image and set up a linux VM on your machine that works the way you want it to work. Then, you can follow the Native installation instructions to get QIIME 2 installed (BTW, that is ~95% of what the official QIIME 2 image does, there really isn't anything too special happening here).

RE: editing the OVF file, I wouldn't expect that to work (as you mentioned), because the OVF file is just the metadata for the VMDK file.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.