[[PageOutline]] = install VMware Server 2.0.2 on Ubuntu Lucid = == links == * [http://radu.cotescu.com/2010/02/21/how-to-install-vmware-server-kernel-2-6-32/ How to install VMware Server on the 2.6.32 Linux kernel :: Ubuntu Lucid 10.04, Fedora, openSUSE | Radu Cotescu] * [http://hmontoliu.blogspot.com/2010/04/installing-vmware-server-202-in-ubuntu.html hmontoliu: Installing vmware-server-2.0.2 in Ubuntu Lucid Lynx 10.04] * [http://communities.vmware.com/message/1544399 VMware Communities: Ubuntu 10.04 & VMware Server 2.0.2 ...] = procedure produced by Radu = * from [http://radu.cotescu.com/2010/02/21/how-to-install-vmware-server-kernel-2-6-32/ How to install VMware Server on the 2.6.32 Linux kernel :: Ubuntu Lucid 10.04, Fedora, openSUSE | Radu Cotescu] == install Ubuntu Lucid with ubuntu-10.04-server-amd64.iso == * uname -a {{{ Linux vmserv 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux }}} === set password to user root === * sudo su - * # passwd * rootにパスワードを設定するのは安全性が下がるので、本来は別にユーザを作って管理するようにした方が良い === install packages === * sudo aptitude install -R linux-headers-!`uname -r` build-essential {{{ The following NEW packages will be installed: binutils{a} build-essential dpkg-dev{a} g++{a} g++-4.4{a} gcc{a} gcc-4.4{a} libc-dev-bin{a} libc6-dev{a} libgomp1{a} liblzma1{a} libstdc++6-4.4-dev{a} linux-libc-dev{a} xz-utils{a} The following packages will be upgraded: libc-bin libc6 The following packages are RECOMMENDED but will NOT be installed: fakeroot manpages-dev }}} === get 3rd-party patches === * mkdir vmware * mv VMware-server-2.0.2-203138.x86_64.tar.gz vmware * wget http://codebin.cotescu.com/vmware/vmware-server-2.0.x-kernel-2.6.3x-install.sh {{{ Location: http://github.com/raducotescu/vmware-server-linux-2.6.3x-kernel/tarball/master [following] Location: http://waitdownload.github.com/raducotescu-vmware-server-linux-2.6.3x-kernel-592e882.tar.gz [following] Saving to: `raducotescu-vmware-server-linux-2.6.3x-kernel-592e882.tar.gz' }}} * tar xzf raducotescu-vmware-server-linux-2.6.3x-kernel-592e882.tar.gz * mv raducotescu-vmware-server-linux-2.6.3x-kernel-592e882/* vmware/ * ll vmware/ {{{ total 463352 drwxr-xr-x 2 mitty mitty 4096 2010-06-06 14:22 ./ drwxr-xr-x 8 mitty mitty 4096 2010-06-06 14:21 ../ -rw-r--r-- 1 mitty mitty 1321 2010-04-26 05:18 LICENSE -rw-r--r-- 1 mitty mitty 1980 2010-04-26 05:18 README -rwxr-xr-x 1 mitty mitty 702 2010-04-26 05:18 start-VMware-console.sh* -rw-r--r-- 1 mitty mitty 1111 2010-04-26 05:18 vmware-config.patch -rw-r--r-- 1 mitty mitty 13618 2010-04-26 05:18 vmware-server-2.0.2-203138-update.patch -rw-r--r-- 1 mitty mitty 474415801 2009-10-24 08:13 VMware-server-2.0.2-203138.x86_64.tar.gz -rwxr-xr-x 1 mitty mitty 11358 2010-04-26 05:18 vmware-server-2.0.x-kernel-2.6.3x-install.sh* }}} === install VMware Server === * cd vmware/ * ~/vmware$ sudo ./vmware-server-2.0.x-kernel-2.6.3x-install.sh {{{ The current administrative user for VMware Server is ''. Would you like to specify a different administrator? [no] yes Please specify the user whom you wish to be the VMware Server administrator root Using root as the VMware Server administrator. }}} * see [./raducotescu] for a whole log = procedure produced by evilninja = * from [http://communities.vmware.com/message/1544399 VMware Communities: Ubuntu 10.04 & VMware Server 2.0.2 ...] == install Ubuntu Lucid with ubuntu-10.04-server-amd64.iso == * uname -a {{{ Linux vmserv 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux }}} == install packages == * sudo aptitude install -R linux-headers-!`uname -r` build-essential {{{ The following NEW packages will be installed: binutils{a} build-essential dpkg-dev{a} g++{a} g++-4.4{a} gcc{a} gcc-4.4{a} libc-dev-bin{a} libc6-dev{a} libgomp1{a} liblzma1{a} libstdc++6-4.4-dev{a} linux-libc-dev{a} xz-utils{a} The following packages will be upgraded: libc-bin libc6 The following packages are RECOMMENDED but will NOT be installed: fakeroot manpages-dev }}} == apply 3rd-party patches == * mkdir vmware * mv VMware-server-2.0.2-203138.x86_64.tar.gz vmware/ === get patches === * wget http://nerdbynature.de/bits/2.6.32-22/00-vmware-2.6.32_functional.diff.txt * wget http://nerdbynature.de/bits/2.6.32-22/01-vmware-2.6.32_cosmetic.diff.txt * wget http://nerdbynature.de/bits/2.6.32-22/02-vmnet-include.diff.txt.gz * wget http://nerdbynature.de/bits/2.6.32-22/vmware-config.pl.diff.txt * wget http://nerdbynature.de/bits/2.6.32-22/patch-vmware_2.6.3x.sh.txt * gunzip 02-vmnet-include.diff.txt.gz * mv *.txt vmware * cd vmware * mv 00-vmware-2.6.32_functional.diff.txt 00-vmware-2.6.32_functional.diff * mv 01-vmware-2.6.32_cosmetic.diff.txt 01-vmware-2.6.32_cosmetic.diff * mv 02-vmnet-include.diff.txt 02-vmnet-include.diff * mv patch-vmware_2.6.3x.sh.txt patch-vmware_2.6.3x.sh * mv vmware-config.pl.diff.txt vmware-config.pl.diff * ~/vmware$ ll {{{ -rw-r--r-- 1 mitty mitty 13047 2010-05-10 17:29 00-vmware-2.6.32_functional.diff -rw-r--r-- 1 mitty mitty 28299 2010-05-10 17:29 01-vmware-2.6.32_cosmetic.diff -rw-r--r-- 1 mitty mitty 1501459 2010-05-10 17:29 02-vmnet-include.diff -rw-r--r-- 1 mitty mitty 1287 2010-05-10 16:48 patch-vmware_2.6.3x.sh -rw-r--r-- 1 mitty mitty 1129 2010-05-10 17:29 vmware-config.pl.diff -rw-r--r-- 1 mitty mitty 474415801 2009-10-24 08:13 VMware-server-2.0.2-203138.x86_64.tar.gz }}} * tar xzf VMware-server-2.0.2-203138.x86_64.tar.gz === modify patch script === * cp -a patch-vmware_2.6.3x.sh patch-vmware_2.6.3x.sh.orig * vim patch-vmware_2.6.3x.sh * diff patch-vmware_2.6.3x.sh.orig patch-vmware_2.6.3x.sh -u {{{ --- patch-vmware_2.6.3x.sh.orig 2010-05-10 16:48:28.000000000 +0900 +++ patch-vmware_2.6.3x.sh 2010-06-08 09:19:18.375909295 +0900 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -x # # (C) 2010 lists@nerdbynature.de # @@ -16,7 +16,7 @@ # vmware-config.pl.diff # - based on http://communities.vmware.com/message/1398525#1398525 # -DIR=/root/dev/ +DIR=~/vmware PATCHES="00-vmware-2.6.32_functional.diff 01-vmware-2.6.32_cosmetic.diff 02-vmnet-include.diff" # unset me! @@ -50,7 +50,7 @@ $DEBUG rm -rf *-only # vsock.ko needs symbols from vmci -$DEBUG cd ../../../../bin || exit 2 +$DEBUG cd ../../../bin || exit 2 if [ -x vmware-config.pl -a -f $DIR/vmware-config.pl.diff ]; then $DEBUG patch -p0 < $DIR/vmware-config.pl.diff fi }}} === apply patches === chmod +x patch-vmware_2.6.3x.sh ./patch-vmware_2.6.3x.sh vmware-server-distrib/lib/modules/source/ {{{ + DIR=/home/mitty/vmware + PATCHES=00-vmware-2.6.32_functional.diff 01-vmware-2.6.32_cosmetic.diff 02-vmnet-include.diff + wc -l + ls vmware-server-distrib/lib/modules/source//vmci.tar vmware-server-distrib/lib/modules/source//vmmon.tar vmware-server-distrib/lib/modules/source//vmnet.tar vmware-server-distrib/lib/modules/source//vsock.tar + [ -z vmware-server-distrib/lib/modules/source/ -o ! 4 = 4 ] + SRC=vmware-server-distrib/lib/modules/source/ + cd vmware-server-distrib/lib/modules/source/ + mkdir orig + mv vmci.tar vmmon.tar vmnet.tar vsock.tar orig/ + tar -xf orig/vmci.tar + tar -xf orig/vmmon.tar + tar -xf orig/vmnet.tar + tar -xf orig/vsock.tar + patch -p1 patching file vmci-only/include/compat_wait.h patching file vmci-only/linux/vmciKernelIf.c patching file vmmon-only/include/compat_wait.h patching file vmmon-only/linux/driver.c patching file vmmon-only/linux/hostif.c patching file vmmon-only/linux/vmmonInt.h patching file vmnet-only/bridge.c patching file vmnet-only/compat_wait.h patching file vmnet-only/driver.c patching file vmnet-only/netif.c patching file vmnet-only/vnetUserListener.c patching file vsock-only/include/compat_wait.h + patch -p1 patching file vmci-only/include/vm_atomic.h patching file vmci-only/include/vm_basic_types.h patching file vmmon-only/common/hostif.h patching file vmmon-only/common/memtrack.c patching file vmmon-only/include/vm_asm_x86.h patching file vmmon-only/include/vm_atomic.h patching file vmmon-only/include/vm_basic_asm_x86.h patching file vmmon-only/include/vm_basic_types.h patching file vmmon-only/include/x86msr.h patching file vmmon-only/include/x86svm.h patching file vmnet-only/bridge.c patching file vmnet-only/vm_atomic.h patching file vmnet-only/vm_basic_asm_x86.h patching file vmnet-only/vm_basic_types.h patching file vsock-only/include/vm_basic_types.h + patch -p1 patching file vmnet-only/bridge.c patching file vmnet-only/compat_file.h patching file vmnet-only/compat_highmem.h patching file vmnet-only/compat_kdev_t.h patching file vmnet-only/compat_mm.h patching file vmnet-only/compat_module.h patching file vmnet-only/compat_netdevice.h patching file vmnet-only/compat_page.h patching file vmnet-only/compat_pgtable.h patching file vmnet-only/compat_sched.h patching file vmnet-only/compat_semaphore.h patching file vmnet-only/compat_skbuff.h patching file vmnet-only/compat_slab.h patching file vmnet-only/compat_sock.h patching file vmnet-only/compat_spinlock.h patching file vmnet-only/compat_uaccess.h patching file vmnet-only/compat_version.h patching file vmnet-only/compat_wait.h patching file vmnet-only/driver.c patching file vmnet-only/driver-config.h patching file vmnet-only/epoll.c patching file vmnet-only/filter.c patching file vmnet-only/geninclude.c patching file vmnet-only/hub.c patching file vmnet-only/include/compat_file.h patching file vmnet-only/include/compat_highmem.h patching file vmnet-only/include/compat_kdev_t.h patching file vmnet-only/include/compat_mm.h patching file vmnet-only/include/compat_module.h patching file vmnet-only/include/compat_netdevice.h patching file vmnet-only/include/compat_page.h patching file vmnet-only/include/compat_pgtable.h patching file vmnet-only/include/compat_sched.h patching file vmnet-only/include/compat_semaphore.h patching file vmnet-only/include/compat_skbuff.h patching file vmnet-only/include/compat_slab.h patching file vmnet-only/include/compat_sock.h patching file vmnet-only/include/compat_spinlock.h patching file vmnet-only/include/compat_uaccess.h patching file vmnet-only/include/compat_version.h patching file vmnet-only/include/compat_wait.h patching file vmnet-only/include/driver-config.h patching file vmnet-only/include/includeCheck.h patching file vmnet-only/include/net.h patching file vmnet-only/include/pgtbl.h patching file vmnet-only/include/smac_compat.h patching file vmnet-only/include/smac.h patching file vmnet-only/include/vm_atomic.h patching file vmnet-only/include/vm_basic_asm.h patching file vmnet-only/include/vm_basic_asm_x86_64.h patching file vmnet-only/include/vm_basic_asm_x86.h patching file vmnet-only/include/vm_basic_defs.h patching file vmnet-only/include/vm_basic_types.h patching file vmnet-only/include/vm_device_version.h patching file vmnet-only/include/vmnetInt.h patching file vmnet-only/include/vm_oui.h patching file vmnet-only/include/vmware_pack_begin.h patching file vmnet-only/include/vmware_pack_end.h patching file vmnet-only/include/vmware_pack_init.h patching file vmnet-only/include/vnetEvent.h patching file vmnet-only/include/vnetFilter.h patching file vmnet-only/include/vnetFilterInt.h patching file vmnet-only/include/vnet.h patching file vmnet-only/include/vnetInt.h patching file vmnet-only/include/vnetKernel.h patching file vmnet-only/include/x86cpuid.h patching file vmnet-only/includeCheck.h patching file vmnet-only/linux/bridge.c patching file vmnet-only/linux/driver.c patching file vmnet-only/linux/epoll.c patching file vmnet-only/linux/filter.c patching file vmnet-only/linux/geninclude.c patching file vmnet-only/linux/hub.c patching file vmnet-only/linux/netdev_has_dev_net.c patching file vmnet-only/linux/netdev_has_net.c patching file vmnet-only/linux/netif.c patching file vmnet-only/linux/nfhook_uses_skb.c patching file vmnet-only/linux/procfs.c patching file vmnet-only/linux/setnice.c patching file vmnet-only/linux/sk_alloc.c patching file vmnet-only/linux/skblin.c patching file vmnet-only/linux/smac.c patching file vmnet-only/linux/smac_compat.c patching file vmnet-only/linux/socket.c patching file vmnet-only/linux/userif.c patching file vmnet-only/linux/vnetEvent.c patching file vmnet-only/linux/vnetUserListener.c patching file vmnet-only/Makefile.kernel patching file vmnet-only/netdev_has_dev_net.c patching file vmnet-only/netdev_has_net.c patching file vmnet-only/net.h patching file vmnet-only/netif.c patching file vmnet-only/nfhook_uses_skb.c patching file vmnet-only/pgtbl.h patching file vmnet-only/procfs.c patching file vmnet-only/setnice.c patching file vmnet-only/sk_alloc.c patching file vmnet-only/skblin.c patching file vmnet-only/smac.c patching file vmnet-only/smac_compat.c patching file vmnet-only/smac_compat.h patching file vmnet-only/smac.h patching file vmnet-only/socket.c patching file vmnet-only/userif.c patching file vmnet-only/vm_atomic.h patching file vmnet-only/vm_basic_asm.h patching file vmnet-only/vm_basic_asm_x86_64.h patching file vmnet-only/vm_basic_asm_x86.h patching file vmnet-only/vm_basic_defs.h patching file vmnet-only/vm_basic_types.h patching file vmnet-only/vm_device_version.h patching file vmnet-only/vmnetInt.h patching file vmnet-only/vm_oui.h patching file vmnet-only/vmware_pack_begin.h patching file vmnet-only/vmware_pack_end.h patching file vmnet-only/vmware_pack_init.h patching file vmnet-only/vnetEvent.c patching file vmnet-only/vnetEvent.h patching file vmnet-only/vnetFilter.h patching file vmnet-only/vnetFilterInt.h patching file vmnet-only/vnet.h patching file vmnet-only/vnetInt.h patching file vmnet-only/vnetKernel.h patching file vmnet-only/vnetUserListener.c patching file vmnet-only/x86cpuid.h + sed s/-only/.tar/ + echo vmci-only + tar -cf vmci.tar vmci-only + sed s/-only/.tar/ + echo vmmon-only + tar -cf vmmon.tar vmmon-only + sed s/-only/.tar/ + echo vmnet-only + tar -cf vmnet.tar vmnet-only + sed s/-only/.tar/ + echo vsock-only + tar -cf vsock.tar vsock-only + rm -rf vmci-only vmmon-only vmnet-only vsock-only + cd ../../../bin + [ -x vmware-config.pl -a -f /home/mitty/vmware/vmware-config.pl.diff ] + patch -p0 patching file vmware-config.pl }}} == install patched VMware Server == * cd vmware-server-distrib/ * ~/vmware/vmware-server-distrib$ sudo ./vmware-install.pl {{{ The current administrative user for VMware Server is ''. Would you like to specify a different administrator? [no] yes Please specify the user whom you wish to be the VMware Server administrator mitty Using mitty as the VMware Server administrator. }}} * see [./evilninja] for a whole log = 問題点 = == vmware-config.plが使えない == * sudo vmware-config.pl {{{ The following VMware kernel modules have been found on your system that were not installed by the VMware Installer. Please remove them then run this installer again. vmnet vmci vmmon I.e. - 'rm /lib/modules/2.6.32-21-server/misc/.{o,ko}' Execution aborted. }}} * kernel updateによって、moduleが組み込まれなくなった場合に於いてはvmware-config.plが実行可能になるが、kernel moduleを再コンパイルした後はやはり使えなくなる。 1. sudo aptitude update 1. sudo aptitude dist-upgrade {{{ The following NEW packages will be installed: linux-headers-2.6.32-22{a} linux-headers-2.6.32-22-server{a} linux-image-2.6.32-22-server The following packages will be REMOVED: linux-headers-2.6.32-21{u} linux-headers-2.6.32-21-server{u} The following packages will be upgraded: apt apt-transport-https apt-utils libglib2.0-0 linux-headers-server linux-image-server linux-server mountall python-apt update-manager-core The following packages are RECOMMENDED but will NOT be installed: libglib2.0-data shared-mime-info }}} 1. sudo reboot 1. uname -a {{{ Linux vmserv 2.6.32-22-server #36-Ubuntu SMP Thu Jun 3 20:38:33 UTC 2010 x86_64 GNU/Linux }}} 1. sudo service vmware status {{{ Bridged networking on /dev/vmnet0 is not running Host network detection is not running Host-only networking on /dev/vmnet1 is not running DHCP server on /dev/vmnet1 is not running Host-only networking on /dev/vmnet8 is not running DHCP server on /dev/vmnet8 is not running NAT networking on /dev/vmnet8 is not running Module vmmon not loaded Module vmnet not loaded }}} 1. sudo service vmware start {{{ VMware Server is installed, but it has not been (correctly) configured for the running kernel. To (re-)configure it, invoke the following command: /usr/bin/vmware-config.pl. }}} 1. sudo vmware-config.pl * => [./raducotescu/kernelupdated] * => [./evilninja/kernelupdated] 1. sudo vmware-config.pl {{{ The following VMware kernel modules have been found on your system that were not installed by the VMware Installer. Please remove them then run this installer again. vmnet vmci vmmon I.e. - 'rm /lib/modules/2.6.32-22-server/misc/.{o,ko}' Execution aborted. }}}