Set up a Windows VM in VirtualBox

In the last post, we set up VirtualBox, an open source product for virtualization.

We’re now going to set up our first virtual machine (VM). In this post, we’ll set up Windows. In my case, I’ll use Windows XP in Spanish, but you can use any version of Windows you want.

Open VirtualBox from the Start menu or from the shortcut in your desktop, if you chose to create one when we were installing VirtualBox.

The Oracle VM VirtualBox window will open.

VirtualBox Main window

Click on the New button to add a new virtual machine.

The Create New Virtual Machine wizard will come up.

Create New Virtual Machine Wizard

Click Next to start.

In the next screen, type a name for your new virtual machine and select the operative system (OS) and version you plan to install, in this case Windows XP. The name can be anything you want, and it will appear in the list of virtual machines in the main window.

Virtual Machine name and OS type

Click Next when you’re done.

In the next screen, you can choose how much memory you want to allocate for the new virtual machine. The memory required will depend on the OS we want to run on the virtual machine. The recommended minimum for Windows XP is 192 MB. I chose 512 MB instead.

Virtual Machine memory size

Click Next when you’re done.

In the next screen we have the option to create a new virtual hard drive or choose an existing one. A virtual hard drive is nothing more than a large file in your hard drive, but for the VM, it will act as a real hard drive.

Since this is the first time we set up a hard drive, the dropdown for existing hard drives will be empty.

Virtual Machine hard drive

Select the option to create a new hard drive and click Next.

A wizard to create a new hard drive will now come up.

Create New Virtual Hard Drive Wizard

Click Next to start.

In this screen, we can choose the type of file for the new virtual hard drive.

In a dynamically expanding storage, the file created in you hard drive will start as a small file. As the VM starts to use space in the virtual hard drive, the file will grow as needed.

In a fixed-size storage, the file used for the virtual hard drive will be the same size as the hard drive in the VM, even if we’re not using all that space. It’s like reserving all that space for the VM.

In both cases, the hard drive will seem to be the same size for the virtual machine.

Virtual hard drive Storage type

I chose dynamically expanding storage. Click Next when you’re done.

In the next screen, we can choose where we want to save the file used for the virtual hard drive and the size of the virtual hard drive. The recommended minimum size, and what I’ll use, is 10 GB.

Virtual hard drive size

Click Next when you’re done.

The next screen has the information of the new virtual hard drive.

Virtual hard drive summary

Click on Finish to close the wizard and create the new virtual hard drive.

The next screen shows the information of the new virtual machine.

Virtual Machine summary

Click Finish to close the wizard and create the virtual machine.

Our new virtual machine will be listed in the main window.

Windows VM listed in VirtualBox

Installing Windows

We now have our virtual machine, but it has no operative system yet. Let’s install Windows XP.

Select the virtual machine on the main window and click on the Start button (green arrow) at the top.

You’ll be presented with this dialog. It’s just saying that from now on, the input from your keyboard and mouse will be captured by the virtual machine. If you need to do something outside your virtual machine, just press the Control key on the right side of your keyboard, next to the arrow keys. When you want to get back to your virtual machine, just click inside the window and the VM will start capturing the keyboard and mouse events.

VM auto capture

You can check the checkbox at the bottom to not get this message every time the VM starts capturing the mouse and keyboard events. Click OK to close this dialog.

Since there’s no operative system installed on our VM, the First Run Wizard will appear. This will allow us to install the OS.

First Run Wizard

Click Next to start.

Since Windows is not installed yet, the virtual machine can’t boot from the virtual hard drive yet. We’ll need to boot from a CD, just as if we were installing Windows on a blank hard drive.

Insert the CD for Windows in your CD-ROM. In my case is Windows XP in Spanish. Make sure the corresponding drive with the CD is selected in the Media Source dropdown.

Windows installation drive

Click Next to continue.

The next screen will show information about the drive we’ll use to boot the virtual machine.

First Run summary

Click Finish to start the virtual machine. The installation of Windows XP will start. Install Windows XP as you would normally do on any computer.

Windows XP installation

When the installation is complete, the VM will restart and Windows will start in the virtual machine.

Windows XP on VM

Your new Windows will work as any other Windows installation. You can install programs, open files, navigate the web, etc. You can even shut it down from the Start menu in the VM. Don’t worry, your PC will not shut down, only your virtual machine.

There you have it, another operative system running on your desktop! Remember, you can have multiple operative systems set up on VirtualBox. Please leave your comments.

Get Free Updates
Related Posts