• О проекте
  • Контакты
  • Форум
Главное меню
  • На главную
  • Поиск
Разделы
  • SysAdmin
    • Linux
      • Apache
      • Dial-in сервера
      • DNS
      • Gentoo
      • Samba
      • SpamAssassin
      • FTP
      • IPTables
      • LDAP
      • Почтовые системы
      • Программирование под Linux
      • Разное
      • KDE
      • SSH
      • SQL
      • Crypto
    • Microsoft
      • ISA
      • Exchange Server
      • Active Directory
      • Outlook
      • Windows Server
      • Windows XP/Vista/7
    • Citrix
    • Cisco
    • Mikrotik
    • PBX и VoIP
    • Virtual
    • Asterisk
  • Разное интересное
  • tmp
Login Form



  • Забыли пароль?
  • Забыли логин?

PostHeaderIcon 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

  • 1 Introduction
  • 2 Products Covered
  • 3 Preparing Virtual Machine
  • 4 Installing Gentoo Linux
  • 5 Kernel Configuration
    • 5.1 Processor
    • 5.2 SCSI Controller
    • 5.3 Network
  • 6 Installing VMware Tools
    • 6.1 Finish the vmware-tools Install
  • 7 Final Notes
    • 7.1 Have VMware-Tools keep your VM's time insync

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

Warning: This guide was designed for using Gentoo under VMware ESX.

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 .vmx
You will need to ssh to your VMware ESX server and navigate to the directory where you stored the Gentoo Virtual Machine.

* This will add the Intel e1000 support to your Virtual Machine

# cp .vmx .vmx.old.1
# echo ethernet0.virtualDev = "e1000" >> .vmx

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.

Note: I suggest NOT using the Gentoo GUI installer. When Gentoo offers the Boot: prompt type gentoo nox

Kernel Configuration

Warning: The LSI Logic drivers in the 2.6.19+ kernel do not work with VMware. Set your SCSI type to BusLogic instead. (Please note the exception for VMWare Workstion 6.x below)
Note: The LSI Logic drivers in VMWare Workstation 6.x correspond with the Fusion MPT drivers (available in 2.6.24), see below

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  --->
[*] Enable loadable module support
[*] Module unloading
[*] Automatic kernel module loading

Processor

Linux Kernel Configuration: Processor Support
Processor type and features  --->
[*] Symmetric multi-processing support
(2) Maximum number of CPUs (2-255)
[*] SMT (Hyperthreading) scheduler support
      Timer frequency (100 HZ) --->
(X) 100 HZ

 

SCSI Controller

VMware BusLogic SCSI Support:

Linux Kernel Configuration: VMware SCSI adapter
Device Drivers  --->
SCSI device support ---> ** Turn off EVERYTHING under here besides what is shown below **
SCSI disk support
SCSI low-level drivers --->
BusLogic SCSI support

Or

VMware LSI Logic SCSI Support in VMWare Workstation 6.x and up:

Linux Kernel Configuration: VMware SCSI adapter
Device Drivers  --->
SCSI device support ---> ** Turn off EVERYTHING under here besides what is shown below **
SCSI disk support
[*] Fusion MPT device support --->
Fusion MPT ScsiHost drivers for SPI

Network

VMware supports the Intel e1000 NIC: (Use this for best results)

Linux Kernel Configuration: Network
Device Drivers  --->
Network Device support ---> ** Turn off EVERYTHING under here besides what is shown below **
[*] Network device support
Ethernet (1000Mbit) --->
[*] Intel(R) PRO/1000 Gigabit Ethernet support
Warning: If your VM uses DHCP to receive its IP and you duplicate this VM to create other VM you will hit a duplicate DHCP uid problem. 2 workarounds
  1. add dhcpcd_eth0="-I ''" to /etc/conf.d/net (use the MAC as uid)
  2. or rm all files in /var/lib/dhcpcd/ before copy.

Installing VMware Tools

Warning: This section has been tested with VMware ESX 3.0.2 and Kernel gentoo-sources-2.6.22-r5 This does not use the vmware-linux-tools ebuild as it is broken for this release. There is now an open sourced predecessor of the VMware Tools - the ebuild is in portage: app-emulation/open-vm-tools. Try these instead.

 

Code: Install VMwareTools
# tar -xzvf VMwareTools-3.0.2-52542.tar.gz
# mkdir /etc/init.d/rc{0,1,2,3,4,5,6}.d
# cd /tmp/vmware-tools-distrib && ./vmware-install.pl
# ./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
# rm -rf /etc/init.d/rc{0,1,2,3,4,5,6}.d

Final Notes

Have VMware-Tools keep your VM's time insync

Code: Modify your .vmx
You will need to ssh to your VMware ESX server and navigate to the directory where you stored the Gentoo Virtual Machine.

* This will enable VMware-Tools to keep your Gentoo VM's time in sync

# cp .vmx .vmx.old.2
# nano -w .vmx

* Change tools.syncTime = "FALSE" to tools.syncTime = "TRUE"
Retrieved from "http://www.gentoo-wiki.info/HOWTO_Install_Gentoo_on_VMware_ESX_server"

 

 

Copyright © 2010 MiaNet.RU.
All Rights Reserved.

Designed by tim.