How to import a virtual machine image into VirtualBox

bridge networking for 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:  Manual LVM configuration on Fedora 13

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:  Customizing Simply Linux 5

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn

Hola! Did you notice that LinuxBSDos.com no longer run network ads?  Yep, no more ads from the usual suspects that track and annoy you across the Internet. But since I still need to pay to keep the site running, feel free to make a small donation by PayPal or your favorite cryptocurrency.

  • Bitcoin
  • Ethereum
  • Xrp
  • Bitcoin cash
  • Bitcoin sv
  • Litecoin
  • Binance coin
  • Cardano
  • Ethereum classic
Scan to Donate Bitcoin to bc1qzvlte2m224zkayhdc7fdfjkp2rsgt0l5a496ua

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x0F4362DFF77F3Ba0Dc637F5f3Eba35D09a2fA60C

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Xrp to r4ggjvL36njsMCYTkJ3S7cTHscPsMsSGQv

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Bitcoin cash to qrs0dedzp9t55af3nfwypydghp29r0xguy9s20fz2k

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Bitcoin sv to 15K9TLyVDBtLuG9cYvXCX9SSkq9C9oUKHK

Donate Bitcoin sv to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin sv

Scan to Donate Litecoin to LetJ9QQMb7u2LMZ9Tu6rtHwcBcQFW98fbG

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Binance coin to bnb1ga8trq08ssqepd90v6225nzfgy448pu5pw8gxp

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Cardano to addr1qx2354yw49etstfljpdhwja3ajjlt487lg95vu9ngy2q6vu4rf2ga2tjhqknlyzmwa9mrm997h20a7stgectxsg5p5esq5l7d9

Donate Cardano to this address

Scan the QR code or copy the address below into your wallet to send some Cardano

Scan to Donate Ethereum classic to 0xcD6CC972a2297FcafACDcfE042C55C69516a9264

Donate Ethereum classic to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum classic

Subscribe for updates. Trust me, no spam!

Sponsored links

1. Attend Algorithm Conference, a top AI and ML event.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.
4. Axo Finans.

Upcoming events

2 Responses

  1. Just a note for users running Mageia. Mageia was not included in the Version selection list on my first set up attempt as seen in the Name and Operating System dialog above. (VBox comes with Mageia.) Checking my facts in writing this post, I found it very much there. The difference is that I installed the VBox Extensions Pack two day ago. I do daily shut downs, so the list must have been updated on cold start ups. I left things VBox as they were when I picked up the issue.

Leave a Reply

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

Get the latest

On social media
Via my newsletter

Partner links

1. Attend Algorithm Conference, a top AI and ML event for 2021.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.
4. Axo Finans.
Hacking, pentesting distributions

Linux Distributions for Hacking

Experts use these Linux distributions for hacking, digital forensics, and pentesting.

Categories
Archives

The authors of these books are confirmed to speak during

Algorithm Conference

T-minus AI

Author was the first chairperson of AI for the U.S. Air Force.

The case for killer robots

Author is the Director of the Center for Natural and Artificial Intelligence.

Why greatness cannot be planned

Author works on AI safety as a Senior Research Scientist at Uber AI Labs.