NST and Virtual Machines

From NST Wiki
Revision as of 16:40, 7 January 2010 by Paul Blankenbaker (talk | contribs) (How do I install VirtualBox Server onto a NST Distribution)
Jump to navigationJump to search

General Virtual Machine Questions

What Virtual Machines Will NST Run Under?

NST is currently known to run under:

  • The VMware product line.
  • VirtualBox

What are the Disadvantages of Running NST within a Virtual Machine?

  • Performance will be less than running NST on bare metal.
  • Wireless tools will not work as physical wireless adapters appear are typically virtualized as Ethernet NICs.

What are the Advantages of Running NST within a Virtual Machine?

  • You can monitor the traffic on the machine without any cables or hardware.
  • You can easily move your NST system to a different machine.

Can I Run Virtual Machines from a NST System?

Yes. If you perform a full installation of NST, you can install a virtual environment and run virtual machines within your NST system. For example, if you install VirtualBox onto your NST system, it will be possible to run things like "Windows 7" virtually within your NST system.

Both the VMware and VirtualBox environments are known to run on a NST system. Any virtual environment which runs under Fedora should work on a NST system as well.

VirtualBox Frequently Asked Questions

Why can't I monitor all traffic on the virtual network adapter?

There are two likely reasons that can trigger this issue:

1. The network adapter must be up and enabled on the host system before a virtualized NST system will be able to see any traffic on the adapter. If this is the issue, you will need to enable the network adapter on the machine which hosts the virtual NST (outside of the NST system).

2. VirtualBox allows one to specify the "virtual hardware implementation" when configuring network adapters. We have seen the case where some "virtual hardware implementations" do not properly support promiscuous mode operation within the NST environment (in particular some of the E1000 adapters).

So, if you run across this condition, we recommend that you try a different "virtual hardware implementation" (the PCnet Fast-III implementation has worked for us).

How do I install the VirtualBox Guest Additions?

  • Install the following packages that are necessary to build the kernel modules:
yum install gcc kernel-devel
  • From the Devices menu of VirtualBox, click on the Install Guest Additions options. If things go well, a virtual CD will appear on your GNOME desktop.
  • Open a terminal window and login as root (if you aren't already logged in as root).
  • Copy the contents of the CD to a temporary directory, run the installation script, and then remove the temporary directory (NOTE: While VBOX* will probably work as shown below, it is recommended to replace it with the actual directory name):
cp -rp /media/VBOX* /tmp/
cd /tmp/VBOX*
./VBoxLinuxAdditions-x86.run # NOTE: Run ./VBoxLinuxAdditions-amd64.run if 64 bit machine
cd
rm -fr /tmp/VBOX*

  • Reboot the system (may not always be required - you can't do this step if running from a Live boot).

How do I update the VirtualBox Guest Additions?

Anytime you update the kernel on a NST system running under VirtualBox, you will need to rebuild the VirtualBox kernel module. This can be done using the following command:

service vboxadd setup

It's recommended to either reboot your machine or restart the VirtualBox services after rebuilding the kernel module. Here are the commands to restart the VirtualBox services:

service vboxadd restart
service vboxadd-x11 restart
service vboxadd-service restart

NOTE: You may or may not have the vboxadd-x11 service.

NOTE: Updating and restarting the services won't necessarily fix your current X session. So, if you are logged into a graphical desktop, you will need to log out and back in order to make use of the VirtualBox drivers.


How do I install VirtualBox Server onto a NST Distribution

If you've installed the NST onto bare metal (a typical hard disk installation) and you are interested in running virtual machines within your NST system, you can easily install VirtualBox. This should work starting with NST release 2.11.0:

yum update
yum install VirtualBox-3.1

NOTE: At the time of this writing, VirtualBox has two versions available in their yum repository. The package named VirtualBox installs a 3.0 release, whereas the package named VirtualBox-3.1 installs a 3.1 release.

How do I update the VirtualBox Server Modules?

Anytime you update the kernel on a Linux based system running VirtualBox, you will need to tell VirtualBox to rebuild its kernel modules. This can be done using the following command:

service vboxsrv setup

NOTE: This this is different than the "VirtualBox Guest Additions" as this refers to the native OS under which the VirtualBox environment is running under.