Subversion hosting, CVS hosting, Trac hosting, Bugzilla hosting and software collaboration Providing hosted Subversion, CVS, Trac and Bugzilla repositories
 

March 10, 2008

Installing VMware Tools In A FreeBSD 7.0 Guest

Filed under: Operating Systems — Tags: , User ImageGreg Larkin @ 7:35 pm

Hi everyone,

I’ve got FreeBSD 7.0 downloaded and running as a VMware Server virtual machine so I can start checking it out and get a feel for how it works. Once ZFS is deemed stable for production, I’ll plan to migrate to the 7.x series.

The first thing I generally do after setting up a new VM is install VMware Tools. Wait - scratch that. The first thing I have to do before installing VMware Tools is install Perl, since it’s not part of the FreeBSD base system. That’s easy enough:

cd /usr/ports/lang/perl5.8 && make WITH_GDBM=yes install clean

Ok, on to the VMware Tools installer! After starting the vmware-install.pl script, I answered a bunch of questions (used all default responses), and finally was met with this somewhat odd message:

VMware Tools Installation Failure Under FreeBSD 7.0 Guest

Wait a minute - I’m pretty sure I’m installing in a virtual machine here! Initially, I pored through the installation Perl script and discovered that it executes vmware-checkvm to determine if it’s running inside a VM or not. Ok, let’s try that by hand:

vmware-checkvm Failure Under FreeBSD 7.0 Guest

That’s a problem! vmware-checkvm is a statically-linked binary, and to get it working, the FreeBSD compat6x port needs to be installed. The compat6x port installs a variety of libraries that were found in FreeBSD 6.x but have had their versions bumped for FreeBSD 7.0.

cd /usr/ports/misc/compat6x && make install clean

Hmm, still no joy after doing that - vmware-checkvm is still core dumping. After more Googling and nosing about in the VMware Tools installation script, I learned that VMware expects the libc.so.6 library installed by compat6x to be in /lib. However, all compat{3,4,5,6}x ports install their libraries in /usr/local/lib/compat to avoid messing with the base system.

A simple symbolic link gets libc.so.6 in place for VMware:

ln -s /usr/local/lib/compat/libc.so.6 /lib

And now success, right? Wrong!

VMware Tools Installation Fails Again

I’m not logged in over the network, so why am I getting this message? It turns out that tcsh (root shell in FreeBSD) is setting the REMOTEHOST environment variable, even though I’m logged in at the VM’s console.

The solution is a simple command:

unsetenv REMOTEHOST

Start up the VMware Tool installer one more time, and now it works!

Maybe the newest version of VMware Server supports FreeBSD 7.0 natively, so I’ll have to test that out soon. Details will be posted here when I do!

Rate this:
0.0

Share this with others: del.icio.us:Installing VMware Tools In A FreeBSD 7.0 Guest  digg:Installing VMware Tools In A FreeBSD 7.0 Guest  newsvine:Installing VMware Tools In A FreeBSD 7.0 Guest  furl:Installing VMware Tools In A FreeBSD 7.0 Guest  reddit:Installing VMware Tools In A FreeBSD 7.0 Guest  fark:Installing VMware Tools In A FreeBSD 7.0 Guest  blogmarks:Installing VMware Tools In A FreeBSD 7.0 Guest  Y!:Installing VMware Tools In A FreeBSD 7.0 Guest  magnolia:Installing VMware Tools In A FreeBSD 7.0 Guest

February 20, 2008

Pssst… Hey Kid, Wanna Free Hard Drive?

Filed under: Misc — Tags: , User ImageGreg Larkin @ 8:17 pm

Hi everyone,

Here’s a little trick I’ve been using for quick deployment of additional virtual disk space to the VMware VMs that comprise the SourceHosting.net service. The VMware Server installation includes the vmware-vdiskmanager tool for creating, renaming, expanding and generally messing about with virtual hard drives.

However, I don’t like running this tool to create a new 50Gb virtual disk in the middle of the day because it just slams the disk I/O channel. To get around the problem, I’ve created several disks of different sizes during off-hours and compressed them down for easy storage. Then when I need to provision a disk, I expand it, rename it and hook it to the virtual machine in Virtual Center:

VirtualCenter Add Hardware Wizard

So here are some compressed disk images for you (SCSI format):

  • 10Gb (8391 byte download)
  • 20Gb (16415 byte download)
  • 50Gb (40373 byte download)
  • 100Gb (80373 byte download)

Once downloaded, extract them as follows:

nice -19 bzcat xxxGb.tar.bz2 | tar xvfB -

CAUTION: The resulting extracted files will be the actual size represented in the filename. They compress down so well because they are mostly empty space until they are hooked to a VM and a filesystem is created.

After I extract the files, I typically rename the virtual disk to something more meaningful, like the name of the mount point in my VM. This way, I can easily tell which virtual disk is used for what without consulting the VM config file. The disk rename command looks like this:

# vmware-vdiskmanager -n 10GbDisk.vmdk UsrSrc.vmdk
Using log file /tmp/vmware-root/vdiskmanager.log
Renaming completed successfully.
# ls *.vmdk
UsrSrc-f001.vmdk  UsrSrc-f003.vmdk  UsrSrc-f005.vmdk  UsrSrc.vmdk
UsrSrc-f002.vmdk  UsrSrc-f004.vmdk  UsrSrc-f006.vmdk
#

Simple!

Rate this:
0.0

Share this with others: del.icio.us:Pssst... Hey Kid, Wanna Free Hard Drive?  digg:Pssst... Hey Kid, Wanna Free Hard Drive?  newsvine:Pssst... Hey Kid, Wanna Free Hard Drive?  furl:Pssst... Hey Kid, Wanna Free Hard Drive?  reddit:Pssst... Hey Kid, Wanna Free Hard Drive?  fark:Pssst... Hey Kid, Wanna Free Hard Drive?  blogmarks:Pssst... Hey Kid, Wanna Free Hard Drive?  Y!:Pssst... Hey Kid, Wanna Free Hard Drive?  magnolia:Pssst... Hey Kid, Wanna Free Hard Drive?

February 16, 2008

VMware Server Watchdog Timeouts on Host-Only Interface

Filed under: Operating Systems — Tags: User ImageGreg Larkin @ 11:33 pm

Hi everyone,

I installed a bunch of security updates, new kernels, etc. to the VMware Server hosts and virtual machines tonight. One problem that has been dogging me for a while now is that one (and only one) of the VMs boots in a strange state and reports Ethernet watchdog timeouts on its host-only interface. The issue here is that it’s then unable to communicate with its name server, NFS server and other LAN resources.

After some different Google searches, I found a solution provided by Antonio Lorusso. I’ve made his changes to the VMware Server file in question, and I’ll keep an eye on the VMs as they auto-start after the next host server reboot. I expect that the timeouts will be a thing of the past. Thank you, Antonio!

Rate this:
0.0

Share this with others: del.icio.us:VMware Server Watchdog Timeouts on Host-Only Interface  digg:VMware Server Watchdog Timeouts on Host-Only Interface  newsvine:VMware Server Watchdog Timeouts on Host-Only Interface  furl:VMware Server Watchdog Timeouts on Host-Only Interface  reddit:VMware Server Watchdog Timeouts on Host-Only Interface  fark:VMware Server Watchdog Timeouts on Host-Only Interface  blogmarks:VMware Server Watchdog Timeouts on Host-Only Interface  Y!:VMware Server Watchdog Timeouts on Host-Only Interface  magnolia:VMware Server Watchdog Timeouts on Host-Only Interface

January 31, 2008

Apache Auto-configuration with a Dynamic IP Address

Filed under: Operating Systems — Tags: , , User ImageGreg Larkin @ 6:02 pm

Hi everyone,

As I was setting up the new FreeBSD 6.2 VM with Apache 2.2 preinstalled in it, I ran into a problem. The VM’s virtual Ethernet adapter is configured for DHCP, and the VMware software acts as a DHCP server to hand out IP addresses as VMs are started.

The problem is that Apache likes to know the IP address of the machine it’s running on, and in some cases, it won’t start unless it does. Luckily, the DHCP client in FreeBSD, and likely other operating systems, calls separate hook scripts (if they exist) before and after configuring the adapter with a dynamic address.

In my case, I wanted to automatically create a ServerName directive for Apache with the dynamic address. The default Apache 2.2 installation on FreeBSD provides a user configuration file include directory at /usr/local/etc/apache22/Includes. As it starts up, Apache loads any file placed in that directory and named with the “.conf” suffix. I think we’ve got a solution!

It’s also necessary to tweak the contents of the /etc/hosts file so that the VM can resolve its own hostname. I wrote a DHCP client exit hook script that configures both Apache and the /etc/hosts file. This script should be easily adaptable to other operating systems, as it uses the standard Bourne shell syntax.

Simply download the script, unzip the contents into /etc, and let me know what you think!

Rate this:
0.0

Share this with others: del.icio.us:Apache Auto-configuration with a Dynamic IP Address  digg:Apache Auto-configuration with a Dynamic IP Address  newsvine:Apache Auto-configuration with a Dynamic IP Address  furl:Apache Auto-configuration with a Dynamic IP Address  reddit:Apache Auto-configuration with a Dynamic IP Address  fark:Apache Auto-configuration with a Dynamic IP Address  blogmarks:Apache Auto-configuration with a Dynamic IP Address  Y!:Apache Auto-configuration with a Dynamic IP Address  magnolia:Apache Auto-configuration with a Dynamic IP Address

Updated FreeBSD 6.2 VMware Images And BitTorrent

Filed under: Operating Systems — Tags: , , , User ImageGreg Larkin @ 5:28 pm

Hi everyone,

As I got further into configuring my sample VM, I decided it would make sense to provide a few different VM flavors for folks who don’t want to configure Apache, PHP, and other ports to get the PHP frameworks installed and working.

I’ve set up a BitTorrent tracker at http://torrents.sourcehosting.net:10692/, and I’ll place the various VMs there from now on. The installation process is as follows:

  • Download and install a BitTorrent client, if you don’t already have one. I recommend Azureus.
  • Grab the UsrPorts torrent.
  • Grab a FreeBSD 6.2 Basic Installation torrent, such as the Bare Bones VM, or the VM pre-configured with Apache. Check the main tracker site for other options, and view the torrent info page to find out what ports have been preinstalled.
  • Once the UsrPorts.zip file has been fetched by your BitTorrent client, extract the contents to a new directory.
  • Extract your selected FreeBSD 6.2 VM .zip file to the same directory and start up the VM with VMware Player or VMware Server.

The UsrPorts.zip file contains the /usr/ports filesystem that’s mounted in the VM. Since this filesystem is typically kept up to date by running portsnap while the VM is running, I’ve provided an initial snapshot for you, but it’s not necessary to keep re-downloading when I provide a new FreeBSD VM that you’d like to try out.

I hope this system works better for folks, and please consider seeding the torrents as you download the .zip files.

Rate this:
0.0

Share this with others: del.icio.us:Updated FreeBSD 6.2 VMware Images And BitTorrent  digg:Updated FreeBSD 6.2 VMware Images And BitTorrent  newsvine:Updated FreeBSD 6.2 VMware Images And BitTorrent  furl:Updated FreeBSD 6.2 VMware Images And BitTorrent  reddit:Updated FreeBSD 6.2 VMware Images And BitTorrent  fark:Updated FreeBSD 6.2 VMware Images And BitTorrent  blogmarks:Updated FreeBSD 6.2 VMware Images And BitTorrent  Y!:Updated FreeBSD 6.2 VMware Images And BitTorrent  magnolia:Updated FreeBSD 6.2 VMware Images And BitTorrent

January 25, 2008

Booting Your First VMware Virtual Machine

Filed under: Software Development — Tags: , , , User ImageGreg Larkin @ 11:13 am

Hello everyone,

Now that we’ve got some example virtual machines to play around with, let’s move on to the next step and get one running.

I’m using VMware Player on Windows XP, and the VM files have been extracted to My Documents\My Virtual Machines. The folder contents look like this:

VMware Installation Directory

Digging into the VM installation directory proper, you see all of the files that make up your virtual machine:

Virtual Machine Directory

The .vmx file is a text file that contains all of the virtual machine configuration options. You can change the VM memory allocation, add/remove devices, etc. just by editing that file. The .vmdk files are the virtual machine’s disks and store its state across reboots.

If your VM ever runs out of disk space and you still have room on your host operating system, you can create additional vmdk files and attach them to the VM. That sure is easier than cracking open a server case and physically installing new drives!

Next, double-click on the FreeBSD 6.2 Basic Installation.vmx file, and VMware Player starts up and boots the VM:

FreeBSD Boot Menu

After the usual messages, the virtual machine has booted, and you see the familiar UNIX login prompt:

FreeBSD Boot Completion

Next time, we’ll dive into installing the various PHP frameworks under FreeBSD. The FreeBSD ports system is designed for ease of use, and you’ll see how simple it is to get a software package and all of its dependencies installed with one command.

Rate this:
0.0

Share this with others: del.icio.us:Booting Your First VMware Virtual Machine  digg:Booting Your First VMware Virtual Machine  newsvine:Booting Your First VMware Virtual Machine  furl:Booting Your First VMware Virtual Machine  reddit:Booting Your First VMware Virtual Machine  fark:Booting Your First VMware Virtual Machine  blogmarks:Booting Your First VMware Virtual Machine  Y!:Booting Your First VMware Virtual Machine  magnolia:Booting Your First VMware Virtual Machine

January 18, 2008

FreeBSD 6.2 VMware Image for the PHP Framework Face-Off

Filed under: Software Development — Tags: , , , , , , User ImageGreg Larkin @ 9:30 pm

Hi all,

After my last post, I realized it might be nice to provide a clean VMware image of FreeBSD 6.2 for folks who want to follow along as I try out the various PHP frameworks.

The first thing you’ll need to start up the virtual machine is one of the following free VMware tools:

Both of these tools allow you to run virtual machines on your server and/or desktop. The VMware Player is most useful if you just want to run pre-built virtual machines and use them for experimentation and evaluation. VMware Server gives the ability to create your own custom virtual machines and install your choice of operating system.

Once you have one of those tools installed on your machine, download a FreeBSD 6.2 VMware image from the SourceHosting.net BitTorrent tracker. You can find detailed instructions on setting up the VMware image in a subsequent blog posting.

The OS install is configured as follows:

  • Root user has no password
  • Networking is configured with DHCP and uses NAT for outbound connections
  • Extracted size is 11Gb
  • FreeBSD ports tree is installed in /usr/ports and is current as of 01/30/08
  • Latest security patches as of 01/17/08 have been applied

Extract the downloaded file somewhere on your drive and fire up VMware Player or VMware Server and follow the prompts to start the VM.

In case you’re new to FreeBSD, there’s a wealth of information in the Handbook. After you’ve logged in and had a look around, you can use the following command to shut the VM down cleanly:

/sbin/shutdown -p now

Look for a new post soon describing how to install each of the PHP frameworks.

Rate this:
0.0

Share this with others: del.icio.us:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off  digg:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off  newsvine:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off  furl:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off  reddit:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off  fark:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off  blogmarks:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off  Y!:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off  magnolia:FreeBSD 6.2 VMware Image for the PHP Framework Face-Off
Pages: Prev 1 2

Powered by WordPress