macOS Monterey에서 vagrant up 실패
12437 단어 VagrantVirtualBoxHomebrewmacOStech
이벤트
컨디션
$ sw_vers
ProductName: macOS
ProductVersion: 12.0.1
BuildVersion: 21A559
$ vagrant -v
Vagrant 2.2.18
$ brew -v
Homebrew 3.3.2-33-gcb32066
Homebrew/homebrew-core (git revision 1e9d510578e; last commit 2021-11-03)
Homebrew/homebrew-cask (git revision d5198633bb; last commit 2021-11-03)
잘못된 내용
생성
Vagrantfile
상태에서 실행vagrant up
하면 다음과 같은 오류가 발생하여 가상 머신이 부팅되지 않습니다$ vagrant init ubuntu/focal64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
$ ls
Vagrantfile
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/focal64' version '20211026.0.0' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "3e336932-d167-496b-83ed-537b6fa52468", "--type", "headless"]
Stderr: VBoxManage: error: The virtual machine 'ubuntu2004_default_1635924448821_54833' has terminated unexpectedly during startup because of signal 10
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
시도해 본 일
해결책
비디오 편집
Vagrantfile
의 설정 블록config.vm.provider
에서 vb.gui
를 진짜# `config.vm.provider` のブロックと`vb.gui=true`のコメントアウトを外す
$ vim Vagrantfile
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
# vb.memory = "1024"
end
결실
GUI
GUI
명령 수행$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/focal64' version '20211026.0.0' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => ...
$ vagrant status
Current machine states:
default running (virtualbox)
The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.
까닭
참고 자료
Reference
이 문제에 관하여(macOS Monterey에서 vagrant up 실패), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://zenn.dev/t_fukumoto/articles/bdf3d3389783f1텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)