해결된 질문
작성
·
200
1
C:\Users\inchangson\k8s>vagrant halt
==> k8s-node2: Attempting graceful shutdown of VM...
==> k8s-node1: Attempting graceful shutdown of VM...
==> k8s-master: Attempting graceful shutdown of VM...
k8s-master: Guest communication could not be established! This is usually because
k8s-master: SSH is not running, the authentication information was changed,
k8s-master: or some other networking issue. Vagrant will force halt, if
k8s-master: capable.
==> k8s-master: Forcing shutdown of VM...
vagrant 종료 시 항상 master node만 제대로 종료가 되지 않는데 어떤 식으로 해결하면 될까요?
기다리다 Ctrl+C 할 시 아래와 같은 메시지가 남고
이후 vagrant halt 날리면 삭제 되었는지 아무 로그가 남지 않습니다.
^C
C:\Users\inchangson\k8s>==> k8s-master: Waiting for cleanup before exiting...
C:\Users\inchangson\k8s>==> k8s-master: Exiting immediately, without cleanup!
Traceback (most recent call last):
55: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/bin/vagrant:231:in `<main>'
54: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/environment.rb:290:in `cli'
53: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/cli.rb:67:in `execute'
52: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/commands/halt/command.rb:30:in `execute'
51: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/plugin/v2/command.rb:232:in `with_target_vms'
50: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/plugin/v2/command.rb:232:in `each'
49: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/plugin/v2/command.rb:243:in `block in with_target_vms'
48: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/commands/halt/command.rb:31:in `block in execute'
47: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/machine.rb:201:in `action'
46: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/machine.rb:201:in `call'
45: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/environment.rb:614:in `lock'
44: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/machine.rb:215:in `block in action'
43: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/machine.rb:246:in `action_raw'
42: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
41: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
40: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
39: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
38: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
37: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call'
36: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
35: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
34: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
33: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
32: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
31: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
30: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
29: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
28: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
27: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
26: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
25: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/providers/virtualbox/action/discard_state.rb:15:in `call'
24: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
23: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
22: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
21: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
20: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
19: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
18: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
17: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
16: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
15: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
14: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
13: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
12: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
11: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
10: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
9: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
8: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
7: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
6: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
5: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/providers/virtualbox/action/forced_halt.rb:13:in `call'
4: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/forwardable.rb:235:in `halt'
3: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/providers/virtualbox/driver/version_5_0.rb:416:in `halt'
2: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/providers/virtualbox/driver/base.rb:398:in `execute'
1: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/retryable.rb:17:in `retryable'
C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/providers/virtualbox/driver/base.rb:440:in `block in execute': There was an error while executing `VBoxManage`, a CLI used by Vagrant (Vagrant::Errors::VBoxManageError)
for controlling VirtualBox. The command and stderr is shown below.
Command: ["controlvm", "91ca85fb-bd5d-4570-b664-3be7fcc7aceb", "poweroff"]
Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%\r
답변 1
1
안녕하세요.
최초 쿠버네티스 설치까지만 vagrant up을 사용해서 구축하시고
그 이후에 VM을 내리거나 올릴 때, Virtualbox를 통해서 하는 걸 권장 드릴께요.
vagrant 가 설치까지는 좋은데,
다른 명령어를 쓰면 안되는 문제들을 고쳐가면서 vagrant에 다른 명령어들까지 쓰는 건 크게 장점이 없는 것 같더라고요.
그래서 저도 vagrant 로는 vagrant up 명령이랑, 설치하다가 문제가 생겼을 때 vagrant destroy 로 모두 삭제 시키는 명령만 주로 쓰고 있습니다.
설치 가이드에도 해당 내용들을 좀 적어 놔야겠네요.