Vagrantfile로 개인 네트워크 IP를 구성하면 vagrant up을 실행할 때 터미널에서 암호 오류가 출력됩니다.

Vagrantfile로 개인 네트워크 IP를 구성하면 vagrant up을 실행할 때 터미널에서 암호 오류가 출력됩니다.
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

vagrant를 사용하여 두 개의 가상 머신을 설정하고 있는데, 가상 머신 IP를 설정하기 위해 vagrantfile을 편집하려고 하면 문제가 발생합니다. "vagrant up"을 실행하면 매우 비밀스러운 메시지가 나타납니다.

~/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

액세스가 거부되었습니다(확장 정보를 사용할 수 없음) VBoxManage: 오류: 컨텍스트: VBoxManageHostonly.cpp 파일의 라인 242에 있는 "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())"

이 블록은 VboxManageHostOnly.cpp라는 파일을 가리키지만 저는 그 파일을 건드린 적이 없습니다.

관련 정보