2012년 10월 22일 월요일

VMware Workstation 설치 컴파일 오류(SPIN_LOCK_UNLOCKED)

VMware 7.1.4 리눅스 버전을 설치하면서 발생하는 에러에 대해 공유하고자 한다. VMware Workstation 최신 버전은 9 이다. 그러나, 정식적으로 사용 가능한 라이센스는 7 버전을 보유하고 있기에 7.1.4 를 설치하였다. (물론, 많은 경우는 무료로 사용 가능한 VirtualBox 를 사용하지만..)

설치하는 도중에 아래 그림과 같이 Error 메시지를 출력한다.


자세한 에러 메시지를 보면

"Unable to build kernel module.
See log file /tmp/vmware-root/setup-29550.log for details"

와 같았다. 로그파일을 살펴보면 특정 파일을 컴파일 하는 과정에서 발생하는 것이고, 이것을 수동으로 컴파일 해보면 다음과 같은 과정이다.

root@:/tmp/vmware-root# /usr/bin/make -C /tmp/vmware-root/modules/vmmon-only auto-build SUPPORT_SMP=1 HEADER_DIR=/lib/modules/3.0.0-22-generic/build/include CC=/usr/bin/gcc GREP=/usr/bin/make IS_GCC_3=no VMCCVER=4.6.1
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmon-only'
make -C /lib/modules/3.0.0-22-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
 MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.0.0-22-generic'
  CC [M]  /tmp/vmware-root/modules/vmmon-only/linux/driver.o
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:783:59: error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.0.0-22-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'

SPIN_LOCK_UNLOCKED 가 선언되지 않았다고 계속 나타나는 문제였다. 관련 내용을 구글링 해보고 다음 패치파일을 찾을 수 있었다.

패치파일 다운로드 받기 : http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/08/fullvmwarelinux310patch.tar.gz

패치를 실행해 보았다. 그러나 다음과 같은 메시지만 계속 출력된다.

# ./patch-modules_2.6.39.sh
Sorry, this script is only for VMWare WorkStation 7.1.5 or VMWare Player 3.1.5. Exiting

분명 패치파일에는 7.1.4 버전도 분명 명시되어 있었다. 스크립트 파일을 살펴보니

[ "$vmver" == "workstation$vmreqver2" ] && product="VMWare WorkStation"
[ "$vmver" == "player$plreqver2" ] && product="VMWare Player"

와 같이 vmreqver2 를 참고하는 변수가 있지만 실제 스크립트에는 없다. 아래와 같이 스크립트가 변경이 필요하다.

vmreqver=7.1.4
plreqver=3.1.4
vmreqver=7.1.5
plreqver=3.1.5

를 다음과 같이 변경하였다.

vmreqver=7.1.4
plreqver=3.1.4
vmreqver2=7.1.5
plreqver2=3.1.5

그리고 다시 패치 스크립트를 실행하면 깔끔하게 실행이 된다.

# ./patch-modules_2.6.39.sh
patching file vmblock-only/linux/dentry.c
patching file vmblock-only/linux/filesystem.c
patching file vmci-only/linux/driver.c
patching file vmmon-only/linux/driver.c
patching file vmmon-only/linux/hostif.c
patching file vmmon-only/linux/iommu.c
patching file vmnet-only/compat_netdevice.c
.
.
.
Built vsock module
Starting VMware services:
   VMware USB Arbitrator                                               done
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                    done
   Shared Memory Available                                             done


All done, you can now run VMWare WorkStation.
Modules sources backup can be found in the '/usr/lib/vmware/modules/source-workstation7.1.4-2012-10-09-15:04:41-backup' directory


자, 이제 패치가 완료되었으니 VMware 를 다시 재 설치 진행해 주면 에러 발생없이 깨끗하게 설치가 진행된다. 참고로 VMware 7.1.6.744570 버전도 해당 패치를 반영하여 사용이 가능하다. 패치 적용시 후반에 약간의 오류가 있긴 하지만 VMware 를 실행하면 커널 컴파일 하는 GUI 화면에서 제대로 진행이 계속된다.

참고로, VMWare 를 설치한 파일은 "VMware-Workstation-Full-7.1.4-385536.x86_64.bundle" 이며, 커널은 3.0.0-22 이었다. (64비트)

혹시, 같은 에러를 경험할 사용자를 위해 해결책을 공유한다.

댓글 없음:

댓글 쓰기