Beginners Guide to VirtualBox


On my previous blog VirtualBox: An Alternative to VMware Workstation Pro , I shared to you the different features of VirtualBox and VMware Workstation Pro. A detailed comparison between the two-virtualization software was also provided. It was highlighted that VirtualBox would be a great alternative since aside from providing similar virtualization features, you can also download and run VirtualBox for free unlike VMware Workstation Pro which requires a user to buy a license. That is why the goal for this second blog would be to showcase the different features of VirtualBox and provide a beginner’s guide on how to use the software.


Adding a virtual machine in VirtualBox

At the end of my previous blog, you were able to install VirtualBox into your Windows machine. The next thing to do would be to deploy a virtual machine (VM) in your VirtualBox Manager. There are two ways you can add a virtual machine. You can either create a new VM or import a VM using the Open Virtualization Format (OVF).

Here are the steps to create a new virtual machine in VirtualBox.

1. Click the “New” button in between export and add, or you can also select “machine” on the menu and then select “New”.


2After selecting “New”, a dialog box appears. You would need to provide a unique name for the VM, select a destination folder, and provide the type of operating system to be installed.

3. Provide the amount of memory to be allocated to the VM.

4. Create a Virtual Hard Disk. You can leave the hard disk file type as default. Select dynamically allocated so that the virtual hard disk file grows as it is used. Next, provide the destination folder of the virtual hard disk file and provide the size of the hard disk.

5. Select create, the new virtual machine will show up on the left side under “Tools”.


Below is a video that goes through the steps of creating a new VM in VirtualBox.

 



Importing and Exporting Virtual Machines

VirtualBox can import and export VMs in either Open Virtualization Format (OVF) or cloud service format. In this blog, I will just focus on OVF which is an industry-standard format. Most of the popular hypervisors use this format which means you can transfer your VM from a different hypervisor into VirtualBox.

It is very easy to import a VM into VirtualBox. You just need to first select the File menu, then select import appliance. Next is to select the OVF file you want to import. Then if you want to change the VM settings, you can edit that in the appliance settings screen which shows the current settings applied to the VM. Once your satisfied with the settings, just click on import and your VM will now be shown in the list of VMs in VirtualBox.

Like VMware workstation pro, VirtualBox also allows exporting VMs using OVF. This can easily be done by following a few simple steps. First is to select the File menu and click on “Export Appliance”. Click next in the export virtual appliance wizard to accept the default values. In the virtual system settings, just click on export to begin the process.

Here is a video to help you in importing and exporting Virtual Machines in VirtualBox.




Guest Additions

If you are familiar with VMware Workstation Pro, you probably already know about VMware tools. VirtualBox also have a similar type of tool which they call “Guest Additions”. This tool comes with device drivers and system applications that improve the performance and usability of the virtual machine.

Here is an image of a new virtual machine without Guest Additions.

And here is an image of a new virtual machine with Guest Additions installed.

With guest additions, you are able to resize the virtual machine’s window as seen on the second image. This also comes with automatic video resolution adjustment which means if you resize the VM window, guest additions will automatically adjust the screen resolution.

Aside from being able to resize your VM window, you will also now be able to drag and drop files from your host machine directly to your virtual machine. This is very useful especially if you just want to quickly transfer a few files from your host machine to your VM. However, this feature is not automatically enabled even after you installed guest additions. To have the drag and drop feature working, you would need to open your virtual machine and click on “Devices” on the top bar. A drop-down menu will open and from there you select drag and drop and make sure to select bidirectional. Having this option selected will allow you to be able to drag and drop files from both machines.   

Here is a video showing how to install Guest additions for Windows and Linux guest machines.

 


Here is another video showing two functions you can use once you have guest additions installed.




Snapshots

 A snapshot is a saved state of a virtual machine at a specific point in time. Snapshots are usually used for backup and recovery. With VirtualBox you can save multiple snapshots of your virtual machine as long as there is enough disk space on the host machine. 

Taking a snapshot in VirtualBox can be done in two ways and is very similar to how you do it in VMware. You can either do a snapshot when the VM is in a powered off state or when your VM is running.

If the VM is in a powered off state, you just click the icon next to the machine name. From the list of options that will show up, select snapshots. Then the snapshot window will open and from there click on take. After that you will have to give a descriptive name to your snapshot and then click on ok. Your snapshot will now show up in the snapshots list wherein you can do other operations like deleting, restoring, and cloning snapshots. 

If the VM is running, you will have to click on “Machine” on the top bar and then select take snapshot. Give the snapshot a name and then click ok. The snapshot will then be added in the snapshots list.


From the image above, if you check the icons beside “Snapshot 1” and “Snapshot 2”, you can see that they are not the same. Snapshot 1 has an orange square icon which means that this snapshot was done while the VM was in a powered off state. Snapshot 2 has a green triangle icon which means that the snapshot was taken while the VM was running.

 

VBoxManage

VirtualBox’s graphical user interface (GUI) already provides a lot of features for users. But if you want to dive deeper and expose yourself to all the features that VirtualBox has to offer then you would want to use VBoxManage. This is a command-line interface which you can use from your host machine’s command line to completely control VirtualBox and have access to features that are not available from the GUI. One example in which you would need to use VBoxManage is when you require more than 4 network adapters on your virtual machine. The GUI only allows up to 4 network adapters per VM. To add a fifth adapter or more, you would need to use VBoxManage.

This is just a quick intro to VBoxManage but I won’t be covering it in this Blog because it is more of an advance topic. It is also a very long topic since it covers all the features of VirtualBox.

 

Conclusion

VirtualBox is a great virtualization software that provides a lot of features and is also very easy to manage. It is free to use and has an interactive GUI that you can easily get use to. Hopefully, this blog has provided you the needed information to get started with VirtualBox. You can really do a lot of things with VirtualBox so enjoy testing different stuff and breaking some VMs here and there.


Comments

Popular posts from this blog

VirtualBox: An Alternative to VMware Workstation Pro