With all the virtual machines I run on my local network, remembering host IP’s off the top of my head becomes pretty unmanageable. Installing the avahi package for CentOS servers provides a nice way for automatic hostname detecting in app’s supporting Bonjour discovery (like iNet for OS X).
yum install avahi
This guide assumes you already have successfully installed a CentOS virtual machine within VMware Fusion.
Launch your desired Virtual Machine and from the menu bar within VMware Fusion, select
Install VMware Tools
. This will load an iso and simulate a cd-rom has been inserted.
VMware Tools requires Perl as a dependancy, we need to resolve it before we can begin with the installation.
yum install perl
We need to mount the cd-rom within the guest virtual machine before we are able to access its content. We do this by
Creating a new folder to mount the cd-rom in.
Then we mount the cd-rom into the folder we just created. The fact that it is read-only is fine.
mount /dev/cdrom /mnt/cdrom
Now we need to access the disk and extract the tools somewhere.
cp /mnt/cdrom/VMwareTools-XXX.tar.gz /tmp
Change our working directory to tmp (shorter commands make life a little easier).
The extracted files are compressed, we need to uncompress them.
tar xvf VMWare-Tools-XXX.tar
Change working directory again into the newly decompressed folder.
Finally, lets begin the VMware Tools installation.. just follow the onscreen instructions (I usually just leave everything as default).
See, easy peasy!
Unless you have the package ‘sudo’ installed on your system, any attempts of issuing the ‘visudo’ command will fail. Classic school boy error, but one easily made.
yum install sudo
Using your favourite text editor (vi) open the default network configuration for the network adapter you wish to configure. I wish to assign a static IP to the default ethernet adapter (eth0). You will need superuser privileges so remember to use sudo
sudo vi /etc/systemconfig/network-scripts/ifcfg-eth0
For the purpose of this post I will be using the following typical network configuration.
- Host IP Address: 192.168.0.100
- Netmask: 255.255.255.0
- Gateway: 192.168.0.1
Update the following highlighted fields with your relevant network settings.
Make sure the current system is up-to date
Install the necessary packages required to satisfy Twisted’s dependancies.
yum install wget python-devel python-zope-interface
Also install the Development Tools
yum group install “Development Tools”
Download the Twisted Framework (example location: ~/src)
Extract files and install
tar jxvf Twisted-12.1.0.tar.bz2
python setup.py install
Test the installation was successful by creating a Python test file.
Insert the following lines:
Save the file
Ctrl-X (Enter filename when prompted)
Execute the file with hopefully no errors