SiKing

December 26, 2009

Wireless in VMware Server 1.0.10 on Linux Mint 5

Filed under: linux,virtualization — SiKing @ 7:35 pm
Tags:

Over the holidays I updated my VMware Server, and I got my machines bridged to my wireless card. Yea baby! :mrgreen:

  1. Have a read through my previous HOWTO.
  2. Download VMware Server 1.0.10.
  3. Go through the install, but stop at the vmware-config.pl.
  4. Download Liken’s vmware-any-any-update-115-K2.6.24-WirelessBridge.tar.gz.
  5. Unpack Liken’s update. Replace vmmon.tar with the original from VMware Server. If you are following my instructions religiously, then you want cp /usr/local/lib/vmware/modules/source/vmmon.tar /tmp/vmware-any-any-update-116-K2.6.24-WirelessBridge/.
  6. Run the runme.pl in Liken’s update, and continue with vmware-config.pl (you have to do this as sudo, but you knew that right?).
  7. Cleanup the debris – see the note about libgcc_s.so.1 in my HOWTO.
  8. Before starting your machine, explicitly define the machine to use Custom Network Connection: /dev/vmnet2 (or whatever you bridged your wireless card to).
    Virtual Machine Settings

Credits: without the following people I would have never gotten this to work.

PS: This is my post #100! 😎

Advertisements

June 8, 2009

Installing VMware Server on Linux Mint (Ubuntu)

Filed under: linux,virtualization — SiKing @ 8:52 pm
Tags:

Installing VMware Server is not your typical point-and-click procedure. However, it is quite easy even for those who are a little squeamish with the command line.

Here I will be talking about installing VMware Server version 1.0.9 on Linux Mint 5 – I don’t do the latest’n’greatest anymore. Linux Mint is fully compatible with Ubuntu 8.04, so I would expect this procedure to be very similar, if not identical, for most derivatives and close versions.

VMware are very good at hiding all the useful stuff on their website! 🙄 Here are all the pieces you are going to have to download:

  • VMware Server will require you to build kernel modules. You will need kernel header files for that. On Mint/Ubuntu you already have them at /lib/modules/$(uname -r)/build/include. The installer, further below, will be able to figure it out automatically, assuming you have all the defaults for your system.
  • To build stuff, you will need tools. I just grabbed the build-essential package and that had everything.
  • The VMware install guide is linked here – you want the Admin Guide, starting somewhere around page 36. I once accidentally found a much more succinct Install Guide on their page, but I can’t find it again. 😦 Below is only the relevant distill; however, I would still recommend that you have at least a browse through theirs in case you run into problems. There is also a detailed guide here, which may be of some use if you run into problems.
  • VMware is pushing the newer 2.0 version; older version are here – you want to get the “VMware Server for Linux. TAR Binary.” Right on that same page, notice the register for your free serial number(s) link. The server is free, but they will need an e-mail address where they can push more stuff on you.

First you will need to unpack the TAR Binary. You will only need this once, so you might as well do it in /tmp – which gets automatically emptied each time you reboot. Open up a terminal:

cd /tmp
tar xvf ~/Downloads/VMware-server-1.0.9-156507.tar.gz

And continue with the install:

cd vmware-server-distrib
sudo ./vmware-install.pl

I took defaults for everything except the following:

In which directory do you want to install the binary files?
[/usr/bin] /usr/local/bin

On Ubuntu, or any system that has a package manager, it is good idea to keep stuff you install manually somewhere else. The Linux file system has a place specifically for this purpose, and that place is /usr/local.

If you screw the install up, you can run sudo /usr/local/bin/vmware-uninstall.pl so that it cleans up, and then start again.

Next is the configuration. The installer will prompt you, or you can just run explicitly sudo /usr/local/bin/vmware-config.pl. Any time afterwards you want to change something, you will need to rerun this program. For Linux Mint 6 (Ubunt 8.10) or perhaps later, you might need this patch before you configure the VMware – suggestion is to run the configuration program, if it fails install the patch, if it passes just move on. Again, I took defaults except:

You can safely ignore the complaints about the extensions on the Icons, as well as the wrong version of the gcc compiler.

For networking, make sure you bridge all interfaces (ethernet and wireless). I did not use NAT.

In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines] /home/vmware/machines

The way I have my disk partitions set up, I had to override where the machine images will be kept. The images will be big, make sure the place you tell it has enough space.

If everything worked fine, you should get a new menu entry Applications > System Tools > VMware Server Console. The first time you try to run it, it will not work. 😦 If you run vmware from the command line, you will get:

/usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
/usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
/usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/local/lib/vmware/bin/vmware: /usr/local/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)

According to the Gentoo team, this file is useless. Once you delete that, the VMware console should come up normally.

Update 09/06/18:

I just tried to do the above on Ubuntu 8.10 64bit. I did need the patch as mentioned above, and I did not get the error about libgcc_s.so.1 when starting vmware. However, I did run into an issue starting up my virtual machine. At first you get a blank error (as in: “The process exited with an error: End of error message.”), but if you turn on debugging in the advanced options you can see the actual error:

Version mismatch with vmmon module: expecting 138.0, got 137.0.
You have an incorrect version of the `vmmon' kernel module.
Try reinstalling VMware Server.

And they’re not kidding. The fix is that you have to configure vmware twice! 😯

Then there was a second surprise: my arrow keys (along with a bunch of others) did not work inside vmware. There is an explanation as well as a solution, at the VMware Knowledge Base.

Every once in a while the keyboard will stop responding to mapped keys – things like Crtl-Alt-LArrow to switch desktops – you can run setxkbmap to fix it.

Update 09/06/24:

For some other reasons, I updated my box to Ubuntu 9.04 AMD64. When recompiling vmware I hit some SSL key errors.

Update 09/07/22: Bottom line: If you are going to go with VMware 1.x do not go over Ubuntu 8.04 (Mint 5). After several months of running it on 9.04×64, I feel it is quite unstable! Also, if you do want to virtualize 64bit operating systems, make sure your BIOS supports this thing … upfont. 👿

September 19, 2008

Time warpin’ with Sun xVM VirtualBox

Filed under: virtualization — SiKing @ 3:42 pm
Tags:

Got a new job, got a new machine, got a new toy! 😉 I am currently working on testing something that requires me messing around with system time; specifically what will happen during the time changes due to summer daylight saving time. Since I have a history of messing around with things I should not be messing with and irrevocably screwing up machines, I thought it would be best to do my messing in a virtual machine. It’s the first time I really had a chance to play around with one of these.

Sun VirtualBox, while a VM is running, holds on to everything. If you change the system time, normally within a minute the time will return back to what it should be. Not only that, I actually needed to change the BIOS time as well as the system time. Although the VirtualBox has a pretty GUI, it is rather limited when it comes to the advanced functions. The BIOS time can only be modified from the command line.

VBoxManage modifyvm <uuid|name> -biossystemtimeoffset <msec>

The above one-liner is the entire documentation of this particular function! You have to do this while the VM is not running; in my case that means shutdown my system, shutdown the VM, modify the time, bring up the VM, bring up my system – all in all, about 20 minutes each time I do this. I immediately put in a request for more RAM. However, figuring out the milliseconds that you want to offset the time is a bit of a pain. ➡ At least it will take negative values if you need to go backwards.

I immediately came up with a few shortcuts. In case you’re wondering, this is all bash.

 vboxHtime () {
	# Advance VM BIOS time X hours
	msecs=$(( ${1:-0} * 60 * 60 * 1000 ))
	echo Advancing time ${msecs}ms
	VBoxManage modifyvm Vista -biossystemtimeoffset ${msecs};
 }

 vboxDtime () {
	# Advance VM BIOS time X days
	msecs=$(( ${1:-0} * 60 * 60 * 1000 * 24 ))
	echo Advancing time ${msecs}ms
	VBoxManage modifyvm Vista -biossystemtimeoffset ${msecs};
 }

 vboxWtime () {
	# Advance VM BIOS time X weeks
	msecs=$(( ${1:-0} * 60 * 60 * 1000 * 24 * 7 ))
	echo Advancing time ${msecs}ms
	VBoxManage modifyvm Vista -biossystemtimeoffset ${msecs};
 }

😐 So far, nothing spectacular. If you need to reset the time back to normal, just run any of these with no arguments; this is taken care of by the ${1:-0} bit. But I quickly found out that all these are not additive.

 vboxWDtime () {
	# Advance VM BIOS time x weeks plus y days
	msecs=$(( $(( ${1:-0} * 60 * 60 * 1000 * 24 * 7 )) + $(( ${2:-0} * 60 * 60 * 1000 * 24 )) ))
	echo Advancing time ${msecs}ms
	VBoxManage modifyvm Vista -biossystemtimeoffset ${msecs};
 }

Still a pain in the ass to figure out how many milliseconds are between now and any given point in time.

A big Thank You goes out to ripat for inspiring the following.

 vboxdate () {
	# Adjust VM BIOS time to a given date
	secs=$(date --date "$*" +%s)    # convert supplied date to secs, since 1970-01-01
	let secs-=$(date +%s)           # subtract the date NOW
	msecs=$(( $secs * 1000 ))       # convert to millis
	echo Adjusting time ${msecs}ms
	VBoxManage modifyvm Vista -biossystemtimeoffset ${msecs};
 }

Blog at WordPress.com.