Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to mount cdrom /dev/sr0 after boot from VagrantFile #13533

Open
filoucrackeur94220 opened this issue Nov 5, 2024 · 0 comments
Open

Comments

@filoucrackeur94220
Copy link

Issue Description

With VirtualBox 7.0 and Vagrant, it seems impossible to associate an optical device from an .iso file without preventing the priority booting from the hard disk. Even when forcing the boot order, the virtual machine always boots from the attached ISO file instead of the present hard disk, causing issues during startup.

Configuration

Here is the configuration I am using in my Vagrantfile:

config.vm.disk :dvd, name: "trimbox-server.iso", file: ENV['ISO_PATH']

vb.customize ["modifyvm", :id, "--boot1", "disk"]
vb.customize ["modifyvm", :id, "--boot2", "none"]
vb.customize ["modifyvm", :id, "--boot3", "none"]
vb.customize ["modifyvm", :id, "--boot4", "none"]

Expected Behavior

I expected the virtual machine to boot from the hard disk when it is present, even if an ISO file is attached. In other words, I wanted the boot order to be respected, allowing for normal startup from the hard disk.

Actual Behavior

However, the virtual machine always boots from the attached ISO file when it is present, even after specifying the boot order. This prevents the operating system installed on the hard disk from booting correctly.

Reproduction Information

Vagrant Version

vagrant -v

Vagrant 2.4.1

Host Operating System

Fedora 41 with GNOME

Guest Operating System

Create a Vagrantfile using the configuration above.
Bring up the virtual machine with vagrant up.
Observe that the virtual machine boots from the ISO file instead of the hard disk.
Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/bionic64"

  # ISO configuration
  config.vm.disk :dvd, name: "test-server.iso", file: ENV['ISO_PATH']

  # Boot order configuration
  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--boot1", "disk"]
    vb.customize ["modifyvm", :id, "--boot2", "none"]
    vb.customize ["modifyvm", :id, "--boot3", "none"]
    vb.customize ["modifyvm", :id, "--boot4", "none"]
  end
end

Debug Output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant