
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "jasonc/centos7"
config.vm.define "test1" do |test1|
test1.vm.hostname = "test1"
test1.vm.network "private_network", ip: "10.9.8.5"
end
config.vm.define "test2" do |test2|
test2.vm.hostname = "test2"
test2.vm.network "private_network", ip: "10.9.8.6"
end
Ich richte zwei virtuelle Maschinen mit Vagrant ein und habe Probleme, wenn ich versuche, Vagrantfile zu bearbeiten, um die IPs der virtuellen Maschinen einzurichten. Beim Ausführen von „vagrant up“ werde ich mit einer sehr kryptischen Meldung begrüßt
~/shellclass/multitest$ vagrant up test2 Bringing machine 'test2' up with 'virtualbox' provider...
==> test2: Importing base box 'jasonc/centos7'...
==> test2: Matching MAC address for NAT networking...
==> test2: Checking if box 'jasonc/centos7' version '1.4.4' is up to date...
==> test2: Setting the name of the VM: multitest_test2_1656346764547_30766
==> test2: Clearing any previously set network interfaces... There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "ipconfig", "vboxnet4", "--ip", "10.9.8.1", "--netmask", "255.255.255.0"]
Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available) VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp
Zugriff verweigert (erweiterte Informationen nicht verfügbar) VBoxManage: Fehler: Kontext: „EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())“ in Zeile 242 der Datei VBoxManageHostonly.cpp
dieser Block verweist auf eine Datei namens VboxManageHostOnly.cpp, aber ich habe diese Datei nie berührt.