Getting started with VirtualBox

VirtualBox is a great virtualization tool if you plan on running VMs on your regular desktop. For this post, we’ll get started with Virtualbox by creating a new VM and booting off of an ISO.

As a preparation for a future post, I’m actually going to install ESXi within VirtualBox. ESXi is meant to run as a full OS, so you only want to install it if you have dedicated hardware for your VMs. The VM creation process is the same if you’re going to install Windows Server, Linux, etc, so no worries there.

l-21897-is-this-inception

Queue in the Inception jokes

From previous posts, you should already have VirtualBox installed. We’ll start by launching VirtualBox, and then clicking on New. You’ll be presented with this dialog

2 - guest type

From here you can select the Operating System type. It doesn’t change the functionality of the VM per se, all it does is pre-select RAM, CPU and storage to match your selection.

ram

Note that RAM is always soft-allocated: the VM will only use as much RAM as is required by the underlying guest. While that allows you to have more VMs than you have physical RAM (over-allocation), there’s nothing stopping the VMs from using up all their allocated RAM either, which will cause the Host OS to page down to disk, ending in severe performance degradation. Keep that in mind!

create disk

From this dialog, you can choose how to create your virtual disk. Generally speaking, you’ll want to select “Create a new virtual disk”. You can also add an existing virtual disk now, if you happen to have one.

vdi type
  • VDI is the native file type for VirtualBox, so that’s what I prefer to go with.
  • VMDK is an open format, also supported by VMWare, so you should be able to grab an existing VMDK from, say, VirtualPlayer, and open with VirtualBox.
  • VHD is a format supported by Microsoft. It also has the added benefit that you can mount it in windows, just like any other ISOs.
disk allocation

You’ll now have to decide how the disk file will be built. You’ll usually want to do “Dynamically allocated”, so the file will grow only as the guest needs it. If you select “Fixed size” the file will be created at the full requested size. You will select the actual size in the next screen). The bigger the file, the longer it’ll take to complete the operation.

disk size

In this dialog you’ll also be prompted for the location of the data file. This is the last dialog! You’re now the proud owner of an empty VM, the equivalent of computer with an empty hard drive. Before you can get this puppy up and running, you’ll need to attach the ISO for whatever OS you’re going to install.

attach ISO

Select your VM, get the properties window, then select Storage, select the “Empty” DVD icon, then click on the DVD icon and click “Choose Virtual Optical Disk File” (whew). You can see that I previously used a windows 95 tools ISO file. In my case, I’m going to choose the ESXi ISO, but you can select whatever ISO you have (windows server, Ubuntu, etc). Click OK, select your brand-new VM and click “Start” to power it up.

start

And there you have it! You should now be greeted by the installer screen of whatever it is you’re installing.

VirtualBox_ESXi_21_11_2018_21_22_25

For the next post in this series, we’ll walk through installing ESXi (which I hope you’re installing on real hardware!).

Useful links!

Virtualbox download page

Getting started on my mini-lab

As part of my motivation to do more, I’ve started on my new home-lab. As mentioned on a previous post, this is all running off of an inexpensive Dell desktop! You really don’t need much hardware to start with, just enough to run 2-3 vms (or even just one!). It kind of depends on how you want to continually use your lab:

  • If you’d like to use your new computer for tasks other than running VMs (maybe that’s your only desktop?), then windows 10 is perfectly adequate! It’s more convenient to run windows 10 pro, since it has greater hardware support and remote desktop, but home edition is ok too.
  • You could have a dedicated VM server instead. In this case, you’d want to go with the free edition of ESXi (link —  I think it’s called vSphere Hypervisor edition now?). ESXi uses far less resources than windows 10, so that leaves you more room for the actual guests.

For now, I’m only using windows 10 home. For my VMs, I went with VirtualBox (Link). It’s free, very easy to use and performs great. I could’ve gone with Hyper-V, but that’s not available on Window 10 home.

image

I have this obsession with running windows 3.1 as a VM. The nostalgia is strong.

Downloading the required server software is easy!

  • For Linux, I went with Ubuntu Server (link). I’m an OpenSuse guy at heart, but it seems to me that Ubuntu is taking preferential treatment at Microsoft, so I went with that.
  • For Windows Server, I went with the 180 day free trial of Server 2016 (Link). I believe every DBA should have some degree of understanding of how the operating system is setup, how to maintain it, etc.

Looking back at Windows NT4/RedHat 7 days (ubuntu was still called Slackware back then), it’s amazing how easy it’s become to install a server anymore. Both Ubuntu and Windows Server only require you to select a handful of options, so you’re up and running in no time. Setting up an entire infrastructure (AD/DNS/DHCP) takes considerable more work, but for a basic server, it doesn’t get much easier than that (well, it can, thanks to containers, but that’s a different post).

For my next trick, we’ll download and install Windows Server 2019 (since it’s finally available again). Stay tuned!