Skip to content

Too Many VirtualBox VM Images

2013/02/06

Here’s the punchline:

Create a NTFS junction to the location where you created the VM image copy:

mklink /J “Kuntuntu 12.04 MAIN” “F:\Saved-VMBox-Linux-VMs\Kubuntu 12.04″

The detail:

I’ve got Windows 7 64-bit installed as host OS on my Core i7 2700K box with Oracle’s free VirtualBox VM manager installed for my OS virtualization needs. Today I maxed the SATA drive that hosts VirtualBox’s cache of saved VM’s. I noticed this when a push to GitHub froze and the Linux VM I was working in at the time became severely pre-occupied with matters other than me.

No problem at all.

What we want is to unblock the VM and allow the git commit to complete normally. But the guest Linux OS is locked in storage hell and the VirtualBox machine manager can’t help us here either because Windows won’t give it disk. Eventually, I figure the VM is going to crash so time is of the essence: need to get the executing VM image offline quickly.

Flip out to Windows and go to maxed D: drive. Find some shit I don’t care about and SHIFT-DELETE it out of the way in Explorer.exe. It takes about 30s to free a couple GB of space which is all we need to get the VM saved.

Now flip to running VirtualBox machine instance and select Close | Save Machine State… from the Machine menu. Now that you’ve got a little space, VirtualBox suspends the VM, and gets a state snapshot written back to disk.

Now that the VM is offline, copy the folder containing the VirtualBox VM image to another drive. (We copy in case something goes wrong and we need to fall back on the original VM image).

Close the VirtualBox machine manager.

Create a NTFS junction to the location where you created the VM image copy:

mklink /J “Kuntuntu 12.04 MAIN” “F:\Saved-VMBox-Linux-VMs\Kubuntu 12.04″

My main VirtualBox VM image store folder, I’ve got two subdirectories:

<JUNCTION> Kubuntu 12.04 Clone #4 Feb 2013 [F:\Saved-VMBox-Linux-VMs\Kubuntu 12.04 Clone #4 Feb 2013]
<DIR> Kubuntu 12.04 Clone #4 Feb 2013 - decomissioned

Note: it’s important that make the junction name the same name as the original and actual folder name. VirtualBox does not seem to derive the list of available VM’s from a directory enumeration, so if you rename the VM image folder, or any file in the image you’re toast. Check VM settings where you can rename the image once its remounted via the junction.

Restart the VirtualBox machine manager and select the new junction. Start that VM image and ensure everything is okay. If yes, delete the original VM image to free up the disk space.

Repeat this process for as many VM images as you need to move around to balance disk allocation.

This whole process took about ten minutes (mostly waiting on the VM image copy) and once I resumed my suspended Linux session, the clock updated, my git commit completed, and we’re back in business.

From → Compute, Software

Leave a Comment

Comment on this article

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Parallella

Supercomputing for everyone

KurzweilAI

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

Models Everywhere

Various considerations about Model Driven Engineering

It Will Never Work in Theory

Software development research that is relevant in practice

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

Data Beta

on computing and data .. in permanent beta

Computers, code, music, art, and other loves.

Lea Verou

Life at the bleeding edge (of web standards)

Freestyle Capital

Computers, code, music, art, and other loves.

Software Modeling Blog

Computers, code, music, art, and other loves.

Steve Sanderson's blog

As seen on YouTube™

Google Chrome Blog

Computers, code, music, art, and other loves.

Chromium Blog

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

ArchDaily

Computers, code, music, art, and other loves.

Web - MIT Technology Review

Computers, code, music, art, and other loves.

Computing - MIT Technology Review

Computers, code, music, art, and other loves.

Business - MIT Technology Review

Computers, code, music, art, and other loves.

New on MIT Technology Review

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

Hal's (Im)Perfect Vision

Comments about the state of the technology world and its future

Published Content- FP Complete School of Haskell

Computers, code, music, art, and other loves.

Google Ventures Blog

Computers, code, music, art, and other loves.

Julie Norsby

Athlete, Designer, Entrepreneur...

Semantics and Data Modeling

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

David DiSalvo - Neuropsyched - Forbes

Computers, code, music, art, and other loves.

The Oatmeal - Comics, Quizzes, & Stories

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

Learning by Shipping

products, development, management...

Johnson

Computers, code, music, art, and other loves.

Lea Verou

Computers, code, music, art, and other loves.

Colossal

Computers, code, music, art, and other loves.

ChrisRus's Activity

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

The GitHub Blog

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

blog.encapsule.org

Computers, code, music, art, and other loves.

Computers, code, music, art, and other loves.

blog.chrisrussell.net

Computers, code, music, art, and other loves.

  Bartosz Milewski's Programming Cafe

Concurrency, Multicore, C++, Haskell

C++Next

The next generation of C++

Computers, code, music, art, and other loves.

pmarca

Marc Andreessen's thoughts on stuff

Follow

Get every new post delivered to your Inbox.

Join 203 other followers

%d bloggers like this: