[Home] [Blog] [Contact] - [Talks] [Bio] [Customers]
twitter linkedin youtube github rss

Patrick Debois

Basic Vmware server 2.0 install on Centos 5.2


The following is a transcript from a basic vmware server 2.x install on Centos.
Pre-requisites:
  • you should not have any other virtualization software running: check vboxdrv , kvm_intel or kvm_amd , xen kernel not being used.
  • Get the latest Vmware Server 2.x RPM for free from http://www.vmware.com . You need to generate a license, but this is completely free!
  • Open the required ports on the network (system-config-securitylevel-tui): tcp:8333 for https:// administration
  • vmware installs dhcp servers, so if you have one running you need to restrict it NOT to run on any of the vmnet* ports. F.i. if you installed the virtualization package with Centos, it installed libvirt and this installed dnsmasq with the option for dhcp (see /etc/libvirt/qemu/networks/autostart/default.html (disable libvirtd via chkconfig)
  • ntp is useful to have no problems with timesynchronization #yum install ntp ; /etc/init.d/ntpd start
Setup:
  • Bridged network (vmnet0)
  • NAT network (vmnet0): 192.168.0.0/255.255.255.0 with 192.168.0.10 as the host IP
  • Hostonly Network (vmnet1): 192.168.1.0/255.255.255.0 with 192.168.1.10 as the host IP
  • Hostonly Network (vmnet2): 192.168.2.0/255.255.255.0 with 192.168.2.10 as the host IP
Processes that will be running
  • DHCP for vmnet1: /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
  • DHCP for vmnet2: /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet2/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet2/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet2.pid vmnet2
  • DHCP for vmnet8: /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet2/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet2
  • NAT  for vmnet8: /usr/bin/vmnet-natd -d /var/run/vmnet-natd-8.pid -m /var/run/vmnet-natd-8.mac -c /etc/vmware/vmnet8/nat/nat.conf
  • Authentication Server: /usr/sbin/vmware-authdlauncher
  • WebInterface backend: /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
  • WebInterface Frontend:/usr/lib/vmware/bin/vmware-hostd -a -d -u /etc/vmware/hostd/config.xml
Start Scripts that are created
  • /etc/init.d/vmware  : starts everything -> this is the one installed via chkconfig
  • /etc/init.d/vmware-core: starts the necessary demons but not the management gui
  • /etc/init.d/vmware-autostart: starts the virtual machine who have been marked as autostart
  • /etc/init.d/vmware-mgmt: start the management gui
Install Paths used
  • /usr/lib/vmware: contains the software
  • /var/log/vmware/: contains the logging
  • /etc/vmware/ : contains the config
  • /etc/vmware/vmnet*/dhcpd/ : if you want to configure dhcp settings this is the place
  • /etc/vmware-vix/ : more config for the scripting tools
Network Ports:
[root@myserver ]# netstat -anp|grep vm|grep LISTEN tcp        0      0 0.0.0.0:902                 0.0.0.0:*                   LISTEN      17372/vmware-authdlauncher tcp        0      0 0.0.0.0:8333               0.0.0.0:*                   LISTEN      17484/vmware-hostd tcp        0      0 0.0.0.0:8222               0.0.0.0:*                   LISTEN      17484/vmware-hostd
As mentioned before, vmware runs dhcpd servers (port 68) on each vmnet interface , so check if you are running a dhcpd server allready and have it bind to its own interfaces.
Stealth IP for NAT:
When you enable NAT in vmware it secretly adds an IP address than is used by the NAT enabled hosts for routing. Even though you specified 192.168.0.10 as the Host address it will install 192.168.0.2 as a gateway address. You can even ping this IP address. The reason that is does this, that vmware can NAT all traffic going over the NAT IP (vmnatd) and not over you host IP (controlled by IPtables). You can change the ip-address by changing the config in /etc/vmware/vmnet8/nat/nat.conf
# Linux NAT configuration file [host] # NAT gateway address ip = 192.168.0.2 netmask = 255.255.255.0 # or ip = 192.168.0.2/24 Ok, now that we know what to expect, let's start the actual installation:

localhost:Desktop myuser$ scp VMware-server-2.0.0-122956.x86_64.rpm root@myserver: VMware-server-2.0.0-122956.x86_64.rpm         100%  507MB   9.1MB/s   00:56
Install the RPM: myserver:~ # rpm -ihv VMware-server-2.0.0-122956.x86_64.rpm Preparing...                ########################################### [100%] 1:VMware-server          ########################################### [100%]
The installation of VMware Server 2.0.0 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "rpm -e VMware-server".
Before running VMware Server for the first time, you need to configure it for your running kernel by invoking the following command: "/usr/bin/vmware-config.pl".
Enjoy, --the VMware team
Run the vmware-config script
Making sure services for VMware Server are stopped.
Stopping VMware autostart virtual machines: Virtual machines                                        [FAILED] Stopping VMware management services: VMware Virtual Infrastructure Web Access VMware Server Host Agent                         [FAILED] Stopping VMware services: VMware Authentication Daemon                 [  OK  ] Virtual machine monitor                             [  OK  ]
You must read and accept the End User License Agreement to continue. Press enter to display it. [And here comes the EULA ]
Do you accept? (yes/no) [no] yes Thank you.
The bld-2.6.18-8.el5-x86_64smp-RHEL5 - vmmon module loads perfectly into the running kernel. The bld-2.6.18-8.el5-x86_64smp-RHEL5 - vmci module loads perfectly into the running kernel. The bld-2.6.18-8.el5-x86_64smp-RHEL5 - vsock module loads perfectly into the running kernel.
Do you want networking for your virtual machines? (yes/no/help) [yes] yes Configuring a bridged network for vmnet0. Please specify a name for this network. [Bridged] Your computer has multiple ethernet network interfaces available: eth0, eth1, eth2, virbr0. Which one do you want to bridge to vmnet0? [eth0] The following bridged networks have been defined: . vmnet0 is bridged to eth0 Do you wish to configure another bridged network? (yes/no) [no] no
Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes] yes Configuring a NAT network for vmnet8. Please specify a name for this network. [NAT]
Do you want this program to probe for an unused private subnet? (yes/no/help) [yes] no
What will be the IP address of your host on the private network? 192.168.0.10 What will be the netmask of your private network? 255.255.255.0 The following NAT networks have been defined: . vmnet8 is a NAT network on private subnet 192.168.0.0. Do you wish to configure another NAT network? (yes/no) [no]
Do you want to be able to use host-only networking in your virtual machines?[yes] Configuring a host-only network for vmnet1. Please specify a name for this network. [HostOnly] Do you want this program to probe for an unused private subnet? (yes/no/help)[yes] no What will be the IP address of your host on the private network? 192.168.1.10 What will be the netmask of your private network? 255.255.255.0
The following host-only networks have been defined:
. vmnet1 is a host-only network on private subnet 192.168.1.0.
Do you wish to configure another host-only network? (yes/no) [no] yes Configuring a host-only network for vmnet2. Please specify a name for this network.[HostOnly]
Do you want this program to probe for an unused private subnet? (yes/no/help) [yes] no What will be the IP address of your host on the private network? 192.168.2.10 What will be the netmask of your private network? 255.255.255.0 The following host-only networks have been defined: . vmnet1 is a host-only network on private subnet 192.168.1.0. . vmnet2 is a host-only network on private subnet 192.168.2.0. Do you wish to configure another host-only network? (yes/no) [no]
Network name "HostOnly" for vmnet2 is already in use by vmnet1 -- renaming to "HostOnly (2)" The bld-2.6.18-8.el5-x86_64smp-RHEL5 - vmnet module loads perfectly into the running kernel.
Please specify a port for remote connections to use [902] Please specify a port for standard http connections to use [8222] Please specify a port for secure http (https) connections to use [8333]
The current administrative user for VMware Server  is ''.  Would you like to specify a different administrator? [no] Using root as the VMware Server administrator.
In which directory do you want to keep your virtual machine files? [/var/lib/vmware/Virtual Machines] /data/mount/Virtual Machines Please enter your 20-character serial number. Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel:  enter yours here
Creating a new VMware VIX API installer database using the tar4 format.
Installing VMware VIX API.
In which directory do you want to install the VMware VIX API binary files? [/usr/bin]
In which directory do you want to install the VMware VIX API library files? [/usr/lib/vmware-vix/lib] The path "/usr/lib/vmware-vix/lib" 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 VMware VIX API document pages? [/usr/share/doc/vmware-vix] The path "/usr/share/doc/vmware-vix" 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 VIX API 1.6.0 build-122956 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-vix.pl".
Enjoy, the VMware team
Starting VMware services: Virtual machine monitor                                            [  OK  ] Virtual machine communication interface                  [  OK  ] VM communication interface socket family:               [  OK  ] Virtual ethernet                                                         [  OK  ] Bridged networking on /dev/vmnet0                         [  OK  ] Host-only networking on /dev/vmnet1 (backgr         [  OK  ] DHCP server on /dev/vmnet1                                    [  OK  ] Host-only networking on /dev/vmnet2 (background [  OK  ] DHCP server on /dev/vmnet2                                    [  OK  ] Host-only networking on /dev/vmnet8 (background)[  OK  ] DHCP server on /dev/vmnet8                                    [  OK  ] NAT service on /dev/vmnet8                                     [  OK  ] VMware Server Authentication Daemon (background)[  OK  ] Shared Memory Available                                          [  OK  ] Starting VMware management services: VMware Server Host Agent (background)                   [  OK  ] VMware Virtual Infrastructure Web Access Starting VMware autostart virtual machines: Virtual machines                                                       [  OK  ] The configuration of VMware Server 2.0.0 build-122956 for Linux for this running kernel completed successfully.