vagrant 의 기본 메모리가 부족해서 늘려보고자 한다.

설정은 다음과 같다. Vagrantfile 에 추가해준다.

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
  end

적당한 메모리 값을 넣어준다.

위와 같이 하면 정상정으로 진행될 것이다.



=> 아래 에러는 아마도 cpu 를 2 로 늘렸을때 났던 에러인 듯 하다. 빼고 해도 동일 에러가 나는 이유는 무엇일까?
설정값이 남아있었던 것일까? vagrant destroy 후에 다시 해보니 정상이다.

관련 설정을 한후 vagrant up 을 해보면 다음과 같은 에러가 난다.

# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'chef/ubuntu-14.04-i386' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2201.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2201 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.


/VirtualBox VMs/chef-solo_default_1406169045971_64274/Logs 에서 VBox.log 를 열어서 보면

00:00:00.070719
00:00:00.070719 ********************* End of CFGM dump **********************
00:00:00.070730 VM: fHMEnabled=true  (configured) fRecompileUser=false fRecompileSupervisor=false
00:00:00.070732 VM: fRawRing1Enabled=false CSAM=true  PATM=true
00:00:00.070842 VMSetError: /home/vbox/vbox-4.3.14/src/VBox/VMM/VMMR3/HM.cpp(532) int HMR3Init(PVM); rc=VERR_VMX_MSR_VMXON_DISABLED
00:00:00.070854 VMSetError: VT-x is disabled in the BIOS.
00:00:00.196099 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={8ab7c520-2442-4b66-8d74-4ff1e195d2b6} aComponent={Console} aText={VT-x is disabled in the BIOS. (VERR_VMX_MSR_VMXON_DISABLED)}, preserve=false
00:00:00.248130 Power up failed (vrc=VERR_VMX_MSR_VMXON_DISABLED, rc=NS_ERROR_FAILURE (0X80004005))

결론은 해당 호스트머신이 CPU 가상화 VT-x 를 지원하지 않는 것이다.

테스트한 머신이 i3 라 가상화 지원을 하지 않아서 그런듯 하다. 메모리만 늘리려 하는데도 안되는 듯 하다.

i5 이상급으로 업그레이드 하거나 다른 머신에서 테스트해야 겠다.


반응형

WRITTEN BY
1day1
하루하루 즐거운일 하나씩, 행복한일 하나씩 만들어 가요.

,

관리하는 서버 대수가 많아지다 보니 모니터링이 쉽지 않다.

서버 호스팅 업체를 통한 기본관리도 가능하지만, 부족한 부분이 있고, 여러 호스팅 업체를 사용하다보면 그것도 불편하다


icinga 로 모니터링 서버를 구축해본다.

웹 모니터링 화면을 접속하면 이런식으로 나온다.

관련글 : https://www.digitalocean.com/community/tutorials/how-to-use-icinga-to-monitor-your-servers-and-services-on-ubuntu-14-04

설정은 위 링크를 참조하기로 하고 특이사항 들을 추가한다.


관련 패키지를 설치하면 몇가지 설정단계를 거친다.

1) 처음에는 mysql root 계정 암호를 넣을 것이다. 적당한 암호를 넣는다.


2) 메일 설정 부분

메일 설정을 해준다. 메일로 알람을 받을 때 쓰는 듯 하다.


3) 관리자 화면에 쓸 icingaadmin 계정 설정

관리용 웹화면의 암호를 입력한다.

다음처럼 추가 패키지들이 설치된다.


다음은 그냥 No 로 넘어가고,


4) icinga-idoutils 관련 설정

icinga-idoutils 의 설정 : 모니터링 데이터에 쓰이는 듯 하다.

여기에서는 mysql 을 쓸 것이다.


초기데이터 설정을 위해 관리자 암호를 물어본다(처음에 설정한 값)


icinga-idoutils 가 쓸 mysql 계정암호를 넣는다.

여기까지 기본설정 완료. 추가로 패키지들이 마저 설치된다.



5) 모니터링 관리자 화면 접속.

난 설정을 포트포워딩 해서 http://localhost:8800/icinga/ 으로 접속했다.

아이디는 icingaadmin 이고, 암호는 설정시 입력한 값을 넣는다.




참고로 난 vagrant 로 가상머신을 만들고, icinga 를 세팅했다.
vagrant 로 세팅후 box 의 80포트를 포트포워딩 하고, 부팅시 자동실행하도록 설정했다.

1) 포트포워딩(Vagrantfile)

config.vm.network :forwarded_port, host: 8080, guest: 80

2) 부팅시 자동실행(vagrant box) : http://blog.1day1.org/543




반응형

WRITTEN BY
1day1
하루하루 즐거운일 하나씩, 행복한일 하나씩 만들어 가요.

,