rdbreak / rhcsa8env

This is a RHCSA8 study environment built with Vagrant/Ansible
https://join.slack.com/t/redhat-certs/shared_invite/zt-7ju3rz7b-_G3Njp3PDwdBG_81SwPeLA
MIT License
295 stars 174 forks source link

Stderr: VBoxManage: error: Storage controller named 'SATA Controller' already exists #55

Closed ghost closed 2 years ago

ghost commented 3 years ago

Hi all,

I have installed all other softwares in my CentOS8. Then when I tried to use "vagrant up" to deploy the environment, i received the following errors. I have two hard drives and I am not sure if it's related.

Bringing machine 'server2' up with 'virtualbox' provider... Bringing machine 'repo' up with 'virtualbox' provider... Bringing machine 'server1' up with 'virtualbox' provider... ==> server2: Clearing any previously set forwarded ports... ==> server2: Clearing any previously set network interfaces... ==> server2: Preparing network interfaces based on configuration... server2: Adapter 1: nat server2: Adapter 2: hostonly server2: Adapter 3: hostonly server2: Adapter 4: hostonly ==> server2: Forwarding ports... server2: 22 (guest) => 2222 (host) (adapter 1) ==> server2: Running 'pre-boot' VM customizations... A customization command failed:

["storagectl", :id, "--name", "SATA Controller", "--add", "sata", "--portcount", 2]

The following error was experienced:

<Vagrant::Errors::VBoxManageError: There was an error while executing VBoxManage, a CLI used by Vagrant

for controlling VirtualBox. The command and stderr is shown below.

Command: ["storagectl", "d03f3308-2840-4b76-8dd6-0c7ecd164829", "--name", "SATA Controller", "--add", "sata", "--portcount", "2"]

Stderr: VBoxManage: error: Storage controller named 'SATA Controller' already exists VBoxManage: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), component SessionMachine, interface IMachine, callee nsISupports VBoxManage: error: Context: "AddStorageController(Bstr(pszCtl).raw(), StorageBus_SATA, ctl.asOutParam())" at line 1080 of file VBoxManageStorageController.cpp

Please fix this customization and try again.

adamdcameron commented 3 years ago

I am getting the exact same error message as above.

tonymwai commented 3 years ago

Hi all. I and new to rhcsa8env and recently installed it on an iMac. My first invocation of vagrant up worked just fine and I successfully shut down the environment. Every subsequent invocation of the command give me the same error as indicated above. I have resorted to manually starting the VM's (server 1, 2 and repo) via the VirtualBox GUI.

brian926 commented 2 years ago

This may be a hackaround, but change line 19 so vagrant will check if disk-0-1.vdi on server2 already exists before trying to create the SATA Controller,,

server2.customize ['storagectl', :id, '--name', 'SATA Controller', '--add', 'sata', '--portcount', 2]

     unless File.exist?(file_to_disk1)
        server2.customize ['storagectl', :id, '--name', 'SATA Controller', '--add', 'sata', '--portcount', 2]
      end
tovoro commented 2 years ago

Thank you, this seems to work for me