CentOS 6 최소 설치 VirtualBox 게스트 확장 설치

How to install Virtualbox Guest Additions for a Minimal Linux Guest
VirtualBox 리눅스 게스트 확장 설치
리눅스 VirtualBox Guest Additions 설치

1 개요[ | ]

결론부터 얘기하면 CentOS 6 최소 설치에 VirtualBox 게스트 확장 설치는 별 의미가 없는 것 같다. (...)

  • 여기서는 CentOS 6 최소 설치 상태에서 VirtualBox 게스트 확장 설치를 다룬다.
X Window를 사용하지 않을 것이다.[1]
  • X Window에서 게스트 확장 설치는 비교적 간단한데, X Window를 지원하지 않는 최소 설치 상태에서는 설치가 다소 까다롭다.
  • 그리고 게스트 확장의 핵심 기능 중 하나인 클립보드 공유가 안된다. (리눅스 콘솔 자체가 지원하지 않기 때문)
  • 마우스 넘나들기, Host 공유폴더 사용 정도는 사용할 수 있는 것 같다.
만약 클립보드 공유가 목적이라면 1) VirtualBox 리눅스 인터넷 연결, 2) VirtualBox 리눅스 SSH 연결 (브리지) 코스를 추천한다.

2 인터넷 연결 확인[ | ]

명령어
ping google.com
실행예시 (실패)
[root@localhost ~]# ping google.com
ping: unknown host google.com
→ 인터넷에 연결이 안됨. VirtualBox 리눅스 인터넷 연결을 참고하여 조치.
실행예시 (성공)
[root@localhost ~]# ping google.com
PING google.com (74.125.142.100) 56(84) bytes of data.
64 bytes from ie-in-f100.1e100.net (74.125.142.100) : icmp_seq=15 ttl=43 time=270 ms
64 bytes from ie-in-f100.1e100.net (74.125.142.100) : icmp_seq=16 ttl=43 time=270 ms
^C
... (생략)

3 필요 패키지 설치[ | ]

게스트 확장 설치에 필요한 패키지들을 먼저 설치하자.

명령어
yum install -y make kernel-devel gcc perl

4 게스트 확장 마운트[ | ]

  • Oracle VM VirtualBox
  • CentOS 6 VM 창 --- 장치(D) --- [게스트 확장 설치(I)...]

GUI 상태라면 자동으로 마운트되지만, 최소설치에서는 GUI가 아니므로 자동마운트되지 않는다. 수동으로 해줘야 한다.

[root@localhost ~]# ll /dev/cd*
lrwxrwxrwx. 1 root root 3 Sep 16 16:25 /dev/cdrom -> sr0
[root@localhost ~]# mount -r /dev/cdrom /media
[root@localhost ~]# ll /media
dr-xr-xr-x. 3 root root     2048 Mar 15 02:58 32Bit
dr-xr-xr-x. 2 root root     2048 Mar 15 02:58 64Bit
-r-xr-xr-x. 1 root root      647 Aug 17  2011 AUTORUN.INF
-r-xr-xr-x. 1 root root     6966 Mar 15 02:49 autorun.sh
-r-xr-xr-x. 1 root root     5523 Mar 15 02:49 runasroot.sh
-r-xr-xr-x. 1 root root  7669197 Mar 15 02:53 VBoxLinuxAdditions.run
-r-xr-xr-x. 1 root root 19233280 Mar 15 02:53 VBoxSolarisAdditions.pkg
-r-xr-xr-x. 1 root root 13605384 Mar 15 02:42 VBoxWindowsAdditions-amd64.exe
-r-xr-xr-x. 1 root root   282928 Mar 15 02:34 VBoxWindowsAdditions.exe
-r-xr-xr-x. 1 root root  7417016 Mar 15 02:36 VBoxWindowsAdditions-x86.exe

5 게스트 확장 설치[ | ]

[root@localhost ~]# /media/VBoxLinuxAdditions.run --nox11
Verifying archive integrity... All good. 
Uncompressing VirtualBox 4.1.22 Guest Additions for Linux......... 
VirtualBox Guest Additions installer
Removing installed version 4.1.22 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules           [  OK  ]
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                   [  OK  ]
... (생략)

5.1 Building the main Guest Additions module [실패] 뜰 경우[ | ]

[root@localhost ~]# yum update kernel*
... (생략)
[root@localhost ~]# reboot
[root@localhost ~]# yum groupinstall "Development Tools"
... (생략)
[root@localhost ~]# reboot

6 같이 보기[ | ]

7 주석[ | ]

  1. 만약 클립보드 공유와 같이 X Window 상태에서만 가능한 기능을 쓰려면, 리눅스를 Desktop 옵션으로 재설치한 다음 게스트 확장을 설치하는 게 나을 것 같다.

8 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}