Archive | Uncategorized RSS feed for this section

Installing VMware Server 2.0.2 on the Base

13 Nov

Now, a couple of posts back, I have downloaded the VMware Server 2.0.2 as “VMware-server-2.0.2-203138.i386.gz” on to the Base in the directory “/root/installs/vmwareserver2/” and unwrapped it to the directory “/root/installs/vmwareserver2/1/vmware-server-distrib/“.  I have the manual.

At this time, like in the previous posts, I run everything as the “root” user.

Using Webmin “Disk and Network Filesystems“, I’ve mounted my second hard drive on “/hdd2“.

I run the command “apt-get upgrade“.

I run the command “apt-get  install make gcc linux-kernel-headers“.

Do NOT install the “openjdk-6-jdk “.

I run the command “apt-get install linux-headers-`uname -r` build-essential bzip2 gcc-4.3“.

I also run the command “apt-get install build-essential xinetd linux-headers-$(uname -r)“.   I got this from an article to install VMware Server 2 on Ubuntu.

I run the command “/root/installs/vmwareserver2/1/vmware-server-distrib/./vmware-install.pl –default“, ensuring that I do not run the “vmware-configure.pl” script from the installation routine!

I follow http://how-to.linuxcareer.com/installation-of-vmware-server-202-on-debian-squeeze-i686 and do the following:

Run the following commands to download the patches to the VMware Configuration Scripts and Source:

cd; wget http://linuxconfig.org/images/files/2.6.3x-vmware-patch.tar.bz2; tar xjf 2.6.3x-vmware-patch.tar.bz2;

Run the following commands to patch the VMware Configuration Scripts and Source:

cd /usr/bin/;
patch -p3 < ~/2.6.3x-vmware-patch/config.patch;

cd /usr/lib/vmware/modules/source;
for f in *.tar ; do tar pxf $f ; done;
patch -p4 < ~/2.6.3x-vmware-patch/203138-update.patch;

for f in vmci vmmon vmnet vsock ; do tar pcf $f.tar $f-only ; done;
rm -fr *-only; 

Run the following commands to set the default GCC compilter to GCC 4.3 instead of GCC 4.4:

(ls -l `which gcc`;ln -fs /usr/bin/gcc-4.3 /usr/bin/gcc;ls -l `which gcc`;)

Invoke the VMware Configuration Script by running the following command:

vmware-config.pl

# Accept the licence agreement to use the product or deny it and quit this complete installation.

“None of the pre-built vmmon modules for VMware Server is suitable…” yes

“What is the location of the directory of C header files…” /lib/modules/2.6.32-5-686/build/include

“None of the pre-built vmci modules for VMware Server is suitable…” yes

“None of the pre-built vsock modules for VMware Server is suitable” yes

“Do you want networking for your virtual machines” yes

“Please specify a name for this network” BridgedWifi

“Your computer has multiple ethernet network interfaces available” wlan0

Since I am using my Wifi, I am using wlan0, otherwise, I would just accept the default eth0.

“Do you wish to configure another bridged network” yes

“Please specify a name for this network” BridgedWired

“Your computer has multiple ethernet network interfaces available” eth0

“Do you wish to configure another bridged network” no

“Do you want to be able to use NAT networking in your virtual machines” yes

“Please specify a name for this network” yes

“Do you want this program to probe for an unused private subnet” yes

“Do you wish to configure another NAT network” no

“Do you want to be able to use host-only networking in your virtual machines” yes

“Please specify a name for this network” HostOnly

“Do you want this program to probe for an unused private subnet” yes

“Do you wish to configure another host-only network” no

“None of the pre-built vmnet modules for VMware Server is suitable” yes

“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 ”” yes

“Please specify the user whom you wish to be the VMware Server administrator” root

“In which directory do you want to keep your virtual machine files” /var/lib/vmware/VirtualMachines

The path “/var/lib/vmware/VirtualMachines” does not exist currently” yes

“Please enter your 20-character serial number” Your 20 character serial number

“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” 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” yes

Now, I reboot and once the reboot is complete, I am able to access the Base.

At this time, I have logged into my router, and using the Base’s Wi-fi NIC’s MAC Address, I have set the IP address to 192.168.0.100, so when the Base uses DHCP to get an IP address, it will always get 192.168.0.100.  I have not touched the Base’s network settings.  I have also set the Base’s Ethernet IP Address to 192.168.0.101 using the Ethernet’s MAC Address in my router.

Now, I’ll login to the VMware Server 2.0.2 web app using the URL http://192.168.0.100:8222/.

Failed!  The web app shows nothing in Chrome, Safari, Firefox, and IE9!  After searching Google, it appears this problem is quite common…  Oh well :(…  I will refer to http://www.vmware.com/products/beta/ws/vmrunCommand.pdf to use the vmrun command that is accessible from the shell to run VMs and use alternative means to create VMs.

I may have to use EasyVMX to create VMs, download them, and manually add them to the inventory.

OK… before jumping into destroying the whole environment, I have raised a question on the Turnkey LAMP forum – http://www.turnkeylinux.org/forum/support/20121113/installing-vmware-server-202-turnkey-lamp-unable-run-web-access.

I edited the script, “/etc/init.d/vmware” to change 64m to 128m for the webAccess Tomcat start-up.

Also, an interesting thing – the VMware Server 2.0.2 Web Access UI works using Microsoft Internet Explorer 6!

From here on, I’ll need to use MSIE6 to access the UI to create the VMs and ensure they auto-start and auto-stop.

I won’t be doing this in future.  I’ll be looking at other solutions that are more current.  Needing a VM on my Macbook Pro to run Win2K or WinXP with MSIE6 is nuts, but I’m more interested in running the virtual hosts that automatically start up and shutdown when required, than the WUI.

Anyway, on to building my first VM another day 😉

Advertisements

Enabling Wi-fi on the Base running Turnkey LAMP

8 Nov

Now, this is going to be interesting.  I’ve never enabled Wi-fi on a Turnkey LAMP appliance and never used Wi-fi with Linux in general.  Is my NetGear WG111v2 going to be supported?

Also, I am still using DHCP to obtain an IP address for the Base.  I still need to make it static and set the  Base’s host name as I’ll be relocating the Base somewhere I cannot see it.

While doing this, I’ll listen to the Racing Stripes soundtrack.

OK, based on the advice on the Turnkey LAMP forum, I’ll try the following steps:

I’ll enter the following commands in the shell, of course doing everything as the “root” user, as I have been so far.

apt-get update
apt-get install wireless-tools wpasupplicant

Now, I’ve got to have a look at the notes on configuring the Wi-fi interface through the command line.

Check if a Wireless Adapter is available to the Base

Use the command “iwconfig“.  I get the following output.

lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11bg ESSID:off/any 
 Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm 
 Retry long limit:7 RTS thr:off Fragment thr:off
 Encryption key:off
 Power Management:off

Excellent! I see wlan0 with the details of my Netgear WG111v2 Wi-fi USB adapter.

I use the command “iwlist wlan0 scanning” to scan for my Wi-fi router.  There is a lot of output because I live around lots of neighbours with Wi-fi networks.  I see mine – “DJTEPHWY1” – as the ESSID :).

Based on the output from the scan, I do the following:

I use the command “iwconfig wlan0 essid DJTEPHWY1” to set the wlan0 to use the DJTEPHWY1 wireless router, noting that I’ve named my wireless network to DJTEPHWY1.

I use the command “iwconfig wlan0 channel 1” to the wlan0 to use channel 1.  I am not an expert in wireless networking, so I cannot explain the concept of channels…

I use the command “iwconfig wlan0 key off” to switch off encryption for wlan0.  I’ve only done this for documentation purposes.  I’ll be switching it back on as my wireless network is secure.

Time to listen to the Ritchie Family 🙂

OK, now I’ve got my Wi-fi Config Sheet that has the encryption details, I’ll get on to getting this thing going!

I use the command “iwconfig wlan0 key 0000000000” to switch on encryption and set the WEP key.

Now, I’ll reboot the Base and see if the settings remain, leaving the Ethernet connected.  I’m not ready to cut the chord just yet.  I need to log back in to check the settings.

OK, the settings were lost on reboot.  We’ll forget about the above instructions.  If I simply bounced the network interface service, I’m sure I would have got an IP address that would have been useful until I rebooted.  No problem!  It was good to go through it and learn something :)…  Without these instructions, I would not know what to look for, so acknowledgement and kudos for the article that lead me on the correct path :).

Now, referring to a Ubuntu forum

I’m using the command “apt-get upgrade“.

I’m using the command “apt-get install apt-utils“.

I’m using the command “apt-get install wireless-tools hwinfo wpasupplicant rfkill” to get more Wi-fi stuff.

I’m using the command “hwinfo –netcard” to verify my Wi-fi adapter and it confirms my Wi-fi adapter.

Since I am using a WEP network, I need to do the following:

Edit the “/etc/network/interfaces” file and add the following lines at the end:

auto wlan0
iface wlan0 inet dhcp
wireless-essid DJTEPHWY1
wireless-key 0000000000

Also, in the “/etc/network/interfaces” file, remove the line withthe text “# UNCONFIGURED INTERFACES” and the line that instructs to remove that line.  If this text remains in the file, the lines added above are erased.

The /etc/network/interfaces file should look like the following:

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
wireless-essid DJTEPHWY1
wireless-key 0000000000

Note, my ESSID is DJTEPHWY1.  My wireless key is “0000000000“.  Your’s will be different.  If you’re using a WPA network, you’ll need to research it.

Now, I’ll reboot the Base and see if the settings remain, leaving the Ethernet connected.  I’m not ready to cut the chord just yet.  I need to log back in to check the settings.

Also, it’s a shame that I cannot do this through Webmin :(.  Webmin is a really neat interface to configure the Base.  Oh well, back to my roots – CLI and BASH/KSH :).  I’ll investigate the Webmin site and see if someone has raised this issue or added the feature.

I login, and the login script that lists the IP address confirms there is an IP address for the wireless interface.

I shut down the Base and disconnect the Ethernet.

I switch back on the Base, without the Ethernet, and it boots up with Wi-fi connectivity through my router.  Unfortunately, my WEP key is stored in a plain text configuration file.  This may be an issue for some; however, this is for home.  At work, it would be connected through Ethernet, so we wouldn’t be going through this.

Oops, Wi-fi is not enabled on the Base

7 Nov

I’ve pulled out the Ethernet cable and left the Wi-fi adapter in, rebooted the Base, and it has no network.  I need to start at the Turnkey LAMP forum.  That’ll be done on another day.

Download VMware Server to install on the Base

7 Nov

Now, we need to download VMware Server 2.x on the Base.  Please note that the product has reached its end-of-life.  I am using it because it has a web interface to manage the virtual machines.  I am getting the 32-bit TGZ package as I am not sure if I can use RPM on this build of Linux.  This is a 483 MB download and is taking just over 10 minutes to download over my network.

Since VMware requires authentication to download the product, I am downloading it to my Mac and then going to FTP it to the Base.

On the Base, I’ve placed the “VMware-server-2.0.2-203138.i386.gz” file at /root/installs/vmwareserver2/.  It needs to be extracted using the command “(mkdir 1 && cd 1 && gunzip -c ../VMware-server-2.0.2-203138.i386.gz  | tar xvf -)”.

Now, we can move on to installing VMware Server 2.x.

🙂

Download additional OS packages to the Base and Install

7 Nov

I was playing with IBM DB2 Express-C 10.1 on the Turnkey LAMP 11.3 environment and it required extra packages to be downloaded.  Although, I intend to use the base to host virtual machines and virtual appliances, I might as well install them, anyway, just so I remember to do the same for the virtual machines.

Steps I ripped from my previous implementation plan are:

  1. Login to the web shell as “root”.
  2. Issue the command “(apt-get install binutils libaio1 libstdc++6)”.

The libraries are installed.

I may need to download more.

Setting the Timezone on the Base

7 Nov

Now, I need to set the timezone on the base to Brisbane Queensland Australia.

I’ve ripped the steps from a previous implementation plan that I developed.

Steps:

  1. Login to the web shell as “root”.
  2. Issue the command “dpkg-reconfigure tzdata”.
  3. Select “Australia” and then select “Brisbane”.
  4. Issue the command “date” and the time zone should be shown in our time zone.

It’s nice and easy; however, I used to forget this one a while back and users would wonder why the time was ten hours behind :(.  Oh well, that’s learning!  I love building reusable templates that I can take anyway, and the BASH environment’s ease of copy/paste commands from a procedure into its session :).  NIX rox!

 

 

Setting Network Time Synchronisation on the Base

7 Nov

OK, now the set the Network Time Synchronisation on the Base…

I am going to use the free Australian NTP servers.

I’m using the following steps I’ve ripped from a previous implementation plan that I wrote using Turnkey LAMP.

Steps:

  1. Login to the Base as “root” using PuTTY (that allows copyandpaste into the terminal window).
  2. Run the command “(apt-get update && apt-get install ntpdate)”.
  3. Update the NTP configuration file using the following command (by copypaste the following, including the brackets into your terminal session):

(
cat << EOF > /etc/ntp.conf
# cope with large time drifts (useful in VM scenarios)
tinker panic 0

# ntp servers
server 0.au.pool.ntp.org
server 1.au.pool.ntp.org
server 2.au.pool.ntp.org
server 3.au.pool.ntp.org
###server 0.pool.ntp.org
###server 1.pool.ntp.org
###server 2.pool.ntp.org
###server 3.pool.ntp.org

# drift file
driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page http://support.ntp.org/bin/view/Support/AccessRestrictions
# might also be helpful.
#
# Note that “restrict” applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don’t allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
EOF
) && cat /etc/ntp.conf

  1. Verify NTP is running using the command “(ps -ef | grep ntpd | grep -v grep)”. One line should return showing the NTP process currently running.

 

 

 

%d bloggers like this: