1

The boot order setting of virtual box only allows to choose boot order between different classes of devices, like hard disk, optical, floppy, etc.

What I can do is to hit F12 during boot and choose one of the hard disks from the boot menu that will appear, yet I have to repeat that procedure at every boot. How can I permanently change the boot order among multiple hard disks until I want to change it again?

Changing the attachment order of hard disks is no usable solution as it will change the boot order but it will also change the hard disk naming in the booted system. On a real PC I can choose from which hard disk to boot in the BIOS and this setting sticks permanently.

1

Unfortunately it appears that this is still an issue. As of this writing you can specify device class order but do not have the ability to specify a disk order.

This is a feature that should be implemented. Even if there is some technical reason for not allowing the user to specify a disk order, allowing the user to specify a controller order would help most cases.

1
0

If you're on Ubuntu try using VBoxManage:

VBoxManage modifyvm [MACHINE NAME] --boot1 dvd --boot2 disk --boot3 none --boot4 none


Check this out for some insight: https://www.andreafortuna.org/2019/10/24/how-to-create-a-virtualbox-vm-from-command-line/

1
  • Unfortunately this command only sets the device class boot order, not an individual disk boot order. OP states they are already aware of this feature and that it does not help their situation. – Starson Hochschild Feb 22 at 19:00
0

When you create your VM, you need to choose/add your HD on a particular order

for me on a dual HD (OS on disk1 and backups on disk2), i need to add my backups disk before the OS on virtualbox "storage" tab.

it boots perfectly (= without using F12 on boot) in one case, not in the other.

Command line equivalent are:

sudo VBoxManage storagectl windows --name "SATA Controller" --add sata --controller IntelAhci
sudo VBoxManage storageattach windows --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium ${VMdir}/disk_c.VHD
# sudo VBoxManage storageattach windows --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium ${VMdir}/iso.iso
sudo VBoxManage storageattach windows --storagectl "SATA Controller" --port 2 --device 0 --type hdd --medium ${VMdir}/disk_d.vdi

--

--

if your HDs are bad disk letter => in my case, my save disk D: was moved on E:

I applied "regedit method" thanks to https://techcult.com/3-ways-to-change-drive-letter-in-windows-10/

I removed "HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\D:DosDevices\D:"

Changed the name of "DosDevices\E:" to "DosDevices\D:"

Rebooted

And... that's all folks ;)

WARNING: use this hint at your own risk so save your data before making these 2 registry changes !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.