MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Archive for the ‘Red Hat’ Category

Configure Fedora on VMWare

with 4 comments

It seems Fedora is always a bit of work. You begin by mistakenly downloading Fedora Live, which isn’t really the product but a run-time demonstration product. After finding the product, if you choose a full installation, there are post installation steps to complete. The first time you launch it in VMWare, you’ll see a Gnome 3 Failed to Load error dialog like this:

I suspected that installing VMWare Tools would fix that, and it did. However, your entry account doesn’t have “sudoers” permissions. You must add them before you can run VMWare Tools. There are six steps to enable your user with the sudoers permissions and four others to configure the standard installation:

  1. Navigate to the Applications menu choice in the upper left hand corner. You’ll get the following drop-down menu. Click on Other menu item to launch a dependent floating menu.

  1. The following floating menu displays to the right. Click on Users and Groups menu item at the bottom of the list.

  1. The choice from the floating menu prompts account validation. Enter your password and click the OK button.

  1. After validating your password, the User Manager dialog opens. Click on the single user that should be installed – mclaughlinm. Click the Properties button to change the groups assigned to the user.

  1. The User Properties dialog opens with the default User Data tab clicked. Click on the Groups tab to add the user to the wheel group as a property of your user.

  1. Scroll down through the list of groups and click the wheel group check box. Like the Mac OS, the wheel group provides “sudoer” privileges. Click the OK button to assign the group to the user.

  1. Navigate to the VMWare Menu, choose Virtual Machine and in the drop down menu Install VMWare Tools. This will mount a virtual CD in the Fedora virtual machine.

  1. Navigate to the Places menu choice and then Computer. Inside the Computer, choose the VMware Tools from the Devices section and you’ll see the following:

  1. Open a terminal session by choosing Applications, within the drop down choose System Tools, and then launch a Terminal session. You can then run the VMWare Toolkit by following these instructions:
cd /media/VMware\ Tools
cp VMwareTools-8.4.7-416484.tar.gz /tmp
cd /tmp
gunzip VMwareTools-8.4.7-416484.tar.gz
tar -xvf VMwareTools-8.4.7-416484.tar
cd vmware-tools-distrib
sudo ./vmware-install.pl

The last step requires that you reply to a set of prompts. If you’d like to accept the default at one time, you can use the following command:

sudo ./vmware-install.pl --default

If you find limited access to the system after installing or upgrading VMWare Tools, you may have packages in the caught between start and finish. You can clean them up with the following syntax, as the root user:

sudo yum-complete-transaction
  1. In the terminal session you should configure three files to make sure your networking works. I found that the dialogs failed to set one key element, so it’s simply easier to do this manually. Rather than using sudo, you should open a root shell with the following command:
sudo sh

Enter your user’s password:

[sudo] password for mclaughlinm:

You should use vi to edit and save the resolv.conf file with appropriate domain, search, and nameserver values. The values below work for VMWare when the gateway IP address is 172.16.123.2.

# Generated by NetworkManager
domain localdomain
search localdomain
nameserver 172.16.123.2

Using vi, edit the /etc/sysconfig/network file to include an appropriate gateway IP address, like so:

NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=172.16.123.2

The last file to fix is /etc/sysconfig/network-scripts/ifcfg-eth0 file. This is the file that isn’t completely configured by the GUI component (it fails set the ONBOOT value to yes).

DEVICE=eth0
HWADDR=00:0c:29:31:ef:46
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
TYPE=Ethernet
DNS1=172.16.123.2
USERCTL=no
PEERDNS=yes
IPV6INIT=no

You reset networking with the following command:

/etc/rc.d/init.d/network restart

As always, I hope this helps a few folks.

Written by maclochlainn

September 25th, 2011 at 10:40 pm

Posted in Fedora,LAMP,Linux,Red Hat

What a VMWare Thrill …

with 2 comments

I’d upgraded from VMWare Fusion 2 to 3 and taken care of most instances. A NASTY surprise awaited me when I tried to upgrade my Linux installations this morning.

You MUST to uninstall VMWare tools from your repository of Linux operating systems before upgrading your VMWare Fusion or ESX server. If you don’t, you can’t access the console because the drivers make the console look like this:

Perhaps I missed this note when, as an early adopted I opted to move straight to VMWare Fusion 3. I would have complied with these instructions to avoid this headache.

All that’s required now, is that: (a) I export 500 GBs worth of virtual machines to another machine running VMWare Fusion 2; (b) Individually start each machine and run the uninstall VMWare Tools command individually; and, (c) Shutdown and reposition all virtual machines on the original server.

As stated in the note, the command to remove it is:

/usr/bin/vmware-tools-uninstall.pl

Click on the note in the event the link fails to resolve, which would mean the note vanishes into oblivion some day in the future …

While I’ve another machine that’s not yet upgraded, this is a major inconvenience. It’s a shame that the Linux components don’t install automatically. It’s a shame that the install didn’t say something like, “Don’t do this if you’ve Linux virtual machines, unless you’ve removed their VMWare Tools installation.”

Another word to the wise, you don’t get the Linux Tools automatically when you download the product. The software prompts you to download the additional components when you attempt to launch a Linux environment. A cruel irony since by the time you see the prompt, you can’t! This is a change from the prior upgrade process.

Yes, haste makes waste but now I know. In the future, treat all VMWare upgrades like those from Microsoft test, re-test, re-authenticate in a small way before upgrading. Do you think VMWare really want to send that message to its customer base?

I got back to this tonight, and thanks to Red Hat’s Session Manager I was able to fix the Red Hat VMs. Launching it, I simply switched to the Failsafe Terminal and ran the following command, as per the note:

# /usr/bin/vmware-uninstall.pl

After that, I rebooted. Then, installed (mounted the VMWare Tools disk) from the VMWare Fusion menu. Opening a terminal as root, I then re-installed and configured VMWare Fusion. Those are done. As more time allows, I’ll update about the others.

I’m now reconfiguring the network since the VMWare Fusion 2 bridged at a 172.16.153 subdomain and VMWare Fusion 3 bridges at a 172.16.123 subdomain.

Written by maclochlainn

February 6th, 2010 at 11:49 am

Oracle XE Install

without comments

Some folks asked me to post Oracle Database 10g Express Edition step-by-step installation and how to setup an initial user/schema. There’s not much difference between the Windows and Linux installation but this one is the Windows XP installation.

Here are the eight steps required to run the MSI program:

1. Launch the MSI icon from your Windows Explorer:

oracle10gxeinstall01

2. Click the run button to extracing the zip file:

oracle10gxeinstall02

3. Click the Next button to run the Oracle Database 10g Expression Edition install wizard:

oracle10gxeinstall03

4. Accept the license agreement and click the Next button:

oracle10gxeinstall04

5. You can change the default installation base folder by clicking the Browse button, but why bother. Click the Next button to proceed.

oracle10gxeinstall05

6. This is the screen where you enter the privileged user account for the Oracle database. Make sure you’ll remember the password you enter. When you’ve entered it twice, click the Next button to continue the installation.

oracle10gxeinstall06

7. The Summary dialog shows you the ports for the installation. If you want to access this machine externally from the local host, you should open these ports for TCP transactions in your firewall. Click the Install button to proceed.

oracle10gxeinstall07

8. The last screen tells you that the InstallShield Wizard is complete. Make sure the Launch the Database homepage check box checked and click the Finish button to complete the installation.

oracle10gxeinstall08

After you’ve installed the database, you should immediately create a schema where you’ll work. The next steps show you how to create your own user/schema in the Oracle Database 10g XE instance.

1. The Database homepage provides you with a web login to the database. The only configured user at this point is the privileged user, which is known as the system user. The password to this account is the same as the one you entered during the product installation.

oracle10gxeschema01

2. After you sign on to the database, you’ll be on the following console page. Click the Administration button on the far left.

oracle10gxeschema02

3. The middle Database Users button in the web page allows you to create new database users. Click the Database Users image to proceed.

oracle10gxeschema03

4. The Manage Database Users console lets you create or manage existing users. Click the Create button to create a new user.

oracle10gxeschema04

5. The Create Database User console lets you enter a user name and password plus lets you grant necessary permissions to the new user. The entries on this form create a STUDENT user/schema with superuser responsibilities. The DBA role grants those superuser privileges. You click the Create button to setup a new user.

oracle10gxeschema05

6. After you create the user, you’ll see the following screen. You can now click the Logout link to exit the application. Then, you can logon again as the STUDENT user.

oracle10gxeschema06

I hope this meets the needs of new users.

Written by maclochlainn

April 23rd, 2009 at 12:34 am

Posted in pl/sql,Red Hat

VMWare and Fedora 10

without comments

It sometimes gets tiresome to sort the VMWare compatibility issues with Linux release-by-release but at the end of the cycle it’s fine. I downloaded the current Fedora 10 Live release because it is so much smaller than the install disk. It uses a kernel of 2.6.27.5-117.fc10.i686. I encountered a critical errors when I tried to install the VMWare Toolkit from VMWare Fusion, version 2.0.3 (156731). The only error guidance you’ll get is that there isn’t any make file.

There’s a twist here if you’re most familiar with Ubuntu and sudo command execution. You need to su to the root account and run everything as root user. An alternative would be to edit the /etc/inittab file to allow the root user to boot the instance. The default is 5 (X11). You enable the root user by changing it to 3 (full multiuser mode). Don’t forget to change it back, you really shouldn’t log in as the root user. Anyway, you’ll have to do it to run the VMWare Toolkit successfully as shown later in the post.

You fix the incompatibility of the VMWare Fusion Toolkit by downloading the following two missing RPMs. You should be able to find them here. As to why they’re not in the Live DVD distribution, who knows.

binutils-2.18.50.0.9-8.fc10.i386.rpm
gcc-4.3.2-7.i386.rpm
glibc-2.9-2.i686.rpm
glibc-devel-2.9-2.i386.rpm
glibc-headers-2.9-2.i386.rpm
kernel-devel-2.6.27.5-117.fc10.i686.rpm
kernel-headers-2.6.27.5-117.fc10.i386.rpm
libgomp-4.3.2-7.i386.rpm

You can’t run some of them through the RPM utility, so you should probably run them all at the command line. The command line syntax and sequence for these packages is:

rpm -ivh kernel-headers-2.6.27.5-117.fc10.i386.rpm
rpm -ivh kernel-devel-2.6.27.5-117.fc10.i686.rpm
rpm -ivh binutils-2.18.50.0.9-8.fc10.i386.rpm
rpm -ivh libgomp-4.3.2-7.i386.rpm
rpm -ivh glibc-headers-2.9-2.i386.rpm
rpm -ivh glibc-devel-2.9-2.i386.rpm
rpm -ivh glibc-2.9-2.i686.rpm
rpm -ivh gcc-4.3.2-7.i386.rpm

As the root user, you can now install the VMWare Toolkit. While running the installation, you’ll receive a prompt to confirm the /usr/src/linux/include. Don’t accept the default path because it won’t work unless you created a symbolic link. The kernel header files require you to enter the following path:

/usr/src/kernels/2.6.27.5-117.fc10.i686/include

Everything should work finxs e when you compile the modules. Hope this helps a couple folks.

Written by maclochlainn

April 11th, 2009 at 6:01 pm

Posted in Linux,Mac,Red Hat,VMWare

Aborting hung VMWare

without comments

Customizing the toolbar is one of the things that I’ve found important in using VMWare Fusion to test various Linux distributions. It’s nice they put Suspend by default on the toolbar but it would be nicer still if they put Shut Down. I got tired of looking for the PID to manually kill the virtualization from the Terminal command line. It is so much easier to add a Shut Down widget before trying to install VMWare Tools because that’s where some distributions hang.

Here are the steps to customize the toolbar:

1. Right click on the toolbar before running the VMWare instance, and you’ll see this context menu. Choose the Customize Toolbar… choice from the list.

vmwarecustomize1

2. The prior step lets you customize the toolbar though the following menu option dialog. Just click on the icon you want and drag it on to the toolbar. I’d suggest dragging Shut Down and Full Screen on to the toolbar.

vmwarecustomize2

I prefer putting the Shut Down to the left of the Suspend button, like this:

vmwarecustomize3

Hope this helps somebody.

Written by maclochlainn

April 11th, 2009 at 1:39 pm

Creating a custom virtual machine for Oracle 11g

without comments

Now that I’ve organized the blog a bit, I can start posting new information. VMWare Fusion is a great tool but I fat fingered a few installs before i mastered it. You need a customized set of settings to create an effective virtual machine to run Oracle 11g. You need to allocate enough memory and pre-allocate disk space before you do the install or it takes much longer. You may also fragment a base operating system unless you setup a separate mount point (true also for VMWare Workstation for Linux).

You’ll find the steps to create a customized virtual machine for a Red Hat AS 4 installation in the Configure Custom VM blog page. It’s more or less the same thing for Oracle 10g or the Oracle eBusiness suite, except you’ll need to pre-allocate more disk space.

Written by maclochlainn

November 16th, 2008 at 2:52 pm

VMWare stuck on a memory heap

with one comment

I was doing yet another install of Red Hat AS 4 in VMWare Fusion and ran into a new error. It’s the following: The virtual machine is unable to reserve memory.

The only way I found to fix this involves opening a terminal and killing the process manually. Killing without prejudice (cleanly shutdown the process and dependents) didn’t work. I had to kill it with prejudice (shutdown the process notwithstanding anything), then click the Abort button. The next error message says the peer process is missing and allows you to exit VMWare Fusion. Then, you reboot the Mac OS X.

The steps for find the process and killing it are:

1. Open a Terminal and run the following command:

# ps -ef | grep vmware

It returns something like this:

    0    90     1   0   0:00.00 ??         0:00.00 /Library/Application Support/VMware Fusion/vmnet-dhcpd -cf /Library/Application Support/VMware Fusion/vmnet8/dhcpd.conf -lf /var/db/vmware/vmnet-dhcpd-vmnet8.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
    0    98     1   0   0:00.00 ??         0:00.00 /Library/Application Support/VMware Fusion/vmnet-dhcpd -cf /Library/Application Support/VMware Fusion/vmnet1/dhcpd.conf -lf /var/db/vmware/vmnet-dhcpd-vmnet1.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
  501   160   115   0   1:44.12 ??         3:15.87 /Applications/VMware Fusion.app/Contents/MacOS/vmware -psn_0_77843
    0   322     1   0   0:00.07 ??         0:00.29 /Library/Application Support/VMware Fusion/vmware-vmx -E en -D ZjTtGrJgANADRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -# product=1;name=VMware Fusion;version=2.0;buildnumber=116369;licensename=VMware Fusion for Mac OS;licenseversion=6.0 build-116369; -@ pipe=/var/folders/fi/fiepDOKbFJeE42RxGcDBgU+++TI/-Tmp-//vmware-mclaughlinm/vmxd9641b5487a98f78;readyEvent=24 /Volumes/Disk2/Red Hat Enterprise Linux 4 Oracle.vmwarevm/Red Hat Enterprise Linux 4 Oracle.vmx
  501   397   303   0   0:00.00 ttys000    0:00.00 grep vmware

2. Kill the VMWare Fusion process by using the following syntax:

# kill -9 322

3. Reboot the operating system.

Written by maclochlainn

November 6th, 2008 at 12:38 am

VMWare Fusion tip on upgrading VMWare Tools

without comments

You’ll need to right click on the VMWareTools icon and manually extract the file. If you don’t and double click the icon instead, it’ll raise an exception that one already exists. After you manually extract it to your desktop, run the command as follows (replacing your user name of course):

# sudo /home/username/Desktop/vmware-tools-distrib/vmware-install.pl

I wrote this when it seemed like a good idea. I subsequently discovered that all upgrades aren’t as good as you’d like. Sometimes, a fresh install recommends itself when the virtual machine is Red Hat AS.

Written by maclochlainn

October 27th, 2008 at 3:39 am