How do I select startup disk in VirtualBox?

VirtualBox is an open-source virtualization software that allows you to run operating systems like Linux, Windows, and macOS as virtual machines on your current operating system. A startup disk refers to the virtual hard disk that contains the guest operating system files that will boot inside the virtual machine. When you create a new virtual machine in VirtualBox, you must specify which virtual hard disk to use as the startup disk. This startup disk contains the files necessary to launch the guest OS.

In VirtualBox, you have the ability to configure the startup order to determine which virtual hard disk boots by default when launching a virtual machine. You can have multiple virtual disks attached to a VM, but only one can be designated as the primary startup disk. This guide will cover how to view, change, and set the default startup disk in VirtualBox.

Prerequisites

Before getting started with changing the startup disk in VirtualBox, you’ll need to have VirtualBox installed and set up on your host operating system. VirtualBox is available for Windows, macOS, Linux, and Solaris hosts, with system requirements that vary slightly depending on platform. For example, VirtualBox’s documentation lists the following minimum requirements for a Windows host:

  • A 64-bit Windows 8.1 or newer host system
  • At least 4GB of RAM (8GB recommended)
  • Hardware virtualization support enabled in BIOS

So as long as you have VirtualBox installed and meet the minimum system requirements for your host OS, you’ll be ready to start working with virtual machines and configuring startup settings.

Viewing Current Startup Order

The current startup order of virtual machines can be viewed in Oracle VM VirtualBox Manager, which is the default graphical user interface included with VirtualBox. To open VirtualBox Manager, search for it in the start menu or launch it from the command line by running VirtualBox.

In VirtualBox Manager, the startup order is visible in the left pane under “Virtual Media Manager”. Any virtual machines configured to start automatically at host startup will be listed at the top. The order in which they are displayed here determines the startup sequence.

By default, the first VM added to VirtualBox will be set as the primary auto-start VM. Any subsequent VMs will start up after the first one has finished booting. The auto-start order can be changed as needed (see next section).

So in summary, open VirtualBox Manager and look in the left media manager pane to see which VMs are set to auto-start on host boot, and the specific order they will initialize in.

Temporarily Changing the Startup Disk

One easy way to temporarily change the startup disk in VirtualBox is by using the VirtualBox Manager interface. This allows you to select a different virtual disk without permanently altering the boot order configuration.

To do this, first launch the VirtualBox Manager and locate the virtual machine you want to change the startup disk for. Right click on the VM and select “Settings”.

In the settings window, go to the “System” tab and find the “Boot Order” section. Here you will see a list of available virtual disks for that VM. Use the up and down arrows to reorder the list so that your preferred startup disk is at the top.

Now when you start the virtual machine, it will boot from the disk you just selected instead of the previous startup disk. This change only applies for the current session – when you restart the VM later, it will go back to the original boot order configured in the VM settings.

So in summary, VirtualBox Manager gives you an easy way to temporarily override the boot order and startup disk without having to edit the VM configuration itself. Just use the settings interface to reorder the boot list before starting up the virtual machine.

Permanently Changing the Startup Order

The easiest way to set a permanent startup order in VirtualBox is through the VirtualBox Settings window. Here are the steps:

  1. With your virtual machine shut down, go to the Oracle VM VirtualBox Manager window and select the VM.
  2. Click on “Settings” > “System” > “Motherboard” tab.
  3. Under the “Boot Order” section, use the up/down arrows to position the boot devices in the order you want.
  4. Typically you’ll want Hard Disk first, followed by DVD/CD-ROM.
  5. Click “OK” to save the settings.

Now whenever that virtual machine starts up, it will follow the boot order you set here. This allows you to have a permanent startup disk even with multiple devices attached.1

Note that this boot order setting is different than boot priority, which allows you to select between multiple devices of the same type. Boot order sets the global sequence of device classes.

Setting a New Default Startup Disk

The default startup disk determines which virtual disk boots first when starting a virtual machine in VirtualBox. To set a new default startup disk:

1. Open the Settings dialog for the VM and go to the System tab.1

2. In the Boot Order section, use the drop-down menus to select the boot device you want to be first in the startup order.

3. The top device in the list will be the default startup disk. So if you want the first attached hard disk to boot by default, set Hard Disk as first in the order.

4. Click OK to save the new startup order.

Now whenever you start the VM, it will boot from the disk you specified as first in the order by default. You can temporarily override this when starting the VM to choose a different disk.

Setting the boot order determines which device boots first by default. But you can also set a specific disk as the default in the VM’s Settings.

Boot Order vs. Boot Priority

There is an important difference between boot order and boot priority in VirtualBox. The boot order determines the sequence in which VirtualBox checks devices to locate a bootable operating system. The boot priority allows you to control which operating system loads if multiple bootable operating systems are available.

The boot order is set in the VM’s System settings, on the Motherboard tab. It defaults to Floppy > Optical > Hard Disk, meaning VirtualBox will first check for a bootable floppy disk, then a bootable optical/CD/DVD disk, and finally the hard disk. You can change the boot order if you want VirtualBox to check the devices in a different sequence.

Boot priority comes into play when there are multiple bootable operating systems available on the hard disk. You can set the boot priority order of the operating systems under the System settings, Storage tab. The operating system with the highest priority will load when the VM starts up.

So in summary, boot order determines the device boot sequence, while boot priority selects the bootable operating system if there are multiple installed. Configuring both properly ensures your desired operating system loads when starting the VM.

Starting a VM from the Command Line

You can start a VM from the command line using the VBoxManage startvm command. This allows you to specify the VM name and startup disk.

For example, to start the VM called “MyVM” using the disk “WinXP.vdi” as the startup disk:

VBoxManage startvm "MyVM" --type emergencystop --disk "WinXP.vdi"

The --type emergencystop option causes the VM to start up immediately, without going through the regular power on sequence. This is useful for troubleshooting boot issues.

You can view all the disks attached to a VM using VBoxManage showmediuminfo. Then specify the disk UUID or path when starting the VM to set the startup disk.

For more details, refer to the VirtualBox user manual: https://www.virtualbox.org/manual/ch08.html

Troubleshooting Issues

If you encounter problems selecting or changing the startup disk in VirtualBox, here are some common fixes:

If you get the error “No bootable medium found”, make sure the VM settings have a disk controller and hard disk attached. You may need to add an IDE or SATA controller and associate the virtual hard disk file. See this VirtualBox forum thread for more details.

On Mac OS X, crashes when selecting the startup disk can occur due to permissions problems with the VirtualBox VM folders. Check that your user account has full read/write access to the VirtualBox VMs folder and VM subfolders. See this discussion for help.

For startup issues after upgrading Windows or VirtualBox, try resetting the boot order in the VM settings. Delete all existing boot order entries, add the virtual hard disk, and move it to the top. See this guide for step-by-step instructions.

If the VM gets stuck right before showing the operating system splash screen, enable EFI mode in the VM settings. Some operating systems like Windows 11 require EFI to boot properly in VirtualBox.

Conclusion

Selecting the startup disk in VirtualBox allows you to control which operating system boots by default when starting a virtual machine. The startup order determines the boot sequence, trying each disk in order until one successfully starts.

The easiest way to change the startup disk is through the VM Settings dialog. This lets you set a new default that persists across reboots. For one-time changes, you can override the startup order when powering on the VM. The boot order differs from boot priority, which controls the sequence when booting multiple disks from one OS.

With the methods covered in this guide, you should be able to configure your preferred startup disk in VirtualBox. Just remember your options: the VM Settings dialog for permanent changes, startup order overrides for temporary swaps, and CLI commands for advanced control.

The ability to select between multiple virtual disks is a key feature of VirtualBox’s flexibility and power. Mastering startup configuration will let you build multi-boot virtual machines and seamlessly switch between operating systems.