Showing posts with label vmware. Show all posts
Showing posts with label vmware. Show all posts

02 November 2013

How to easily create custom networks in VmWare Fusion 5 Standard

For a long time, creating custom networks in VmWare Fusion has been a challenge. For some bizarre reason, for years Fusion lacked the network-management GUI commonly found in the equivalent VmWare Workstation product for Windows.

Since switching to OSX last year I've had to edit each VMX file, forcing interfaces to use a custom network definition, but I've recently come across a lovely tool that greatly simplifies this task AND finally clarified for me how Fusion stores network definitions.

This tool is UBER Network Fuser, by Nicholas Weaver. It was released in 2012 when he wasn't working at VmWare yet, and it's not been updated since -- likely because Fusion 6 now offers similar functionality in the twice-as-expensive Professional version (which I think is ridiculous -- Workstation comes in one version with all features, why does the overall-less-powerful OSX equivalent have two?) but it still runs fine on OSX 10.8.5 Mountain Lion.

The tool itself is really easy to use: just go to the Networks tab to add or edit subnets, specifying whether you want to use the Fusion-provided dhcp and NAT services and to run through a virtual adapter. For some reason it won't allow you to customise subnets (you get a random 192.168.x.x net with mask 255.255.255.0), but that can be hacked-in as I'll show you later.

Next, go to the Configuration tab and click on the path to your Virtual Machines (which might already look correct, but won't work until you actually set it yourself). Leave the Preferences Path alone.

Now go to the Virtual Machines tab, refresh the list, select a machine to edit, select the interface you want to assign to your custom network, and select the network. Done!

This is already a nice set of features, but the real kicker is still to come. Close the tool, start Fusion, edit another image, select your network adapter, scroll the option list… your custom network is now an option for all machines! This is because Fusion stores network definitions in /Library/Preferences/VMware Fusion/networking - open it with a text editor and you'll see it contains old and new network definitions. UBERNF manipulates this file, and Fusion is happy to go along with it. You could just change subnet values here, I believe.

Unfortunately Nicholas didn't release any source code for UBERNF (I wouldn't be surprised if some of it ended up in Fusion Professional, to be honest), so there is no way to improve it or even just fix little defects that are probably due to OSX changes between 10.7 / Lion (the version he compiled it on) and 10.8 / Mountain Lion. It would be nice if somebody could write a similar app for Mountain Lion / Mavericks and release it as open-source, or simply charging a few dollars less than the difference in cost between Fusion Standard and Professional. Silly, silly VmWare...

26 August 2012

VmWare tip

This might be obvious to most, but it's easy for novice VmWare users to forget.

When you take a snapshot, VmWare has to write down the full current status of your image, including RAM. If you take a snapshot while the image is running, VmWare will have to save the full RAM content, which might run up to several GBs. If you take the snapshot after your image has properly shut down, RAM content will simply be discarded, and VmWare will only have to deal with the actual disk.

TL;DR: Always shut down your image before snapshotting, and you'll save a lot of disk space.

24 November 2009

How to Replace VmWare Server 2.0 Console with VNC

VmWare Server 2.0 ships with a web-based user-interface that is, to put it bluntly, an abomination. Supposedly, it is that way in order to simplify requirements: gone is the command-line API-based interface of 1.0 (which is now only available in the pricier products, what a coincidence), now the only thing you need is a web browser and a plugin that will display the consoles of virtualized instances.

This is all well and good when the plugin works. Which is, considering the constant flow of browser updates, not quite often. In particular, it seems that after upgrading to Firefox 3.5, the plugin stopped recognizing my arrow keys (of all things). I tried running it as a standalone client, which is surprisingly simple (just locate vmware-vmrc in your Firefox profile folder and use it to connect to the main server on port 8333), with no success. I've even followed some blog advice to add something to /etc/vmware/config, but that didn't do it for me.

Then I remembered what everyone in the VmWare world knows: these virtual consoles are VNC-based. So there must be a way of using a "proper" VNC client, bypassing the godawful plugin. And indeed there is, just drop the following lines in the .vmx file of the virtual machine you want to VNC-enable:

RemoteDisplay.vnc.port = "5900"
RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.password = "password"

Reboot the instance and voilà, you will be able to connect with a better client, like xTightVnc, where arrow keys do work properly. You can obviously change the port and password to suit your needs.

27 July 2009

Oracle (Red Hat) Enterprise Linux 5 on VMware Workstation 5.5.x

Just wasted an hour trying to understand why VMware Tools wouldn't properly fix the X server on Oracle "Unbreakable" Enterprise Linux 5. The answer is: because the Tools coming with VMware Workstation 5.5 don't really work with such a modern distribution. So the answer was:

  1. get hold of a newer release (Workstation 6.0.2 did it for me)
  2. find the file "linux.iso", and copy it across to the old Workstation (you might want to rename/backup the original, just in case) in the same position.
  3. perform a regular installation of VMware Tools. It should correctly detect your X.Org 7.1 and fix it properly. (Note: if you get errors coming from VFS, it means that VW was too quick in unmounting the drive. Remount it, then copy the rpm to the local filesystem before reinstalling.)

If you haven't got a newer version of VMware, try adding the following lines inside the "Monitor" section of your /etc/X11/xorg.conf:

HorizSync 1-10000
VertRefresh 1-10000
It might just be enough.

29 June 2009

Earth to VmWare: make some DEBs, please

I've recently installed VmWare Server on a new box. For some reason, VmWare packages RPMs but not DEBs, so I had to do a nonstandard local install from the generic .tar.gz installer. That's not difficult, but now there is no way for me to track updates, including security-related ones.

Come on VmWare, get your act together: it's 2009, people expect this sort of feature these days. Since you bother to build RPMs, it's clear that you can package stuff properly if you want to. If you are not sure what distribution to pick in the sea of available Debian-clones, just track Debian-stable and let the community do the rest.