AMD Logo AMD Developer Central

Virtualization and You: What AMD-V Means for the Developer 

Skip Navigation LinksHome > Docs & Articles > Articles & Whitepapers
Some scenarios where you'll find the ability to create virtual environments an absolute must when building your apps.
Justin Whitney  3/29/2007 
» Overview
» Background on AMD's Virtualization
» What Virtualization Means to the Developer
» Development Opportunities
» Where to Go From Here

Overview

As a developer, when I look at hardware advances, my first question is: "What does this mean for me?" Often, innovations in processor architecture mean more for OS or other low-level developers than they do for people designing end-user apps.

Fortunately, that's no longer the case. The past few months have seen an explosion of articles, presentations, webcasts, and whitepapers on multithreading for new and future multicore processors. For companies to stay competitive, their apps need to make the most of parallel threading techniques, so developers have a vested interest in learning them. But other processor features warrant close attention, as well. For example, you'll be surprised how AMD's Virtualization technology can impact your coding practice.

Background on AMD's Virtualization

With the Opteron, AMD introduced new native virtualization technology to help IT departments make full use of their hardware investments. Intending to solve the "one server, one application" problem, in which servers waste up to 85% of their capacity by exclusively running little-used apps, AMD added hardware-assisted AMD Virtualization, or AMD-V.

Previously code-named Pacifica, AMD-V allows the hypervisor to run an additional OS without a major performance hit. Today, software ranging from Microsoft Virtual PC to VMware to Xen 3.0 takes advantage of AMD-V, which allows for strong process isolation, Device Exclusion Vectors (DEV), and secure OS initialization support (SKINIT).

What Virtualization Means to the Developer

Most progress in virtualization at this level pertains only to a handful of developers, primarily those developing virtualization layers and operating systems. That said, other developers should be aware of the benefits of virtualization and how it applies to their own work. To that end, here are some scenarios in which you'll find the ability to create virtual environments an absolute must when building your apps.

Legacy Apps and/or Operating Systems
Those poor souls supporting outdated legacy apps, or even worse, vintage operating systems, will appreciate the ability to run those systems in a virtualized environment. This means taking advantage of the latest hardware for your development tools, even when it may not support your target platform, such as Win98 or OS2.

For example, you have a screaming fast workstation running Vista. Suddenly, you're tasked with updating a 16-bit app that the client can't afford, or for some reason doesn't want, to have rewritten. This is where virtualization comes into play. You can set up a virtual image running the target platform without having to configure an entirely new workstation.

Ben Armstrong, the "Virtual PC Guy", has a ton of examples like this on his blog, including several examples of running early 16-bit games on a Vista using virtualization. This is a great resource for getting ideas and some detailed how-to's.

Multiple or Unsupported Operating Systems
Even when you're not dealing with legacy operating systems, supporting customers in a multi-OS environment can be difficult. But by virtualizing, you can even code to widely divergent platforms like Vista and Linux at the same time. Similarly, if you're using or coding to an OS that your IT department doesn't support, putting it on its own virtual image may be the easiest solution.

Natural-Language Support
As a key aspect of coding apps for a global market, localization and natural-language support can complicate your app development significantly. Typically, you'd have to set up multiple installs, with each targeted environment on a separate boot partition or on an entirely different machine. Virtualization lets you set up these multiple environments on a single machine. Instead of booting up in French or Japanese or Texan, for example, just cycle through to that image.

Test Registry Modifications
Programmatically updating your registry can be a bit like serving blowfish. In the hands of a master, you get delicious results. Otherwise…not so much. Virtualization removes the risk of registry writes to your primary (non-virtualized) install. You essentially sandbox your developing and testing environment. If something goes wrong, blow it away and try again. (If only bad sushi was that easy to deal with.)

Development Opportunities

In addition to easing your burdens and helping you live a happier and more productive life, advances in virtualization also give you real-world opportunities of the professional sort. If you or your company works in this space, here are a couple of areas you might focus on for new product development.

New Virtual File Format
In 2005, Microsoft released the Virtual Hard Disk Format Specification, and a year later, in October 2006, they released the spec as part of their "Open Specification Promise". In the spec, they've included information like the hard-disk foot format and a description of block allocation table and data blocks, so you have the kind of low-level specs needed to build your own solutions using their royalty-free license of the VHD format.

Think of the VHD as a file system within a file. The ability to modify a virtual hard disk opens up a wide array of opportunities. You can build file management or conversion utilities that move files between the VHD and host file system. You can augment antivirus and security products. You can also build image management solutions.

Virtual Machine Management
Speaking of management, virtual machines need to be managed, too. Already, new tools are coming to market that help you manage your virtual environment. But opportunities exist for more. Microsoft, for example, provides Windows Management Instrumentation (WMI) integration with its Virtual Server product. By providing WMI counters to the host OS, Virtual Server gives developers a chance to build their own management solution, even integrating WS-Management messaging.

The WS-Management spec defines protocol for using Web Services to manage hardware. This spec was put out by the Distributed Management Task Force (DMTF), of which AMD, Microsoft, Xen, and other virtualization leaders are members. So you can expect the protocol to be integrated into virtualization products. And indeed it already is: You can use WS-Management to message WMI at a low level and, in turn, query and/or manage your virtual images.

Where to Go From Here

Virtualization technology, standards, and practices are evolving quickly. Here are a few resources to keep up-to-date.

WinHEC 2006 Presentations
Presentations from the 2006 Windows Hardware Engineering Conference have been posted for your viewing pleasure. Skip down to the Virtualization section and be especially sure to download Windows Virtualization Best Practices and Future Hardware Directions by Ben Armstrong and David Wooten.

Virtual PC Guy
As mentioned before, Ben Armstrong is the one to watch when it comes to hands-on virtualization techniques. His blog covers all manner of Windows virtualization tips and tricks. He also throws in a few games now and then.

Additional AMD Resources

Consider this your reading library for the basics on AMD Virtualization technology: what it is, how it works, and why you should care:

Additional Microsoft Resources

If you're going the Microsoft route, here are a few other things you might need, like a free download of Virtual PC (about 30MB) and the VHD Image Format Spec.

Justin Whitney consults and develops for leading high-tech firms and writes about emerging technologies. He can be reached through his site at http://www.justinwhitney.com/.

Back to top
© 2009 Advanced Micro Devices, Inc. AMD, the AMD Arrow logo, AMD Opteron, AMD Athlon, AMD Turion, AMD Sempron, AMD LIVE!, and combinations thereof, are trademarks of Advanced Micro Devices, Inc. Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States and/or other jurisdictions. Linux is a registered trademark of Linus Torvalds. Other names are for informational purposes only and may be trademarks of their respective owners.

This website may be linked to other websites which are not in the control of and are not maintained by AMD. AMD is not responsible for the content of those sites. AMD provides these links to you only as a convenience, and the inclusion of any link to such sites does not imply endorsement by AMD of those sites. AMD reserves the right to terminate any link or linking program at any time.