Tuesday, August 18, 2009

Gigabit network for VMWare ESXi 4 Server

A gigabit network is a must for VMWare ESXi 4. Otherwise the slow network will cause lots of problems such as the vSphere Client is extremely slow and some times it complains the server takes to long to respond and the operation can't be completed. In addition, either upload or download from the datastore browser will complain the IO error as well.

If a gigabit connection is established, all of above problems will be resolved.

Tuesday, August 11, 2009

Transfer files between VMWare ESXi server and your computer

To enable the ssh at ESXi server, at the server console, press ALT-F1, type "unsupported", press Enter. When the password prompt shows up, enter the root password to log in.

Delete the first character # in the line containing ssh in the file /etc/inetd.conf to make it similar to the line below, then reboot the server.

ssh stream tcp nowait root /sbin/dropbearmulti dropbear ...

After ssh is enabled, putty can ssh to the server from your PC. WinSCP can upload/download files with the server as well.

An other tool can download files from the server is Firefox. Following example URL can browse the files at datastore1 on the server that has the IP address as 192.168.111.222:

https://192.168.111.222/folder?dsName=datastore1

In addition, the ESXi server's datastore browser also can upload and download files between the server and your PC.

Monday, August 10, 2009

VMWare Tools on CentOS

1. Update the system.
yum update

2. Install gcc and kernel development tools.
yum install gcc kernel-devel

3. Following the instruction at http://www.vmware.com/support/ws5/doc/ws_newguest_tools_linux.html to complete the installation.

Tuesday, July 14, 2009

Using Flash Drive under VirtualBox

To use the flash drive on the virtual machine:

1. Enable the USB Controller and USB 2.0 (EHCI) Controller from the Settings menu.
2. Logon to the virtual machine, plug in the flash drive to the system then right click on the USB devices logo at the buttum of the window and select the flash drive just lugged in.
3. After a few seconds, a new file folder started up at the Desktop. The flash drive can be used from now.
4. Folloing is the list of mount point for the flash drive on popular OS.

CentOS - /dev/sda1
OpenSolaris - /media
Ubuntu - /media
Solaris 10 - /rmdisk

5. The flash drive should be mounted and unmounted like a normal disk.

Monday, July 13, 2009

Assign host name to DHCP Solaris 10 Client

Put the host name in the file /etc/nodename to assign the host name to Solaris 10 with DHCP network configuration. Otherwise, the system has the "unknown hostname" problem.

Friday, June 5, 2009

Perl DBI interface to MySQL

The DBI module can be used to work with databases like Oracle, MySQL, and Informix in Perl. Following is an example to query names and phone numbers in the Info table of Supplier database with MySQL database.

#!/usr/bin/perl

use DBI;
use strict;

my $driver = "mysql";
my $database = "Supplier";
my $source = "DBI:$driver:database=$database";
my $userid = "XXX";
my $password = "XXX";
my $dbh = DBI->connect($source, $userid, $password )
or die $DBI::errstr;

my $sth = $dbh->prepare("SELECT Name, Phone FROM Info");
$sth->execute() or die $DBI::errstr;
print "Company, Phone:\n";
while (my @row = $sth->fetchrow_array()) {
my ($name, $phone ) = @row;
print "$name, $phone\n";
}
$sth->finish();

Wednesday, June 3, 2009

Install Guest Addition for OpenSolaris 2009.06 on VirtualBox 2.2.4

1. Click Devices -> Install Guest Additions to bring up VBOXADDITION 2.2.4 47978 to the Desktop.

2. Start up a terminal then change to the super user. Run "pkgadd -d /media/VBOXADDITION 2.2.4 47978/VBoxSolarisAddition.pkg". Select default and yes to start and continue the installation.

3. Unmount VBOXADDITION 2.2.4 47978 from the desktop.

4. Reboot the system.