No disk space on virtual box

I tried to launch the GNOME terminal, but it says there is no disk storage left on my virtual box

The qiime2core2-0–6 shows 7.2gb of the 7.6 gb used.

It gives me the option to remove certain apps that I do not use, but I fear I might delete something important.

How do I get more space on the virtual box?

Hi @Mariah_Cole, thanks for getting in touch. Resizing the VirtualBox machine takes a few steps, but fortunately there are a lot of additional resources online if you get stuck. I will outline the steps here:

1) On your host machine (e.g. your laptop, workstation, etc

Note, you need the VirtualBox command line tools installed and accessible, please consult the VirtualBox docs for help on how to do that on your system.

Run the following commands in a terminal:

# First figure out where your VM is located on disk, you can do that by opening the
# VirtualBox GUI, right clicking on your QIIME 2 machine, and then "Show in Finder"
# (Note, this will be slightly different on a Windows or Linux machine, please consult
# the VirtualBox docs for more info.

# For me, that path is: ~/VirtualBox VMs/QIIME 2 Core - 2.0.6 (1479486933)
$ cd "~/VirtualBox VMs/QIIME 2 Core - 2.0.6 (1479486933)"
# You need to convert the disk type from VMDK to VDI:
$ VBoxManage clonehd \
  "QIIME 2 Core - 2.0.6 (1479486933)-disk1.vmdk" \
  "QIIME 2 Core - 2.0.6 (1479486933)-disk1.vdi" \
  --format vdi
# Then, resize the VDI file (I am resizing to 100000 MB - that is ~100 GB):
$ VBoxManage modifyhd \
  "QIIME 2 Core - 2.0.6 (1479486933)-disk1.vdi" \
  --resize 100000

2) Create a new VirtualBox machine, using the new VDI that we created above.

Please consult the VirtualBox docs for info on importing a VDI on your host system. Basically, you click on "New", and follow the prompts while taking care to select the new VDI we just created.

3) Launch the newly created VirtualBox machine

Once logged in, open up a terminal prompt and run the following:

$ sudo fdisk /dev/sda

You should see a screen that looks like this:

Note the green "Free space" line, that indicates 87.9 GB free! Next, use the arrow keys to select that free space line, hit enter on [ New ], hit enter on the size prompt (it should confirm the size, in my case, 87.9 GB). Next use the arrow key to highlight [ Write ], then hit enter, when prompted, type yes and enter. Next, highlight [ Quit ], then you should be back at your command prompt. This should create a new partition, most likely /dev/sda3 (you can check by running sudo cfdisk /dev/sda again, and reviewing the disk/partition list, then quitting).

# Next, we need to reboot the VM for the changes to take place:
$ sudo reboot
# Wait to reboot, then open a new terminal
# I am using /dev/sda3, but you might need to update based on what `cfdisk` tells you the partition name is
$ sudo pvcreate /dev/sda3
$ sudo vgextend qiime2core2-0-6-vg /dev/sda3
# I tried using 87.9G (from above), but that was a few blocks too big, so I rounded down
$ sudo lvextend -L +87.8G /dev/mapper/qiime2core2--0--6--vg-root
$ sudo resize2fs /dev/mapper/qiime2core2--0--6--vg-root

Now you can run:

$ df -kh

Which should print out a long list of partitions, disks, etc. The one labeled /dev/mapper/qiime2core2--0--6--vg-root should now be much bigger (in my case, it is now 94 GB)! Once you have confirmed that this new VDI-based VM is good to go, you can delete your original QIIME 2 VM.

If you run into any problems, feel free to ping us for some guidance. Good luck!

1 Like

@Mariah_Cole, just a quick follow-up: if this is too long and complicated (I certainly think it is!), you might want to wait for the next release of QIIME 2 (sometime in the first half of February). We are planning on bumping up the disk space available in the VirtualBox image then.

1 Like

OH great! Well my roommate might be able to work with the “long way” route, but if not I will wait until you boost the space!
Thanks. Expect more questions in the future!

Yeah, would be really great if the disk space is bumped up in the next VB image! I coul not even run the classifier steps from the moving pictures tutorial, not to mention working on my own data sets…

By the way I could not install the Shared_Folder as in prior QIIME VB image versions - could this be integrated as well in upcoming VB image versions?

Thanks for all your efforts, I’m excited to play around with the new functionalities of QIIME 2 in the near future…

@Mechah: Thanks for following up!

I coul not even run the classifier steps from the moving pictures tutorial, not to mention working on my own data sets...

Can you provide a bit more detail about this? One of the final testing steps when creating the VirtualBox image is to run through the Moving Pictures tutorial, in whole (including q2-feature-classifier). We have not observed (yet) a situation that causes this to fail, so any additional context would be helpful (what version VirtualBox are you running on your host? how much RAM have you allocated for the vm? what is the error message are you seeing?).

By the way I could not install the Shared_Folder as in prior QIIME VB image versions - could this be integrated as well in upcoming VB image versions?

The steps for sharing between your host machine and your VM are generally the same as with the QIIME 1 VMs - I suggest you take a look at the official VirtualBox manual for guidance. Generally speaking, first you need to install the Guest Additions, then you can configure a Shared Folder. You also need to make sure the QIIME 2 user is a member of the group vboxsf:

$ sudo usermod -aG vboxsf qiime2

More generally, as we mentioned in the original distributions announcement post, we are unsure as to how much longer we will provide VirtualBox images. Unless you are on a Windows machine, we strongly encourage that you perform a native install of QIIME 2 (we don't currently support native installs on Windows, but we hope to change that in the future). If you decide to attempt a native install, feel free to ask any questions along the way, we are here to help!

Thanks for all your efforts, I'm excited to play around with the new functionalities of QIIME 2 in the near future...

Thanks! We are excited too!

@ thermokarst

Thanks, for providing help for my encountered obstacles!

I'm running Virtual Box version 4.3.24 r98716 on a Windows 7 host. I allocated ~110GB RAM and 16 CPUs. The error message is affiliated with the disk space problem (see whole error message below). So I thought I should increase the disk space for the image of the Virtual Box (although the mass storage was indicated to be 2.54GB (actual size) of 9.77GB (virtual size). I changed the vmdk image to vdi. Copied it and resized it to ~200GB. Then I repeated the tutorial but encountered the same error at the step where I want to classify my sequences in the moving pictures tutorial. I kept both virtual machines (vmdk and resized vdi) for comparisons. Then I tried to follow your solution (from step 3) as the problem seems to be associated to the linux partitions. However, when I executed the command: sudo fdisk /dev/sda I do not see a similar menu as you showed in the picture you provided. I looked through the possible arguments that could be provided after this command, but I was not sure what to do next. So I decided to wait for a new qiime2 image and leave a post in the forum.

original error message:

I configured the Shared_Folder as I did in the past with previous QIIME vers. (installed VB guest additions, configured the Shared_Folder, restart QIIME and test). However, the Shared_Folder does not work even after making sure that the QIIME 2 user is a member of the group vboxsf...

We were satisfied in the past with running QIIME in the Virtual Box. So I thought to keep our "old system" here. However, I will talk to the group if there is a chance to install a ubuntu partition on our PCs...

One more issue: I also tried to configure QIIME 2 on our other machine with 512GB RAM and 24 CPUs. (Virtual Box vers. 5.0.16 r105871 on a Windows 8 system). However, I received the following error message during the start of the Virtual Box QIIME2 image: "error writing sector 0X14d02 to hd0
After that I have a read-only file system. So not really useful... Any clue what's the problem here?

Thanks for all your help!

Hi @Mechah, sorry it took me so long to get back to you!

I just pushed up a new version of the VBox image (details here). Please give this new image a spin, it should address your concerns — if you have any problems, please just open up a new issue on the forum. Thanks!

1 Like

An off-topic reply has been split into a new topic: VirtualBox Shared Folders

Please keep replies on-topic in the future.