Development of hosting code and use of virtualization software


Virtualization Software for x86 Hosts

If you're developing code for an x86 host, why bother using virtualization? The host and target are identical, so using virtualization software introduces overhead. Some of the problems introduced by a homogeneous host and target can be latent in nature, resulting in unexpected problems if the software happens to work by chance on the host environment. Virtualization still makes sense as part of the development process for the following reasons:

• Isolates development target dependencies: It's easy to become careless when you're compiling programs and depend on a library or configuration file that is present on the host computer but won't be available when the software is deployed. Testing and validating the boot-up sequence is best done using a clean computer, because the host environment can interfere in unexpected ways.

• Constrains resources: If the target machine has 8MB RAM, a virtual machine can handle that without any problems. If the target device doesn't have certain hardware like network adapters or serial ports, you can also do that in the virtual machine. For example, many embedded x86 targets have little or no video memory.

• Is highly repeatable: Nearly all virtual machines support the notion of fixed storage, which lets you make writes during the run of the application that are disposed of when the machine reboots. Using virtualization software, the computer can always be returned to a known state.

Approaches to Virtualization

You can use several approaches for x86 virtualization: Sun's VirtualBox, VMware, and QEMU. VirtualBox and VMware are much easier to use than QEMU; however, QEMU is very Linux oriented and lets you start a virtual machine from a kernel image and an initial RAM disk file, features that VirtualBox and VMware lack. VMware and VirtualBox are commercial software packages that have licensing terms restricting their use in certain commercial situations. Please consult the terms included with the product to determine if you need to purchase a license. You may be curious about Xen, which is a hypervisor for x86-based systems. Xen is more like an operating system that runs operating systems efficiently. It differs from QEMU or VMware in that operating systems run on a Xen pseudo-hardware layer which then partitions the hardware resources to the virtual machines. Installing Xen means overwriting your current operating system and installing Xen on top, which is probably not what you have in mind. When you use either VirtualBox or VMware, you can boot the target machine over the network using PXE as the boot loader. In the VirtualBox user interface, you configure a machine to boot from a network device by opening the virtual machine's definition, selecting General at left, and then clicking the Advanced tab.

In the Boot Order list, unselect every item except Network. When the machine boots, it uses DHCP to request an address and boot information and proceeds to download a kernel and root file system; then, the machine starts running. If you're planning to use PXE for booting during development or deployment, using virtualization software makes testing the PXE configuration much easier than power-cycling a board, even if the Power On Self Tests (POSTs) are disabled.

This article covered some commonly used tools for virtualization. This technology is very useful when you don't yet have your hardware but you still want to experiment. QEMU is the best tool for emulating machines other than x86 and is becoming a popular item in the embedded developer's toolbox.

Legal Disclaimer

Our website is not responsible for the information contained by this article. Articleinput.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.

Note: This article was sent to us by: Vern Hensley at 01232010

Related Articles

1. Basics to understanding the structure of an embedded Linux system
Anatomy of an Embedded Linux System At runtime, an embedded Linux system contains the following software components: • Boot loader: What gets the ope...

2. The resemblance between the GCC compiler and the kernel in Linux
The GNU Compiler Collection The GCC compiler, like the kernel, is designed for portability. Like all open source programs, GCC is available in source form, and ...

3. Automake and Autoconf discover the state of the target environment
Automake/Autoconf Open source software is designed to be distributed in source code form so that it can be compiled for the target platform. When target platfor...

4. How and where does a software developer get help
Where to Get Help All software developers depend on little helpers, whether visible or invisible. Open Source developers tend to call upon a large number of res...

5. Necessary additional steps to get Linux running
Host Services After the software is installed, some additional configuration steps are necessary to get the packages in running order. This part goes through co...

6. Virtualization and the computer resource sharing
Target Emulation and Virtual Machines Virtualization is a mature technology that lets several operating systems share the physical resources of a machine, such ...

7. How to boot the board and start Linux
What to Do After Unpacking the Board The best way to assess what is supplied with the board is to plug in the board and get Linux up and runnin...

8. Root file system and kernel as parts of a Linux system
Understand the RFS The kernel is only one part of a Linux system. The root file system is a necessary component for a running system and is frequently overlooke...

9. Is the root file file system adequate for your embedded project
Suitability for Your Project It's time to decide whether the supplied root file system is adequate for your project. Although the supplied root file system won'...