HOWTO Install Gentoo on VMware ESX server
Взято: http://www.gentoo-wiki.info/HOWTO_Install_Gentoo_on_VMware_ESX_server
Старая статейка инсталяции под VMWare
It has been suggested that this article or section be merged into HOWTO Install Gentoo on VMware in Windows NT/2K/XP. (Discuss)
Contents |
Introduction
This guide is a collection of information to successfully install Gentoo in a VMware Virtual Machine.
Products Covered
This guide covers the installation of Gentoo as a Guest OS in the following VMware Products:
- VMware ESX 3.0.x Server
Preparing Virtual Machine
Note the following:
- Use the VMware BusLogic type instead of LSI Logic.
- For VMWare workstation 6.x and up you CAN select the LSI Logic driver in VMWare safely. Make sure to select the new MPT driver as well (see below).
- As of the 2.6.20+ Kernel the LSI Logic Driver no longer works with VMware.
- Use the Intel e1000 NIC as performance is much better under VMware than the other emulated NICs
- After installing VMware-Tools, make sure to follow the instructions to keep the time in sync at the bottom of this guide
The first thing to do is, of course, to create a new virtual machine. VMware makes this an easy process. You only have to follow the steps in New Virtual Machine Wizard (File|New Virtual Machine...). Here is a summary of the options used to create the virtual machine for this guide. For any options not shown here, their default values were used.
- Virtual machine configuration: Custom
- Guest operating system: Linux; Version: Other Linux 2.6.x kernel
- Virtual machine name: Gentoo Linux
- Memory: 128 MB
- Network connection: Use NAT networking
- I/O adapter types / SCSI Adapters:
- Bus Logic or LSI Logic
- Disk: Create a new virtual disk
- Virtual Disk Type: SCSI
- Disk capacity / Disk size (GB): 4.0; Allocate all disk space now
- Split into 2 GB files
Code: Modify your |
You will need to ssh to your VMware ESX server and navigate to the directory where you stored the Gentoo Virtual Machine. |
Installing Gentoo Linux
Basically you just follow the instructions in the Gentoo Handbook the same way you would install Gentoo normally. Here we outlined the parts, to which you need to pay special attention.
Kernel Configuration
For this section we assume you are using a 2.6.x kernel. To start configuration:
# cd /usr/src/linux
# make menuconfig
Now enable the following options:
- VMware Tools uses kernel loadable module support to load and unload its driver(s).
Linux Kernel Configuration: kernel loadable module support |
Loadable module support ---> |
Processor
Linux Kernel Configuration: Processor Support |
Processor type and features ---> Timer frequency (100 HZ) ---> |
SCSI Controller
VMware BusLogic SCSI Support:
Linux Kernel Configuration: VMware SCSI adapter |
Device Drivers ---> |
Or
VMware LSI Logic SCSI Support in VMWare Workstation 6.x and up:
Linux Kernel Configuration: VMware SCSI adapter |
Device Drivers ---> |
Network
VMware supports the Intel e1000 NIC: (Use this for best results)
Linux Kernel Configuration: Network |
Device Drivers ---> |
- add dhcpcd_eth0="-I ''" to /etc/conf.d/net (use the MAC as uid)
- or rm all files in /var/lib/dhcpcd/ before copy.
Installing VMware Tools
Code: Install VMwareTools |
# tar -xzvf VMwareTools-3.0.2-52542.tar.gz |
# ./vmware-install.pl
Creating a new installer database using the tar3 format.
Installing the content of the package.
In which directory do you want to install the binary files?
[/usr/bin]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/init.d]
What is the directory that contains the init scripts?
[/etc/init.d]
In which directory do you want to install the daemon files?
[/usr/sbin]
In which directory do you want to install the library files?
[/usr/lib/vmware-tools]
The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]
The installation of VMware Tools 3.0.2 build-52542 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]
It looks like you are trying to run this program in a remote session. This
program will temporarily shut down your network connection, so you should only
run it from a local console session. Are you SURE you want to continue?
[no] yes
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
Trying to find a suitable vmmemctl module for your running kernel.
None of the pre-built vmmemctl modules for VMware Tools is suitable for your
running kernel. Do you want this program to try to build the vmmemctl module
for your system (you need to have a C compiler installed on your system)?
[yes]
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.22-gentoo-r5/build/include]
Extracting the sources of the vmmemctl module.
Building the vmmemctl module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmemctl-only'
make -C /lib/modules/2.6.22-gentoo-r5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.22-gentoo-r5'
CC [M] /tmp/vmware-config0/vmmemctl-only/os.o
SHIPPED /tmp/vmware-config0/vmmemctl-only/vmmemctl1_64.o
LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/vmware-config0/vmmemctl-only/vmmemctl.mod.o
LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.ko
make[1]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r5'
cp -f vmmemctl.ko ./../vmmemctl.o
make: Leaving directory `/tmp/vmware-config0/vmmemctl-only'
The module loads perfectly in the running kernel.
Extracting the sources of the vmhgfs module.
Building the vmhgfs module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
make -C /lib/modules/2.6.22-gentoo-r5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.22-gentoo-r5'
CC [M] /tmp/vmware-config0/vmhgfs-only/cpName.o
CC [M] /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/vmware-config0/vmhgfs-only/dev.o
CC [M] /tmp/vmware-config0/vmhgfs-only/driver.o
CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/vmware-config0/vmhgfs-only/main.o
CC [M] /tmp/vmware-config0/vmhgfs-only/staticEscape.o
LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/vmware-config0/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r5'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
The module loads perfectly in the running kernel.
No X install found.
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
Guest memory manager: done
DMA setup: done
Guest operating system daemon: done
The configuration of VMware Tools 3.0.2 build-52542 for Linux for this running
kernel completed successfully.
You must restart your X session before any mouse or graphics changes take
effect.
You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X server session.
If you wish to configure any experimental features, please run the following
command: "vmware-config-tools.pl --experimental".
Enjoy,
--the VMware team
Finish the vmware-tools Install
Code: Add vmware-tools to start on boot |
# rc-update add vmware-tools default |
Final Notes
Have VMware-Tools keep your VM's time insync
Code: Modify your |
You will need to ssh to your VMware ESX server and navigate to the directory where you stored the Gentoo Virtual Machine. |