The follows are how to enable vmadditons on the Ubuntu has been installed.
Step1: Download Virtual Machine Additions for Linux.
Step2: Open Virtual PC 2007 and then logon the guest OS.
Step3: Switch to the Guest OS, open a terminal and then type the following commands:
sudo apt-get install alien build-essential fileutils
sudo apt-get install linux-source-2.6.28 //same as what's shown within uname -r
Step4: Reboot the Guest OS and logon again.
Step5: Download chkconfig from
Step6: Type the following commands to install chkconfig
tar -zxvf chkconfig-1.3.30c.tar.gz
cd chkconfig-1.3.30c
./configure --enable-ntsysv
make
sudo make install
ln -fs /usr/local/sbin/chkconfig /usr/bin
ln -fs /usr/local/sbin/chkconfig /sbin
Step7: With VPC 2007, Action|Install or Update Virtual Machine Additions.
Step8: Navigate to the cdrom
cd /media/cdrom
Step9: Install vmadd
sudo rpm -ivh vmadd-full-2.0-1.i386.rpm --force --nodeps
there will be some errors unexpected.
Check /var/log/vmadd-install.log and you will find error message as follows:
*** VM additions kernel module ***
make: Entering directory `/lib/modules/vmadd/module'
make -C /lib/modules/2.6.27.7-134.fc10.i686/build modules SUBDIRS=/lib/modules/vmadd/module M=/lib/modules/vmadd/module
make[1]: Entering directory `/usr/src/kernels/2.6.27.7-134.fc10.i686'
CC [M] /lib/modules/vmadd/module/vpc-mod.o
/lib/modules/vmadd/module/vpc-mod.c:120: error: variable ‘vpc_fops’ has initializer but incomplete type
... delete lots of warnings/errors ...
make[2]: *** [/lib/modules/vmadd/module/vpc-mod.o] Error 1
make[1]: *** [_module_/lib/modules/vmadd/module] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.27.7-134.fc10.i686'
make: *** [vmadd-build-module] Error 2
make: Leaving directory `/lib/modules/vmadd/module'
Could not build kernel module
So we need to fix the issue.
cd /lib/modules/vmadd/module/
sudo gedit vpc-mod.c
Add "#include " before the following source:
#include
#include
#include
So the patched version as follows:
=== Patched version ===
#include
#include
#include
#include
...
Then
sudo gedit vpc-utils.c
at line 105, delete the characters in red(including the ',')
vpc-utils.c
line 105: "ebx", "ecx", "edx", "esi", "edi", "ebp"
sudo make
sudo make vmadd-install-module
sudo depmod
Step10: To start the vmadd service, type
sudo /etc/init.d/vmadd start
Then
sudo /etc/init.d/vmadd-SERVICENAME start
You will need to add 'vmadd start' and the 'vmadd-servicename start' to
modules to start them automatically each time ubuntu boots.
Alternatively, you can make them start automatically with the following commands:
sudo chkconfig vmadd on
sudo chkconfig vmadd-heartbeat on
sudo chkconfig vmadd-timesync on
sudo chkconfig vmadd-shutdown on
References:
阅读(1605) | 评论(1) | 转发(0) |