Tutorials/Tips

How to import a virtual machine image into VirtualBox

This post shows how to import a virtual machine image into VirtualBox. Or more correctly, how to create a VirtualBox guest operating system from an existing .vdi image file.

About a month ago, one of my hard drives gave up suddenly. Well, it wasn’t all that sudden, because for weeks prior, it had been sending signals that were not good.

I just didn’t pay it the attention it deserved.

So one evening, while I was finishing up a post, it sent the last signal and just died. And with that, I lost access to data that was on it. Luckily, I was able to recover all the data, including the VirtualBox folder that contained the virtual machine images of the guest operating systems that I had installed.

Those VirtualBox guest operating systems were used for the latest articles I wrote for DigitalOcean, so I needed to recreate them. Details of how I went about the task follows.

First a quick introduction to the contents of the VirtualBox folder on a Linux distribution.

Related Post:  Understanding the Technology Behind Most Online Casinos and Slot Games

When you create a guest operating system in VirtualBox, the machine image is created in a subfolder bearing its name under the VirtualBox VMs folder in your home directory. Within all the subfolders in that directory, is a file with a .vdi extension. That file is like an ISO image used to install a Linux or BSD distribution.

With that file, you can recreate the guest operating system on any other machine.

So after recovering my files from the dead, now partially resuscitated, hard drive, I saved the VirtualBox folder as oldVirtualBoxVMs, installed and launched VirtualBox on the new hard drive (same computer, but sporting a new hard drive).

Creating a new guest operating system from the existing .vdi images is really simple. Start by clicking the New button. Give the new guest OS a name and be sure to select the appropriate distribution, which should be the same version as the one whose .vdi image you’ll be importing. Next.

Create VirtualBox gest operating system
Figure 1: Creating a new VirtualBox guest operating system

Assign RAM to it. Next.

Assign RAM to VirtualBox guest OS
Figure 2: Assign RAM to VirtualBox guest operating system

At the step shown in Figure 3, select the Use an existing virtual hard disk file option, then click on the folder icon to the right of the combo box under it.

VirtualBox virtual hard drive
Figure 3: Create virtual hard drive for VirtualBox guest operating system

Navigate to the folder where you saved the virtual machine image. Select it, then click Open.

import virtual machine image into VirtualBox
Figure 4: Selecting existing .vdi image for VirtualBox guest operating system

Back to this step, click Create. You’ve just created a new VirtualBox guest operating system from an existing virtual hard disk file.

import virtual machine image into VirtualBox
Figure 5: Importing virtual machine image into VirtualBox

Before starting the new guest operating system, configure it to use bridge networking to get its IP address. To do that, click the Settings button, then click on the Network tab. From Assign to, select Bridged Adapter. OK.

bridge networking for VirtualBox
Figure 6: Set up bridge networking for VirtualBox guest operating system

After that, you may start the new guest operating system. Repeat the procedure using other existing virtual machine image that you have to import.

Related Post:  So that is how SSH got assigned port 22

Subscribe to LinuxBSDos.com

Subscribe to receive the latest articles in your Inbox

Trust me, you'll not be spammed...

Please share:

We Recommend These Vendors and Free Offers

Register now for Blockchain & Cryptocurrency Con 2018, international conference on blockchain technnology in Dallas, TX (USA), Feb. 23-24, 2018. A 50% discount for students.

Best WhatsApp Plus features in Gbwhatsapp latest APK download

Best binary auto trading software reviews by 7binaryoptions.com

Google has got competition, because Presearch is building a blockchain-based search engine controlled by the community. At $0.15 a token, you can participation in Lot 3 of the token sale by clicking here

Open Money is building a solution that will run mainstream software on blockchain tech. Click here to get free tokens that will be the digital currency of the platform

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).


One Comment

  1. Thanks, this helped me greatly

Leave a Comment

Your email address will not be published. Required fields are marked *

*