반응형
Homestead로 개발 설정을 하고 작업하다 보면
가끔씩 아래와 같은 에러가 발생하며 vagrant up이 계속 안 되는 상황을 맞닥뜨리게 됩니다.
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '12.1.0' is up to date...
==> homestead: Clearing any previously set forwarded ports...
==> homestead: Clearing any previously set network interfaces...
==> homestead: Preparing network interfaces based on configuration...
homestead: Adapter 1: nat
homestead: Adapter 2: hostonly
==> homestead: Forwarding ports...
homestead: 80 (guest) => 8000 (host) (adapter 1)
homestead: 443 (guest) => 44300 (host) (adapter 1)
homestead: 22 (guest) => 2222 (host) (adapter 1)
==> homestead: Running 'pre-boot' VM customizations...
==> homestead: Booting VM...
==> homestead: Waiting for machine to boot. This may take a few minutes...
homestead: SSH address: 127.0.0.1:2222
homestead: SSH username: vagrant
homestead: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
경험상 vagrant halt를 하지 않고 컴퓨터를 종료 시 해당 에러가 생기는 것 같습니다...
아주 골 때리는 상황이지요.
해당 box는 이미 맛이 간 것입니다..
DB에 저장된 데이터는 날아가지만 어쩔 수 없으니 새 box를 만드는 것을 추천드립니다.
데이터 날리는 것 빼고는 시간이 많이 걸리지 않습니다.
1. 기존 vagrant box를 삭제하고 다시 box를 만들어줍시다.
vagrant destroy
vagrant up --provision
2. 기존 homestead vm 삭제
저 같은 경우는 VirtualBox Vms 폴더에 이미 homestead 폴더가 있어서 아래 에러가 발생했습니다.
==> homestead: Setting the name of the VM: homestead
The name of your virtual machine couldn't be set because VirtualBox
is reporting another VM with that name already exists. Most of the
time, this is because of an error with VirtualBox not cleaning up
properly. To fix this, verify that no VMs with that name do exist
(by opening the VirtualBox GUI). If they don't, then look at the
folder in the error message from VirtualBox below and remove it
if there isn't any information you need in there.
VirtualBox error:
VBoxManage.exe: error: Could not rename the directory 'C:\Users\사용자\VirtualBox VMs\ubuntu-20.04-amd64_1664243742959_7063' to 'C:\Users\doje1\VirtualBox VMs\homestead' to save the settings file (VERR_ALREADY_EXISTS)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "SaveSettings()" at line 3249 of file VBoxManageModifyVM.cpp
3. 간단하게 이전 homestead를 지워줍시다.
4. 다시 만듭시다
vagrant up --provision
5. 이제 한참 동안 다운로드되는 걸 지켜봅시다.
6. 이제 아래와 같이 정상 작동할 것입니다.
7. 이제 우리는 날아간 데이터베이스를 아까워하며 다시는 이러지 않기를 다짐합시다.
반응형
'PHP > Error' 카테고리의 다른 글
[Laravel] 419 error csrf 보호에서 특정 주소 무시하기 (1) | 2022.09.02 |
---|---|
Laravel 컨트롤러가 있는데 404 에러가 날 때 (0) | 2022.08.19 |
Laravel 502 Bad Gateway, route:list Allowed memory size error (0) | 2022.07.14 |
Vagrant 에러 : 한글 인코딩 에러 encode!: \xEC to UTF-8 (0) | 2021.01.02 |