Running a XubunTOS Virtual Machine Image in VMware Player

From TinyOS Wiki
Jump to: navigation, search

DEPRECATED - Do not use

The XbunTOS VM image referenced in this tutorial is very out of date and uses TinyOS 2.0 or 2.1. Prior to the deprecation this page was last updated in 2009.


This tutorial provides instructions for using the pre-configured XubunTOS virtual machine image in VMware Player. Instructions are provided for both Debian-based Linux as well as Windows users. If you run into problems, find that something doesn't work, or want to provide feedback of any kind, feel free to email me (Kevin Klues) at klueska(at)gmail.com and I'll try and update this tutorial as soon as possible.

Note:You will need to make sure you administrative rights on your machine before installing the VMware player.

Otherwise, you will have to get your system administrator to follow these instructions instead. If you already have VMWare installed, you can skip down to the instruction for running XubunTOS in VMware Player.

OK, lets get started.....

Debian Linux VMware Player Installation

First thing you want to do is get the VMware Player installed and running on your system.

Open a terminal window, change to the /etc/apt directory, open the sources.list file, and add the following lines to it:

# Repository for VMWare
deb http://archive.canonical.com/ubuntu feisty-commercial main

Exit the file and update aptitude (you may need to run this a couple of times before it completes successfully)

sudo apt-get update

Now that aptitude has been updated to include packages from the commercial repository, you can install the VMware Player by issuing the following command:

 sudo apt-get install vmware-player 

Aptitude will inform you that it needs to install some packages that vmware-player depends on. In my case it was:

 Reading package lists... Done 
 Building dependency tree 
 Reading state information... Done 
 The following extra packages will be installed: 
 vmware-player-kernel-modules vmware-player-kernel-modules-2.6.20-15 
 The following NEW packages will be installed: 
 vmware-player vmware-player-kernel-modules 
 vmware-player-kernel-modules-2.6.20-15 

After some downloading time, the VMWare player installation will eventually start, and you will be asked some configuration questions.

First it will show you the VMware license agreement. Just select OK (by pressing tab) and press enter.

VMPlayer-File.png

Next it will prompt you for acceptance of the terms in the VMware server license. Select <Yes> and press enter.

VMPlayer-File-1.png

This completes the VMware player installation.

To open the VMware player either type the following command into a terminal window (I like to open it as a background process):

 vmplayer & 

Or open it from the menubar (picture below is for Gnome, probably somewhere similar in KDE or other window manager):

VMPlayer-File-2.png

Now you just need to get the XubunTOS virtual machine image running in your newly installed VMware player. The next section tells you how to do so.

Running XubunTOS in Linux VMware Player

To start running the XubunTOS virtual machine, you first need get a copy of the XubunTOS virtual machine image for TinyOS 2.0 or TinyOS 2.1. Now open up a terminal and 'untar' it into the vmware directory created in your home directory during the VMware player installation. In my case this is /home/klueska/vmware. Make sure you specify an absolute path otherwise 'tar' will complain.

 tar -zxvf xubuntos-2.0-vm.tar.gz --directory=/home/klueska/vmware/ 

Now go ahead and start the VMware player. The first time you start it, you will be asked to accept the 'End User License Agreement'. Browse through it and then click on 'Accept'

VMPlayer-File-3.png

Immediately after accepting, a window will pop up asking you which virtual machine you would like to open. Browse to where you 'untarred' the XubunTOS virtual machine image and select either 'Xubuntos 2.0.vmx' or 'Xubuntos 2.1.vmx', depending on which TinyOS version you downloaded. After this first time, this window will always pop up asking which virtual machine you would like to run.

VMPlayer-File-4.png

After opening the XubunTOS virtual machine, the following question will be asked. This question will only be asked of you once. Since the virtual machine was created somewhere other than where you have now stored it, it will ask if you want to create a unique ID for it on your machine. Just click on 'Create'.

VMPlayer-File-5.png

Now the virtual machine will begin booting and eventually you will be presented with the xubuntu login screen. The username is xubuntos and the password is tinyos.

VMPlayer-File-6.png

Once you log in, you are working with a full blown version of xubuntu linux that has all the tools necessary for TinyOS development pre-installed. You can treat it like any other debian-based linux machine and add users, change passwords, download software via apt-get, etc.

To connect to motes, you will have to tell the virtual machine that you would like it to recognize them. You MUST make sure all devices you would like to connect to are physically connected BEFORE powering on your virtual machine. If not, you will have to shut if off and back on again for them to be recognized. To do this, you don't need to actually power down the OS by logging off and shutting it down. You can simply quit VMware Player and start it up again. When you do this, the XubunTOS virtual machine will store its current state and return to exactly how it was before you shut it down. Its as if you asked the OS to go into suspend mode on a normal laptop.

Once you have your motes connected and you have started XubunTOS, you can select which ones you would like to connect to. They should be listed at the top of the screen, with depressed buttons indicating a connection, and undepressed buttons indicating that no connection has been made.

VMPlayer-File-7.png

And thats it! You should now be up and running with your virtual machine installation of XubunTOS in VMware Player. Questions or comments can either be sent directly to me (klueska(at)gmail.com) or the tinyos-help mailing list.

Windows VMware Player Installation

To install the Windows VMware Player, go to the web address found here and register for the product. Agree to the end user license agreement and then select to install the binary installer seen below:

VMPlayer-File-8.png

Once it is downloaded, go ahead and open it up to start the installation process.

Now just follow the on-screen instructions to get VMware Player installed. Once installed, open it up and follow the instructions found in the next section to start running the pre-configured XubunTOS virtual machine.

Running XubunTOS in Windows XP VMware Player

To start running the XubunTOS virtual machine, you first need get a copy of the XubunTOS virtual machine image from here. It is stored as a zip file that you will need to extract with your favorite Archive Utility. In my case, I'm using WinRAR, and the instructions below are based on this.

First, double click on the 'xubuntos-2.1-vm.tar.gz' file you just downloaded.

VMPlayer-File-9.png

And extract it to the 'My Virtual Machines' directory created for you during the VMware Player installation process. For me this was located in 'C:\Documents and Settings\klueska\My Documents\My Virtual Machines'

VMPlayer-File-10.png


VMPlayer-File-11.png

Once you have extracted the XubunTOS virtual machine, you can now open the VMware Player from the Windows Start menu and click 'Open'.

VMPlayer-File-12.png

Browse to the location where you extracted it to.....

VMPlayer-File-13.png

And click on 'Open'

VMPlayer-File-14.png

After opening the XubunTOS virtual machine, the following question will be asked. This question will only be asked of you once. Since the virtual machine was created somewhere other than where you have now stored it, it will ask if you want to create a unique ID for it on your machine. Just select 'Create' and click 'OK'.

VMPlayer-File-15.png

It will now tell you that the path to your floppy drive is incorrect, and will ask if you would like it to be changed to 'A:'. The reason it is incorrect is that the XubunTOS virtual machine image was originally created on a linux machine and you are now about to run it under windows. Changing the floppy location to 'A:' will allow your virtual machine to read and write from the floppy drive on your desktop. If you don't have a floppy drive, then this value is not important. Either way, go ahead and select 'Yes'.

VMPlayer-File-16.png

Now the virtual machine will begin booting and eventually you will be presented with the xubuntu login screen. The username is 'xubuntos' and the password is 'tinyos'.

VMPlayer-File-17.png

Once you log in, you are working with a full blown version of xubuntu linux that has all the tools necessary for TinyOS development pre-installed. You can treat it like any other debian-based linux machine and add users, change passwords, download software via apt-get, etc.

To connect to motes, you will have to tell the virtual machine that you would like it to recognize them. Once you have your motes connected and you have started XubunTOS, you can select which ones you would like to connect to. They should be listed at the top of the screen, with depressed buttons indicating a connection, and undepressed buttons indicating that no connection has been made. You may connect or disconnect them as you wish.

VMPlayer-File-18.png

And that's it! You should now be up and running with your virtual machine installation of XubunTOS in VMware Player. Questions or comments can either be sent directly to me (klueska(at)gmail.com) or the tinyos-help mailing list.