Showing post in category: Virtualization

27 May 2009

Trunk port in VMware used by Ubuntu Server (Hardy)

Posted by Jacob Emcken Comments (0)

At work I had to setup the network on Ubuntu Server (Hardy) so it was able to scan several networks with nmap as if they where local networks (and thus able to get MAC addresses). Until now the networks was scanned through a router which means the MAC addresses was lost. The reason for the importance of the MAC addresses was to identify whether a machine was likely a virtual machine or a physical machine.

The machine scanning is a virtual machine in VMware. Seven networks needed the ability to scan MAC adresses. VMware has a limitation of only 6 hardware devices (at least in ESX 3.5) which meant that having two harddisks it was only able to scan four out of the seven networks giving the machine a virtual NIC in each network. The ESX server separated the networks with VLAN tags so to work around this we created a virtual trunk NIC.

Notice: The VLAN ID is optional but an empty VLAN ID means it cannot see VLAN tags. If you want a VMware NIC. To see all VLAN tags the VLAN ID must be 4095 (this might be VMware specific). This gave me and a colleague quite a headache before we figured it out.

To create trunked NIC in VMware:

  • Click on the ESX server you want to create it on.
  • Click on the “Configuration” tab to the right.
  • Find the virtual switch in which the trunked NIC should reside in and click on “Properties…”.
  • Click on the “Add…” button at the bottom to start the wizard.
  • For “Connection Types:” select “Virtual Machine” and press “Next”.
  • Give the NIC a name ie. “Trunk” and set the “VLAN ID (Optional):” to 4095 and press “Next”.
  • Now just press “Finish” and notice the right information pane now indicating VLAN ID is set to “All”.

For Ubuntu Server (Hardy) to play nice with this new trunked NIC I found some help on the Ubuntu forums on how to setup VLAN.

First you have to install the vlan package:

sudo aptitude install vlan

Now enable the module:

sudo modprobe 8021q

And make sure it gets automatically loaded the next time the machine starts up:

sudo  sh -c 'grep -q 8021q /etc/modules || echo 8021q >> /etc/modules'

Now configure your NIC in the following file:

/etc/network/interfaces

The following example sets up the ip 192.168.1.100 with 8 as a VLAN tag on eth0:

auto eth0.8
iface eth0.8 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1

Now bring up the interface with:

sudo ifup eth0.8

Tags: , ,

09 Oct 2008

Whishing for more…

Posted by Jacob Emcken Comments (1)

Lately I found myself wishing for more in the world of Linux and Open Source. Yesterday I installed the free VMware Server 2.0 which in my opinion is an upgrade worth while. I didn’t need to patch anything to get the modules running on my Ubuntu Intrepid system, and on my laptop where I’m still running Ubuntu Hardy matching binary modules was actually included in the installation… no need to compile them … I like that. Bridging the Atheros wireless on my laptop still doesn’t work, but I guess thats not VMwares fault.

Anyways after installing VMware Server I installed a virtual Ubuntu 8.04 server (Jeos – Just enought operation system) and wanted to install the VMware Tools on the machine. But honestly would like to just install a deb package. I searched the web for a bit to see if someone had created some debs ready to use…. nothing. At some point Ubuntu hard Debian packages for both the VMware server itself and the VMware Tools. I want that! Well a package with Open Virtual Machine Tools would do as well. I think my choice on Ubuntu (or Debian for that matter) mainly is because the gigantic repository of quality packages. But this is one of the few times when it comes short. As far as I can tell open-vm-tools will be packaged for Intrepid… looking forward to it :)

I’m still ripping all my music to FLAC and today I found some old pieces of music which had been tagged wrong. I was browsing my music library with Rhythmbox and right clicked to change the tag but I couldn’t edit it :( I found a few bugs which seems to describe my problem… and it seems to be fixed in gstreamer-plugins-good version 0.10.11… to bad Intrepid only have 0.10.10 atm :(

Last but not least I wish the nvidia driver would support Xrandr… though I’m not holding my breath :D

I’ve bumped into several other wishes but these was the ones I could remember on top of my head. It seems that for every time the overall quality Linux raises I just raise my expectations by the same degree.

04 Jun 2007

Packaging virt-manager for Ubuntu

Posted by Jacob Emcken Comments (5)

Last week I attended a Xen course on SLES10 (SP1 RC5). We used virt-manager. I looked for it in Ubuntu but wasn’t able to find it. Instead I found this request for packaging virt-manager for Ubuntu.

I have been trying to do it myself but it isn’t as easy as I thought… I have never really tried packaging anything before (apart from my wallpapers which doesn’t really have any dependencies or make files).

Virtual Machine Manager has the following dependancies (taken from virt-manager homepage):

python >= 2.4
pygtk2 >= 1.99.12-6
gnome-python2-gconf >= 1.99.11-7
libvirt-python >= 0.2.1
dbus-python >= 0.61
gnome-python-desktop >= 2.15.4
libxml2-python >= 2.6.23
vte >= 0.12.2
virtinst >= 0.103.0

Identified corespondent packages in Ubuntu:

python                  Version: 2.5.1-0ubuntu3
python-gtk2             Version: 2.10.4-0ubuntu3
python-gconf            Version: 2.18.0-0ubuntu1
python-libvirt          Version: 0.1.8-0ubuntu2
python-dbus             Version: 0.80.2-1ubuntu2
python-gnome2-desktop   Version: 2.18.0-0ubuntu3
python-libxml2          Version: 2.6.27.dfsg-1ubuntu3
libvte9                 Version: 1:0.16.1-0ubuntu1

virtinst (downloadable from `virt-manager`'s homepage)

I guess virtinst would need packaging as well… download virtinst. The version of phyton-libvirt isn’t new enough either.

I have been looking at a Ubuntu packaging guide but have already run into trouble (even before getting to phyton-libvirt):

...
checking for PYGTK2... configure: error: Package requirements (pygtk-2.0 >= 1.99.11) were not met:

No package 'pygtk-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PYGTK2_CFLAGS
and PYGTK2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

make: *** [config.status] Error 1

08 May 2007

VMware server from Ubuntu official repositories

Posted by Jacob Emcken Comments (0)

I think its kinda hidden. You might have wondered why vmware-server kernel modules was available from the repositories but no vmware-server? The answer is: It is available!

Just like Real Player, Opera and other commercial software you can install VMware-server from the following repository, which you add to System -> Administration -> Software Sources and Third-Party Software:

deb http://archive.canonical.com/ubuntu feisty-commercial main

After that you run:

sudo apt-get update
sudo apt-get install vmware-server

A colleague pointed me a page about adding Adding Canonical Commercial Repositories in Ubuntu, which is actually referenced from the page about Installtion VMware Server in Ubuntu

28 Apr 2007

Using vmware-server-kernel-modules in Ubuntu

Posted by Jacob Emcken Comments (2)

In the lastest version of Ubuntu (version 7.04 – Feisty Fawn) kernel modules for VMware Server is available in the package vmware-server-kernel-modules from Ubuntus package repository. The VMware Server itself is at the moment not. You still need to install VMware Server from the tar.gz download from www.vmware.com.

I found documentation on how to make the VMware server kernel modules package work together with the VMware Server installed from tar.gz in the Ubuntu Documentation. I also found the reference to this documentation on the Ubuntu Forums.

The cool thing about this is that you don’t need to run vmware-config.pl every time you update your kernel.

If you upgraded to 7.04 from a previous version of Ubuntu you might run into a problem where you can’t get the vmware console to start. The output on the console will look something like this:

/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)

I solved it by removing the following packages:

 sudo apt-get --purge remove libdbus-1-2 libnautilus-burn3

Don’t worry new packages have taken their spots as far as I know:

libdbus-1-3
libnautilus-burn4

I found a thread on the VMware forums but my solution seemed easier :)