2

Context

While using my Ubuntu 20.04 VM, got the following warning

Low Disk Space on "Filesystem root"

Clicking Examine one can see the following

Disk Usage Analyzer Ubuntu

In this case, the trash has only one file with 50,8 MB

Ubuntu Trash

so while one could trash it, would still get space problems when doing my operations.

ERROR: Could not install packages due to an EnvironmentError: No space left on device

This lead me to a quest to increase size of Ubuntu VM. From here was able to understand this is an operation that requires to inform the added space to the virtualization host (Virtualbox) and inside the guest OS.


Process

According to the instructions here and here, was able to understand how to proceed:

  1. Create a new virtual disk.

  2. Clone the existing virtual disk into the new virtual disk.

  3. Replace the old virtual disk on your virtual machine with the new one.

  4. Expand the partition in the new virtual disk clone.

So, this is the VM

Ubuntu VM Virtualbox

Where now says 30,00 GB, initially had 10 GBs.

That value was increased simply by going to VirtualBox's Virtual Media Manager, increase the value in the slider and click Apply

VirtualBox's Virtual Media Manager increase VM size

After this modification, was able to use it fine for a couple of hours. Then, in the end of the day, when trying to Start it, while it looked like it was starting as normal

Ubuntu VM normal start

it soon redirected to a shrinked and black screen as you can see in the following image

VM shrinked Black Screen

Tried:

  • Turn On and Off the VM a couple of times.

  • Leave it over night (7-8 hours) to see if the machine would start but kept the black screen.

  • Increase the Video Memory from 16 MBs to 32 MBs and to 64 MBs (Settings > Display, as mentioned here.

  • Increase the processor count (Settings > System), as mentioned here.

  • Change Graphics Controller to VBoxSVGA (Settings > Display), as mentioned here.

  • Enable 3D Accelaration (Settings > Display) - doing the opposite as mentioned here.

  • Make sure Windows had all new updates in place

Long updates done

It's a problem of free space in my Disk . I increased my Disk space and Tada ! THe machine works !

  • Read Stack Exchange's QAs for ideas. This answer also has an interesting suggestion too - problem in VirtualBox Guest Additions.

  • Check the Logs (didn't see anything specific)


Here is the VBox log file

https://drive.google.com/file/d/1oiw-N2AoBO7ghToDlWT84jbkW89OoUXy/view?usp=sharing


Problem

How can I access the Ubuntu VM in order to resize it? If I'm not being able to access the VM, then I won't be able to finish the procedure and increase its size.

11
  • The question is explicit about using VirtualBox to perform the resize, this might prove difficult to answer if it is easier to achieve in the command-line
    – Steve
    Commented Jun 3, 2020 at 9:33
  • 1
    @Steve, I'm open to a clear and easy to understand command-line solution too as long as it solves potential issues generated after using the Virtual Media Manager to increase the size Commented Jun 3, 2020 at 10:04
  • @TiagoMartinsPeres李大仁 - You expanded the virtual HDD but did you extend the partition within the OS? Instead of submitting a comment, you should clarify your question, by editing it.
    – Ramhound
    Commented Jun 3, 2020 at 22:35
  • 1
    Does this answer your question? How to increase VirtualBox virtual drive actual size?
    – Ramhound
    Commented Jun 3, 2020 at 22:36
  • Does this answer your question? Extending disk capacity on root partition on VmWare, Ubuntu Guest. I realize the question is about a differ hypervisor but the solution is the same regardless of the hypervisor.
    – Ramhound
    Commented Jun 3, 2020 at 22:38

0

You must log in to answer this question.