Search

Recent Posts

Tags


« | Main | »

VirtualBox 2.1.2 – missing tools?

By Dale Reagan | January 28, 2009

I expect things to improve when I update/upgrade software – whether it is a commercial product OR if it is an Open Source product.

Sadly, my VirtualBox installation is ‘broken’ after upgrading to version 2.1.2 (from version 2.0.6.)  Note that my VirtualBox VMs will still boot, but those that used Host Interface Networking no longer have network access…

In my custom setup I made use of two command line tools to manage Host Interface Networking:

VBoxAddIF and VBoxDeleteIF (used to setup network devices for automated provisioning via Cobbler.)

These tools appear to be missing after the upgrade via the rpm file (I used:  rpm -U VirtualBox-2.1.2_41885_fedora9-1.x86_64.rpm.)

As always – this could just be me – I could have ‘missed’ something – perhaps I’m not sitting/leaning the ‘correct way’ today.  In a production environment (instead of my test environment) this type of change would most likely cause major headaches.  If this truly is a ‘product change’ then I humbly suggest that:

I will dig through the docs (tomorrow) to see how to resolve this. (Oh the joy of Open Source!)

🙁

Update:

Yes, there have been changes to VirtualBox (a very active project!) – the tools in question were removed back in 2008 when the 2.1.x version was released (ok, I don’t always upgrade immediately, and, perhaps I should have reviewed the change log – I just did and I did not find the removal of these tools mentioned…)  I will need to explore the PDF documentation a bit more to understand how networking management has changed but a quick summary of the problem and a possible resolution follows.

My reason for using the tools (to add or remove a virtual interface which can be dedicated to a designated VirtualBox VM) is simple – since I use PXE (network) booting to install and test operating systems for virtual machines I could script a new network configuration and auto-magically assign interfaces to my VMs.  Then, taking the MAC information I populated my automated provisioning system (Cobbler) and voila, PXE booting with custom Kickstarts tied to MAC addresses. Using a virtual nic (VNIC) provides a simple way to isolate network traffic (ok, not really simple at the Kernel level but, relatively simple of the end-user…)  Note that it is possible to use a real NIC or a ‘virtual network bridge’ to do PXE booting of VMs but there are some side-effects that I prefer to avoid (i.e. the bridge drops in and out of promiscuous mode, the VM winds up using the sub-net of the real NIC, etc…)

When reviewing the VBoxAddIF and VBoxDeleteIF scripts I find that they are actually the same script using tunctl (manage persistent network devices – VBoxTunctl was used by VirtualBox 2.0.x) and the brctl (bridge control) tool.  A quick egrep for tunctl and brctl from VBoxAddIF yields:

if ! VBoxTunctl -d “$interface” > /dev/null 2>&1
echo 1>&2 “VBoxTunctl command, or alternatively, the new interface will be created”
if ! VBoxTunctl -t “$interface” -g “$group” > /dev/null 2>&1
if ! VBoxTunctl -t “$interface” -u “$user” > /dev/null 2>&1

brctl delif “$oldbridge” “$interface” > /dev/null 2>&1
if ! brctl addif “$bridge” “$interface” > /dev/null 2>&1

In section 6.5 of the VirtualBox 2.1.2 PDF manual the changes to Host Interface Networking are described as being simplified (i.e. you don’t have to do all this VNIC tinkering.)  The section goes on to say that you can still use TAP devices (but creating them is now not directly supported with a VirtualBox tool…)

My *fix* (not a real fix) – just a seemingly quick way to get my vbox-en NICS back was to copy VBoxTAP from VirtualBox 2.0.6 AND to create links for VBoxAddIF and VBoxDeleteIF.  Note that VboxTAP (a shell script) uses VBoxTunctl (which is a compiled, binary file.)  I am guessing that there are differences between the current version of VBoxTunctl and the previous version but, based on my limited testing things still seem to work.

  1. -rwxr-xr-x 1 root root 8400 2008-09-12 14:00 VBoxTAP  (shell script)
  2. -rwxr-xr-x 1 root root 2384 2009-01-22 14:07 VBox
  3. -rwxr-xr-x 1 root root 7600 2009-01-22 14:10 VBoxTunctl
  4. lrwxrwxrwx 1 root root   13 2009-01-29 08:31 VBoxVRDP -> /usr/bin/VBox
  5. lrwxrwxrwx 1 root root   13 2009-01-29 08:31 VBoxSDL -> /usr/bin/VBox
  6. lrwxrwxrwx 1 root root   13 2009-01-29 08:31 VBoxManage -> /usr/bin/VBox
  7. lrwxrwxrwx 1 root root   13 2009-01-29 08:31 VBoxHeadless -> /usr/bin/VBox
  8. lrwxrwxrwx 1 root root   16 2009-01-29 14:19 VBoxDeleteIF -> /usr/bin/VBoxTAP
  9. lrwxrwxrwx 1 root root   16 2009-01-29 14:19 VBoxAddIF -> /usr/bin/VBoxTAP

I run the following command:

for NUM in 1 2 3 4 5 6 7 8 9 0; do      VBoxAddIF vbox${NUM} dale ; done

And now my VNICs are back!  (ifconfig | grep vbox)

vbox0     Link encap:Ethernet  HWaddr 00:FF:01:84:2C:7C
vbox1     Link encap:Ethernet  HWaddr 00:FF:AD:F1:8D:72
vbox2     Link encap:Ethernet  HWaddr 00:FF:1E:D2:B2:BD
vbox3     Link encap:Ethernet  HWaddr 00:FF:D0:59:5C:99
vbox4     Link encap:Ethernet  HWaddr 00:FF:4D:D9:04:D5
vbox5     Link encap:Ethernet  HWaddr 00:FF:F3:84:93:73
vbox6     Link encap:Ethernet  HWaddr 00:FF:4E:5E:43:CE
vbox7     Link encap:Ethernet  HWaddr 00:FF:B1:76:B8:38
vbox8     Link encap:Ethernet  HWaddr 00:FF:A7:25:AE:0B
vbox9     Link encap:Ethernet  HWaddr 00:FF:79:9D:ED:DB

A quick boot of one of my VMs (using the now restored vbox-en NICS) and things work again.  For more about how I am using VirtualBox and VNICS visit virtual-box-cobbler-automating-virtual-system-builds.

So, after a few hours of digging and testing my feedback for the VirtualBox team (or any Open Source team) – if you remove a feature or tool from your solution then, when possible,  please provide direction beyond “it is still possible to use TAP…”  (Ok, where’s a pointer to how???)

NOTE – I am a VirtualBox Fan – I have been using it for several months now and this is the first major issue that I have seen…

The diversion to resolve this problem distracted me from trying out Spacewalk – an Open Source systems management solution (provistioning, updating, monitoring and more) but now I am back on track and I should have my post completed soon…

Topics: Computer Technology | Comments Off on VirtualBox 2.1.2 – missing tools?

Comments are closed.


________________________________________________
YOUR GeoIP Data | Ip: 73.21.121.1
Continent: NA | Country Code: US | Country Name: United States
Region: | State/Region Name: | City:
(US only) Area Code: 0 | Postal code/Zip:
Latitude: 38.000000 | Longitude: -97.000000
Note - if using a mobile device your physical location may NOT be accurate...
________________________________________________

Georgia-USA.Com - Web Hosting for Business
____________________________________