VMware

This Question is Answered

2 "helpful" answers available (6 pts)
8 Replies Last post: Aug 2, 2007 4:55 AM by zebrafilm  

Vmware, Centos and refining the system posted: May 14, 2007 1:42 AM

Click to view The-Kevster's profile Enthusiast 90 posts since
Mar 7, 2007
Hi,

I've successfully installed VMware server onto my CentOS box and it's working well. I'm not looking at refining the system to get the most out of it.

The first thing I'd like to do is stop the GUI loading to save a chunk of memory and processing power, so how do I go about that? And being quite a newbe with Linux I need to easily get into Gnome to make changes, so what is the command line to execute it?

Also what have other people done to make CentOS more effeciant? From reading around it's the OS of choice for VMware and I've done the obvious remove the office packages plus any software I'm not using but are there other services that can be stopped?

Thanks for your help,
Kev

Re: Vmware, Centos and refining the system

1. May 14, 2007 3:32 AM in response to: The-Kevster
Click to view saxa's profile Master 1,338 posts since
Jun 2, 2006
The first thing I'd like to do is stop the GUI loading to save a chunk of memory and processing power, so how do I go about that? And being quite a newbe with Linux I need to easily get into Gnome to make changes, so what is the command line to execute it?

As root user execute the following:

[code]init 3[/code]

From the beginning you should accomplish the minimal install of CentOS. Then, some services can be disabled.

It's not a problem to run the "command-line-only" Linux installation for the total Linux newbee (so as also I am), because you can every time connect to it from your Windows station in a user interface you already know.

The very helpful software you can use on Windows to connect to your CentOS host is winscp (winscp.net)

Re: Vmware, Centos and refining the system

2. May 14, 2007 3:39 AM in response to: The-Kevster
Click to view alex905's profile Novice 13 posts since
Jul 15, 2006
i would sugest reading this

http://www.anchorite.org/blog/2006/11/13/minimal-services-on-centos-44-mini-howto/

its a guide to minimule services on cent os. if you dont have 4.4 just tyoe in setup and stop the ones on the link tghat are liosted their. no others enless you know you can stop them. i made that mistake and i have to reinstall(also a good idea to notwe what you stoped).

Re: Vmware, Centos and refining the system

3. May 14, 2007 3:45 AM in response to: alex905
Click to view saxa's profile Master 1,338 posts since
Jun 2, 2006
The howto you are referencing is not as good for newbees, especially because it suggests to disable xinetd, without which the Vmware Server will not work.

Re: Vmware, Centos and refining the system

5. May 14, 2007 5:12 AM in response to: saxa
Click to view arman68's profile Novice 11 posts since
Jun 10, 2006
Here's my guide a minimal CentOS 5.0 install for vmware server:

Goal: have a minimal stable install of CentOS that uses as little resources as possible to allow the vmware virtual machines to run as fast as possible. Remote adminstration still needed.

* plan and configure raid arrays prior to installing CentOS

* install can be done from cd, or network. Could not get it to work via http and iis due to some iis permissions restrictions. Works great with warftpd (make sure number of concurrent anonymoud logins is 100). Network install recommended. You still need to boot from cd or usb key, and type when linux starts "linux askmethod". How to create a network install media:

+ USB flashdrive, use the dd command to copy the diskboot.img image file
from the /images/ directory on the DVD or CD-ROM #1. For example:
dd if=diskboot.img of=/dev/sda
Your BIOS must support booting from a USB device in order for this boot method to work.

From windows, use the HP USB Key Utility to copy the diskboot.img to a USB key

+ CD : burn boot.iso to CD, and not diskboot.img

* choose custom install

* automatic partition with remove all partitions (unless it is a reinstall and you need to preserve some data) + review.

* review partitions and:
+ delete swap (we don't want to swap memory to disk, would slow down vmware)
+ resize main linux partition to 20GB, and rename it to CentOS
+ from the same "Edit LVM Volume Group" window, add more logical volumes as necessary, including
logical volume name = VMWare
mount point = /vmware
size = leave min 10GB for snapshots
type = ext3
That way, vmware images will be stored on a separate partition on same array (this will allow reinstalling linux without losing vmware images)
+ create other partitions on all array as neededs + mount points
note: LVM has the advantage of on-the-fly resizing and snapshotting

* network devices: set all active on boot, assign name + ip address (entry needs to be added manually in dns server)

* components: uncheck all software preselections, and select "Customize Now"

For a minimum install with only text console, select only the following
+ servers : windows file server
- no options
+ base system : base
- leave default options
- remove aspell, aspell-en, bluez-utils, ccid, mgetty, sendmail, wireless-tools

* stop and disable the firewall:
service iptables stop
chkconfig iptables off
chkconfig ip6tables off

-> from this point onward, the rest of the configuration can be done remotely via ssh

* install additional packages

+++ with >4GB ram, upgrade to kernel-PAE +++

kernel source for compiling, including kernel update to match the former
yum update kernel (or PAE)
yum install kernel-devel (or PAE)


ln -s /usr/src/kernels/<version>/ /usr/src/linux
eg: ln -s /usr/src/kernels/2.6.18-8.1.1.el5-i686/ /usr/src/linux

notes:
+ reboot after updating the kernel

yum install gcc
yum install xinetd
yum install libXtst

* install vmware
+ use winscp to copy the vmware rpm to a suitable location
+ rpm -ihv VMWare_etc_.rpm
(use -Uhv when upgrading)
+ run vmware-config.pl
- bridge networks
- no nat, no host only networking
- specify /vmware directory for virtual files
- make sure default port 902 is used
+ no need to enter a serial yet, this will be done from a vmware console client, once connected, through the help menu

* install vmware management interface
+ download the mui from vmware and copy to the server with winscp
+ install:
tar xzf <VMware-mui-...>.tar.gz
cd vmware-mui-distrib
./vmware-install.pl
+ once installed, you can connect through https://<server>:8333
+ to remove: /usr/bin/vmware-uninstall-mui.pl
+ to configure: /usr/bin/vmware-config-mui.pl

* install vmktree (historical graphs for wmare server)

+ setup protectbase
yum install yum-protectbase
+ change to yum repository config directory
cd /etc/yum.repos.d/
+ protect core packages, by editing (use nano) all the .repo files and add either
"protect=1" or "protect=0" for each repository
only set [base] and [update] to 1 in CentOS-Base.repo, all the others to 0

+ add the RPMForge repository
- download the rpmforge-release package from http://wiki.centos.org/Repositories/RPMForge
- install the GPG key:
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
- verify the package you have downloaded
rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm
- install the package
rpm -ihv rpmforge-release-0.3.6-1.el5.rf.*.rpm
- configure it for protect base, by editing the new .repo file and adding
protect=0 (normally it is already enabled by default)

+ install RRDTool (prerequisite), available on the RPMForge repository
yum install rrdtool

+ download vmktree from http://vmktree.org/
+ install
tar xjvf vmktree-0.x.xx.tar.bz2
cd vmktree-0.x.xx
./install.sh

* install webmin - http://www.webmin.com

yum install perl-Net-SSLeay
rpm -ihv <webmin rpm> package

(use -Uhv when upgrading)

connect to webmin via http://<host>:10000
change config to force use of SSL

set webmin to manual start:
chkconfig webmin off

* minimal services configuration

chkconfig atd off
chkconfig autofs off
chkconfig cpuspeed off
chkconfig cups off
chkconfig firstboot off
chkconfig gpm off
chkconfig mdmonitor off
chkconfig netfs off
chkconfig nfslock off
chkconfig pcscd off
chkconfig portmap off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig smartd off

* connect remotely via the vmware console, and enter a serial number

* reboot

-------------
Remote admin:

* vmware (with client tools)

* veeam fastscp (*much* faster than winscp)

https://<server>:8333 for vmware management and stats
https://<server>:8333/vmktree/ for vmware historical data

when needed, webmin can be manually started through a ssh session by typing
service webmin start
and you can then connect via
https://<server>:10000 for webmin
-----

Re: Vmware, Centos and refining the system

6. May 14, 2007 6:53 AM in response to: arman68
Click to view saxa's profile Master 1,338 posts since
Jun 2, 2006
It's a cute howto, but RHEL5, which CentOS5 made from, is not a supported VMware Host yet.

If you are looking for stability, you should use the supported host OS, such as CentOS 4.4 :)

Message was edited by:
saxa

Added the word "yet" ;)

Re: Vmware, Centos and refining the system

7. May 14, 2007 3:18 PM in response to: arman68
Click to view popik585's profile Lurker 1 posts since
Mar 30, 2006
THX, for your Guide,
works very well

Re: Vmware, Centos and refining the system

8. Aug 2, 2007 4:55 AM in response to: arman68
Click to view zebrafilm's profile Novice 9 posts since
Jul 15, 2007
thanks for taking the time to make this minimal install post. Highly appreciated! It helpt me switching from WinSrv to CentOS5 :-)

Just a few questions left:

1. Why do you disable the firewall? (remember windows user...)

2. I have setup a testbox which is working nice, but now I want to bring the setup to my production machine in the datacenter. Is there a way to create an "image" on an external disk and transfer this to a 'virgin' machine. Both machines are identical Dell 1750's with Raid 5 SCSI systems.(now running WinSRv2003)

Thanks!

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities