With a virtual machine like VirtualBox you can virtually install multiple operating systems, without having to buy any new hardware.
Maybe you’ve heard of virtual machines (VM), but never tried one out yourself. You might be scared that you won’t set it up correctly or don’t know where to find a copy of your preferred operating system (OS). VirtualBox is the best virtual machine for home users , and you can use this virtualization software with our help.
In this guide to using VirtualBox, you’ll learn why you should use the software, how to install an OS, and advice to make it work for you. We’ll explain everything and share tips along the way so you won’t get lost. Let’s jump in!
What Is VirtualBox and Why Use It?
VirtualBox is a piece of software published by Oracle. It allows you to emulate an operating system on your own PC and use it like it’s running on real hardware. You’ll discover tons of uses for virtual machines .
If you want to try Linux, you can install it in a virtual machine without any risk of screwing up an install or dual-boot. Or, you can mess with risky software or hacks without jeopardizing your computer. Maybe you need to run a virtual copy of an older operating system for compatibility reasons .
Whatever your reason, VirtualBox is the easiest and safest way to install a “new computer” on your own machine with no risk. And it’s free for home users.
Getting Started With VirtualBox
To start, head to VirtualBox’s download page. You can use the software on Windows, macOS, and Linux. We’re using Windows for this tutorial, but it’s nearly identical on all three platforms. Look under the VirtualBox X.X platform packages and download the copy for your operating system.
Run the installer as normal — there’s nothing you should change during the process. Do note that the installer will temporarily stop your internet connection, so don’t install VirtualBox when running a critical download. If you see a Windows dialogue asking you to install a driver, go ahead and allow it.
When you’re done, you’ll see VirtualBox’s main screen.
Since you don’t have any virtual machines installed yet, you’ll need to create one. In this guide, we’ll run through two common scenarios — installing Windows 10 and installing Ubuntu. But before you start, we recommend you check one setting.
By default, VirtualBox saves virtual machine information in your user folder. If you only have one drive in your PC, this works fine. But if you have a second hard drive, you may prefer to save your virtual machines there to save space on your primary drive . In a few minutes, you’ll create a virtual hard disk that’s 20GB or more in size. On a small SSD , this could be too much space to use up.
To do so, go to File > Settings in VirtualBox. On the General tab, you’ll see a Default Machine Folder field. If you don’t like where it’s at by default, click Other in the drop-down box to change it now.
Install Windows 10 in a Virtual Machine
Whether you want to use Windows on your Mac or Linux machine or want a secondary copy of Windows to mess around in, here’s how to get a full version of Windows 10 running in VirtualBox. If you want to install Windows 7 or 8.1 instead, you can still follow along as it’s a similar process. With a bit of extra work, you can even install Windows XP in a VM .
Creating the Virtual Machine
Start by clicking the blue New button on VirtualBox’s main page. You’ll need to give your VM a name. Choose something unique so you can identify it among your machines. After you enter a name, VirtualBox will automatically change the Type and Version fields to match what you entered. If it isn’t correct, make sure to set Type to Microsoft Windows and Version to Windows 10 (64-bit). Click Next when you’ve confirmed this.
Note: Whether you install the 64-bit or 32-bit version of Windows will depend on your own PC. If your computer is less than a few years old, it’s almost certainly 64-bit and you should thus install 64-bit Windows in your VM. VirtualBox automatically installs the correct version of its software for you.
No 64-Bit Option?
If you’re using a 64-bit PC and don’t see any 64-bit options in the Version list, you need to fix that problem before moving on.
First, try disabling Hyper-V, which is Microsoft’s platform for virtual machines .
Type Windows Features into the Start Menu and open the Turn Windows features on or off option. In the resulting dialogue, scroll down and make sure the box by Hyper-V isn’t checked. If it is, uncheck the box, click OK, and restart your PC.
Still don’t have 64-bit options in VirtualBox after this? You next need to reboot into your BIOS .
Once inside, look for a Virtualization option. Common names include Intel VT-x, Intel Virtualization Technology, and Virtualization Extensions. You may find these under the Processor or Security menus. If you can’t find it, try a Google search for your computer’s name plus enable virtualization.
Once you’ve enabled virtualization in the BIOS and saved the settings, reboot and try to create a 64-bit VM again. You should be good to go. If not, chances are that your processor doesn’t support 64-bit virtualization and you’ll have to continue with a 32-bit flavor.
Picking back up on creating your VM, you’ll next need to specify the amount of RAM to give the virtual OS. VirtualBox will provide a recommendation here, but it’s probably too low. With too little RAM, your VM will suffer from poor performance . But give the VM too much RAM, and your host PC might become unstable.
The exact amount to allocate depends on how much RAM you have . As a general rule of thumb, giving half your system RAM to the VM should suffice. Windows 10 will work well enough with 4GB of RAM.
Use the slider or type the value of RAM you want to give the VM in megabytes. Since computers calculate bytes differently than humans, multiply the GB of RAM you’re providing by 1,024. So if you want 4GB of RAM in the VM, enter 4,096, not 4,000.
Add a Virtual Hard Disk
Next, it’s time to add a hard disk so the VM can store data. On this screen, select Create a virtual hard disk now to make a new one. Next, VirtualBox asks you to choose the type of hard disk file. Leave the default VDI selected and click Next.
VirtualBox can create two different types of virtual hard drives — dynamic and fixed. A Dynamically allocated disk only takes up space on your actual drive as it’s filled. So if you create a 100GB virtual disk but only use 30GB, it only uses 30GB of space on your PC’s drive. But if you free up space in the VM, it won’t shrink the virtual disk.
The other option is a Fixed size disk. This creates the disk at its maximum size from the start. It thus takes up more space initially, but could feature some slight speed increases compared to a dynamic disk. You can decide which you prefer; we’ll go with Dynamic in this example. That way, if you don’t install much in your VM, you won’t waste space with a fixed disk.
To finish the disk, specify a save location and a size. You can leave the name as the default, which matches your VM’s name. The default location is inside the Default Machine Folder you set up earlier. For sizing, Microsoft states that 20GB is the requirement for 64-bit Windows 10. If you can spare it, 40GB is a good minimum to leave some breathing room for a few programs and files. Feel free to increase this if you have lots of free space.
When you’re done, click Create, and your VM is ready to install Windows!
Download the Windows 10 Installer
Now you’ve created a virtual machine, but you need an operating system to install. For that, you should visit Microsoft’s Windows 10 download page. Click the Download tool now button to grab a copy of the Windows 10 media creation tool .
After the tool downloads, launch it and you’ll have a choice of upgrading your own PC or creating installation media. Choose the Create installation media option, then double-check the options on the next page. Make sure the Edition is Windows 10 and the Architecture is 64-bit (x64). If these aren’t right, uncheck the Use the recommended options for this PC box and fix them.
Your last choice is whether to create a bootable USB drive or create an ISO. Choose the ISO file option and specify a place to save it, then the tool will begin downloading Windows.
Mounting the Install Disc
An ISO is a disc image file . If you were installing Windows on a physical computer, you’d have to burn the ISO to a DVD and place it in your PC to start installing Windows. But we can skip that step and mount the ISO file into our virtual machine directly.
To do so, highlight your VM in VirtualBox’s main menu and click Settings. Visit the Storage tab on the left and you should see a CD icon in the Storage Tree box. Click that icon, then the CD with an arrow next to it on the right side. Select Choose Virtual Optical Disc File and then browse to where you saved the Windows.iso file.
Then, jump to the System tab. Under Boot Order, click the Optical entry and use the arrows to move it above Hard Disk. For some reason Floppy is enabled by default — though Windows 10 does support floppies, feel free to uncheck that.
Click OK, and you’re ready to boot into the Windows installer.
Installing Windows 10
On the VirtualBox main menu, choose your Windows VM and click the Start button to boot it. After a moment, you’ll see the Windows 10 install screen. Make sure your regional settings are correct, then hit Next. On the next screen, click the Install now button.
Windows will then ask you for a product key to activate it. However, you actually don’t need a product key to use Windows 10 .
If you have one (a valid Windows 7 or 8 product key will work too), you can enter it now. If not, just click I don’t have a product key. Using a copy of Windows 10 that’s not activated has a few limitations, but it will work fine for light VM use.
Next, you’ll choose the edition of Windows 10 you want to install. If you have a product key for Windows 10 Home or Pro, select the matching version.
But if you don’t plan to activate the OS, go ahead and install Windows 10 Pro so you gain access to its extra features . Accept the license terms, and continue on with the installation.
Next, you’ll have a choice between Upgrade and Custom installations. You can’t select Upgrade since you’re installing Windows on a blank virtual disk, so choose Custom.
You’ll see the virtual drive you created, named Drive 0 here. Click it to select it. Once you choose Next, the Windows 10 installation begins. Sit tight for a bit — the install process can take a while.
Configure Windows 10 Options
Once the install finishes, you’ll hear Cortana start talking. She’ll guide you through the installation process of Windows 10. Click the microphone icon in the lower-left corner of the screen to keep her quiet if you like.
Confirm your region and keyboard, then click Yes after each one. Click Skip if you don’t type with a second keyboard layout or language.
After this, the virtual Windows installation will check for updates. Wait for them to install, then Cortana will ask if your PC is your own or belongs to an organization. Select Set up for personal use.
Windows wants you to sign in with a Microsoft account, so you’ll see a prompt to enter your email address or create a new account. While there are benefits to using a Microsoft account, you might not want to use one for your VM. In that case, select Offline account in the bottom-left corner. It will nag you to create a Microsoft account anyway; click Maybe later.
Enter a name for your account, then create a password. Recovering a lost password is a huge pain, so make sure you save this somewhere. Create a password hint if you want, then click Next.
Now, you’ll have to decide whether to use Cortana. She can do a lot, and if you’re new to Windows 10 you might want to check it out. Choose Yes or No to proceed.
Windows will then throw privacy settings at you . You can select how much info you’re comfortable with sharing. Uncheck as needed, then click Accept.
Finally, you’re done. Let Windows complete the setup. Once you see the desktop screen, your VM is ready.
Installing Guest Additions
You can now use Windows inside VirtualBox, but you should install another important component right away. They’re called Guest Additions, a group of drivers and other utilities that let VirtualBox better interface with your host machine. After you install them, you can dynamically resize the VM window, enable bi-directional drag and drop, and more.
VirtualBox installs these via a virtual CD. Since you still have the Windows install image mounted, you need to remove that first. From the VM window, right-click the CD icon and choose Remove disk from virtual drive.
Then, mount the Guest Additions CD by visiting Devices > Install Guest Additions CD Image on VirtualBox’s menu bar. To launch it, open the File Explorer from the Taskbar at the bottom of the screen, then click This PC on the left. Double-click on the CD Drive icon to install the Guest Additions. Click Yes when you see a prompt for administrator permissions.
After a moment, you should see a new icon for the setup in the Taskbar at the bottom. Click this, then click Next to continue through the steps. If you see a prompt for installing device software, click Install.
You’ll see a prompt to reboot to complete the installation. Go ahead and do that now so you can take advantage of the new features. Without them, you’ll be stuck using a low-resolution screen.
After you boot back in, you’re all set. Feel free to expand your VirtualBox window to take advantage of your full screen size. Don’t forget to right-click the CD icon and remove the Guest Additions CD.
Windows 10 Basics
In case you’re trying Windows 10 from Linux or otherwise using it for the first time, we’ll cover a few quick usage tips so you know your way around. Check out our tips for Windows newcomers and the coolest new features of Windows 10 for more.
- Click the Start button in the bottom-left and then click on the Gear icon to open the Settings menu. This is where you can configure most aspects of Windows 10 .
- To install updates, visit the Update & security tab in Settings, then the Windows Update tab on the left side. Updating makes sure you get the newest features, important if you’re using a VM to evaluate Windows 10.
- Windows 10 includes a built-in antivirus, Windows Defender , so you don’t have to worry about installing one for your VM.
- Use the search box in the bottom-left to look up programs, files, and settings in Windows.
- You can browse the Windows Store for new Modern apps , but it’s a bit underwhelming. We recommend downloading the best Windows software from a reputable download site instead.
- To shut down Windows 10, click the Start button in the bottom-left of your screen. Then hit the power icon, followed by Shut down. Windows will shut down and then VirtualBox will automatically close the VM.
Other than this, feel free to have fun! Mess around, explore, and don’t be afraid to break something. It’s just a VM, and you can easily restore it using a snapshot if something goes wrong. See the tips section below for information on these.
Install Ubuntu in a Virtual Machine
If you already use Windows, you probably don’t have much use for installing it in a virtual machine. But giving Linux a try in a VM is a great option. It’s a lot easier than dual-booting — you can test the waters without worrying about breaking anything.
As you might know, there are hundreds of versions of Linux — known as distributions. We’ll install Ubuntu , one of the most popular, for this example. But if you want to experiment, try one of the other great VM-ready Linux flavors .
The initial work of creating a VM in VirtualBox is almost identical for Ubuntu as it is for Windows 10. We’ll run through it here quickly; check above in the Windows section if you need more help.
Create the Virtual Machine
Open VirtualBox and click the blue New button to start making a new machine. Give the new VM a unique name — Ubuntu is fine. If the Type and Version don’t automatically change with the name, make sure they’re set to Linux and Ubuntu (64-bit) respectively before clicking Next. The Windows discussion on 32 and 64-bit OSes also applies here — you should install the 64-bit flavor of Ubuntu if you’re using a 64-bit machine.
Next, decide how much RAM to give the VM. Like Windows, providing half of your system RAM should be enough. You shouldn’t use any less than 2GB or the VM’s performance will probably suffer. Additionally, to save RAM, make sure to close as many running programs on your PC as you can when using your VM. Multiply the GB of RAM you’d like to use by 1,024 — so 2GB of RAM is 2,048MB here.
Now you’ll need to create a virtual hard disk for Ubuntu. Leave the default Create a virtual hard disk now checked and click Create. VDI (VirtualBox Disk Image is fine for the file type; click Next again.
Then, you’ll need to decide whether you want a dynamic or fixed disk. A dynamic disk grows as you use it up to a maximum size, while a fixed disk is set from the beginning. If you’re just playing around in a VM, Dynamically allocated will work fine. Click Next.
You can keep the disk name matching the name of your VM. Then you just need to choose the disk size. Ubuntu doesn’t take up as much space as Windows 10, so you don’t need as large of a disk. If you don’t plan on installing lots of programs and using this VM all the time, 40GB is a good size if you can spare it. But if not, Ubuntu’s recommended 25GB is fine.
Click Create and your VM is ready for an OS.
Next, you’ll need to grab a copy of Ubuntu. Head to the Ubuntu download page to do so. You’ll notice that there are two versions on offer –the older LTS (long-term support) and a newer version.
LTS, the excellent 16.04 at the time of writing, is more stable and the company keeps it current with security updates for five years. The newer version, 17.04 at publication time, includes the latest features but only receives security updates for nine months.
Unless you’re a Linux enthusiast, it makes more sense to install the LTS edition in your VM. This means you won’t have to worry about upgrading in a few months and you won’t miss the few cutting-edge changes.
Click the Download button next to the LTS edition. Ubuntu will ask you for a contribution, but Linux is completely free , so click continue to the download. Consider supporting open-source software if it’s important to you, though.
If you’d like, you can click the Alternative downloads and torrents text to download Ubuntu via BitTorrent instead. This could speed up your download, but use the standard download button if you don’t have a BitTorrent client installed or aren’t sure.
Attach the Ubuntu Installer to Your VM
Once the download finishes, you’ll have an ISO file to install Ubuntu with. In VirtualBox’s menu, click your Ubuntu VM and then the Settings button. Select the Storage tab and click the CD icon that says Empty next to it. On the far right side, click the other CD icon with an arrow next to it, and pick Choose Virtual Optical Disc File. Browse to where you saved the Ubuntu ISO and double-click to select it.
Flip over to the System tab and in the Boot Order list, click the Optical entry. Use the arrow keys to move it to the top above Hard Disk, and uncheck Floppy while you’re here. Click OK to save your settings, then select your VM on the main menu and click Start to load it up.
Now you’re getting to the fun part — installing Ubuntu in your VM just like you’d install it on a real computer. After you click Start, give your VM a moment to load the Ubuntu installer.
The first screen you see asks if you want to Try Ubuntu or Install Ubuntu. You want to install it, so choose that option.
Next, you can check two boxes to save some time. The top will download the latest updates for Ubuntu while it installs. The second box offers to install third-party software like graphics and network drivers, along with plugins for Flash and other common formats.
Unless you’re trying to live a completely open source life (as some of this is proprietary), you should check both of these boxes to save some time. Click Continue to proceed.
Because your VM is blank, Ubuntu next asks how you want to install it. The default Erase disk and install Ubuntu is what you want. You can also select to encrypt the installation and use LVM if you want. Since this is a VM, neither is really necessary. Click Install Now, then Continue at the prompt.
Confirm your time zone, then click Continue. Next, select your keyboard layout and Continue again.
Finally, you’ll need to set a username and password. Enter your name and specify a name for the VM — this lets you identify it from others. Specify a username, which can be the same as your own name. Then pick and confirm a password. Don’t forget it!
If you select Log in automatically, Ubuntu will automatically log your account in as soon as you boot up. Since this is a VM, you might want to check this option for convenience. If not, you’ll have to enter your password to log in, like with any other computer. You can also choose to encrypt your home folder if you want more security, though you don’t need to do this for a VM.
After you click Continue, you’ll get a little slideshow of its features while you wait for Ubuntu to install. When it’s complete, you’ll see a message prompting you to reboot. Do so, and Ubuntu will ask you to remove the installation medium. Right-click the CD icon at the bottom and choose Remove disk from virtual drive, then press Enter. If the disc is grayed out, just press Enter anyway.
Your VM will reboot and place you at the Ubuntu desktop.
Installing Guest Additions
Just like with Windows, you should install the Guest Additions right away to enable all of VirtualBox’s features. Choose Devices > Install Guest Additions CD Image and you’ll see a prompt asking if you’d like to run this. Click Run and enter your password.
You’ll see a Terminal window pop up and run through the installation. When you see Press Return to close this window, press Enter. Then you need to reboot. Click the gear/power icon in the top-right of your desktop and choose Shut Down, then hit the Restart button.
Now you’re all set to dive into Ubuntu.
In case you’ve never used Linux before , you should know a few things about how Ubuntu works to get around your new VM. Check out our tips on customizing Ubuntu and must-have software for a new installation for more.
- Click the Settings button on the left Dock to open Ubuntu’s System Settings menu. This is where you can change your wallpaper, adjust sound options, add accounts, and more.
- The Ubuntu icon at the top of your Dock is like the Start Menu in Windows. Click it to open a search bar that lets you search for files, apps, and more.
- You don’t have to be scared of the Terminal — it’s not necessary for casual use of Ubuntu. Once you get used to it, typing commands is a lot faster than navigating visual menus. Check out some ways to learn Linux Terminal if you want to dip your toe in.
- To install software, click the Ubuntu Software icon on the Dock — it looks like a shopping bag. This is your one-stop place to install software for Linux . Check the Updates tab at the top to install updates for your apps as well as OS updates.
Ubuntu is a great distribution of Linux for beginners, so have a look around and see what you think.
Install macOS in a Virtual Machine
Looking to install Apple’s macOS in a VM? It’s a lot more involved than setting up Windows or Linux because macOS is designed to only run on Apple hardware. Diving into the complete process is beyond the scope of this article, so please check out our guide to installing macOS in VirtualBox if you want to embark on that quest.
Now that we’ve walked through the installation of two popular operating systems, let’s go over some of VirtualBox’s useful tools and a few other incidentals you should know about.
Insert Key Combinations
Certain key combinations are always captured by your own computer. For example, there’s a critical Windows process devoted to catching when you press CTRL + ALT + DEL. If you try to press that key combo for your VM, it will only activate on your host OS.
To insert these key combos, go to the Input tab on VirtualBox’s menu. Select Keyboard and you can choose to send a few different key combos, like CTRL+ ALT+ DEL and Print Screen.
Take a Screenshot
You probably have a screenshot tool installed already on your own computer. But you can grab a screenshot of your VM without fiddling to get the exact dimensions. Just press the right CTRL key (which VirtualBox calls the Host key) and E together to capture a full-screen screenshot. Then you can choose where to save it.
Given the nature of VMs, you’ll probably want to do some potentially dangerous activities in them from time to time. Next time you want to test a suspicious file or perform a Registry hack, take a snapshot of your VM first. This lets you easily return to a clean state without having to reinstall your OS.
You can take a snapshot whether the VM is running or not. To snapshot a running VM, go to Machine > Take Snapshot in the VirtualBox menu bar. Add a name of the snapshot (like Before testing fake antivirus malware) and a description if that will help you remember more about it. Click OK to save your snapshot.
To snap a closed VM, select it from the VirtualBox main menu. On the right side, click the Snapshots button. Then, click the camera button to add a new snapshot. You’ll have to add a name and description here, too.
Once you’ve saved a snapshot, you don’t have to do anything more until you want to restore it. Let’s say you’re testing something for malware and your VM becomes corrupted. Shut down the machine, then select its entry in VirtualBox’s main menu.
Click the Snapshots button on the right side again, and right-click the snapshot you want to restore. Choose Restore Snapshot. You’ll see a notice offering to save another snapshot of the current state. Chances are that if you’re restoring a snapshot, the current state of the machine is screwed up. If this is the case, uncheck the Create a snapshot of the current machine state box and hit Restore.
After restoring a snapshot, next time you load up your VM, it will be exactly as you had it when you took the snapshot. It’s pretty handy.
Share Folders and Clipboards
For better compatibility, you can enable a few features that let you easily move information between your own PC and the VM. Click Settings on a VM, then on the General category, open the Advanced tab.
Here, you can enable two options: Shared Clipboard and Drag’n’Drop. Sharing your clipboard lets you copy and paste items between your host OS and the VM. Enabling the second option lets you drag a file from one machine to the other to copy it.
Both provide four choices: Disabled, Host to Guest, Guest to Host, and Bidirectional. If you want to use this, there’s no reason to pick anything other than Bidirectional as it’s the most convenient. Once you save the preference, simply drag a file from your own PC to the VM to make a copy.
VirtualBox also offers a Shared Folders option. With this, you can allow access to specific folders on your PC from your VM. For the casual user, though, dragging and dropping should suffice.
You can shut down or restart your VM using the OS’s built-in shutdown option. But you can also visit File > Close for some additional shutdown options. You have three:
- Save the machine state: Selecting this option will “freeze” the VM’s current state to your hard drive and close it. Next time you start the VM, VirtualBox will pick up exactly where you left off. This is a bit like to putting your computer to sleep , except the saved state will persist until you re-open the VM.
- Send the shutdown signal: This is equivalent to clicking Shut Down in the VM’s OS. Choosing this option will tell the VM to shut down and execute a clean shutdown cycle .
- Power off the machine: Powering off the machine is like pulling the plug on a real PC , instantly killing it. You can use this if a VM is frozen, but don’t do so unless you have to. The system will have to inspect the virtual disks and pulling the plug when the OS is busy could result in lost data.
Editing VM Properties
Most of your VM’s properties aren’t permanent. Click a machine in the VirtualBox main menu and choose Settings to review its options.
In the System category, you can adjust a VM’s RAM. If its performance stutters, try giving it a bit more assuming your PC has enough. On the Processor tab, you can dedicate additional CPU cores if you really want your VM to soar.
On the User Interface left tab, you can change the options that VirtualBox provides in its menus. You might want to enable the few that are left off by default so you have every control at your fingertips, or remove some to reduce clutter.
How Do You Use Virtual Machines?
Now you know everything you need to use VirtualBox effectively. We’ve covered installing and configuring the software, creating virtual machines, downloading new operating systems, and setting them up for first-time use. You can even download pre-built virtual disk images for VirtualBox to save some time.
At this point, you’re only limited by your own creativity. What will you use virtual machines for? Test a new operating system, have fun breaking everything, or just try some OS-specific software you’ve never experienced. VirtualBox makes it easy, and we hope you have fun with virtual machines.
For a totally different use of VMs, try creating a VM clone of your PC’s hard drive .
Image Credit: realinemedia/Depositphotos