December 2006 - Posts

 

A differencing disk is a special type of dynamic disk that stores changes to virtual machine state in a file separate from the base VHD.  Differencing disks are defined in the context of a parent-child relationship. In this relationship, each child differencing disk has one and only one parent disk, but a parent disk may be associated with multiple child differencing disks.

Differencing disks can be created in simple or complex hierarchies. Creating a multi-level differencing disk hierarchy is called "chaining."  The disk hierarchy is referred to as a chain of differencing disks, reflecting that a child differencing disk can have a parent disk that is also a differencing disk. A chain of differencing disks can consist of several levels, but at the top of the hierarchy, there is always either a standard dynamically expanding or fixed-size VHD. This concept is important because state changes in a differencing disk are represented as modified blocks in relation to a parent disk. Therefore, differencing disks are never used independently, but in conjunction with all parent disks in the hierarchy.

Every VHD contains a standard header that you can find described in the whitepaper.  Pivotal to dynamically expanding VHDs is the dynamic disk header contained in the standard VHD header.  Since differencing disks are just a special type of dynamically expanding VHD, the dynamic disk header format is identical for both standard dynamically expanding and differencing disks. However, several fields in the dynamic disk header are relevant only to differencing disks.  These special fields identify parent disk attributes.

When a differencing disk is opened, it uses the parent UUID and Unicode file name information stored in its’ dynamic disk header to locate and open its’ parent disk. Since a parent disk may also be a differencing disk, it is possible that the entire hierarchy of parent disks will be opened, up to the base virtual hard disk. 

When a virtual machine using differencing disks issues a write operation, the new data is written only to the child differencing disk.  An internal VHD data structure is updated to reflect the changes, effectively indicating that newer data is contained in the differencing disk.  In effect, the modified data block in the differencing disk supersedes the data block in the parent disk. During read operations, the internal virtual hard disk data structure is checked to determine which modified data blocks to read from the child differencing disk. Unchanged data blocks are read from the parent disk.

Differencing disks are portable across platforms because of the information stored in the Parent Locator entries of the dynamic disk header. These entries contain platform specific path information that allows a child differencing disk to locate a parent differencing disk on a physical drive.

For the Windows platform, the absolute and relative path of the parent disk are stored in the Parent Locator entry of a differencing disk. So as long as you copy the VHDs to the same relative directory hierarchy on a new Microsoft Virtual Server system, you can add a virtual machine and turn it on without having to make any other changes.

Differencing disks are very useful in scenarios that require multiple complex configurations sharing a large common base.  You only have to build the common base configuration once, then create additional virtual machines with incremental changes using differencing disks that have the base configuration VHD as a parent disk. Using differencing disks in this manner not only help you to execute concurrent, but individual virtual machines on a Virtual Server system, they also save you a significant amount of physical disk space.

 

 

 

Commercial grade virtualization technology was developed by IBM in the mid-1960’s to allow the System/360 Model 67 hardware to support multiple, concurrent guest virtual machines, each able to run a single-user operating system. IBM did this by developing two individual operating systems, Virtual Machine (VM) and Conversational Monitor System (CMS), commonly referred to as VM/CMS. VM created and controlled virtual machines and CMS, a single-user operating system, ran inside the virtual machine, delivering to each user access to underlying system resources.

More recently, virtualization technology research and product development has resurged with a focus on the x86 (32-bit and 64-bit) platform. In the last few months, both Intel and AMD released x86 processor revisions with new instructions and extensions specifically targeted to enable hardware-assisted virtualization. Although differing in implementation details, Intel Virtualization Technology (VT) and AMD Virtualization (AMD-V) provide hardware virtualization features that can be leveraged by software vendors to extend their virtualization solution architectures.

Software Virtualization

Software virtualization includes various techniques to enable multiple secure, isolated partitions to be hosted on a single physical system, sharing resources. Different approaches provide different levels of partition density, scalability, performance, and breadth of operating system flavors that can be concurrently supported on a given platform.

Machine-Level Virtualization

At the foundation of a machine level virtualization solution is a “virtual machine monitor” (VMM) responsible for the creation, isolation, and preservation of virtual machine state, as well as orchestration of access to system resources. VMM design is usually tied to a specific processor architecture, so while it allows running various and unmodified operating systems inside a virtual machine, you are usually limited to operating systems that can natively run on the physical system processor.

There are variations of VMM implementations.  Some VMMs runs above a host operating system like the Java VM. Other VMMs run as a peer to the host operating system like Microsoft Virtual Server or VMWare GSX Server. Most vendors are now implementing VMMs that run directly above the hardware, below all virtual machine partitions. These are more commonly referred to as "hypervisors".  Examples are Microsoft Windows Server Virtualization and VMWare ESX Server.

In terms of performance, the hypervisor is capable of achieving higher levels of efficiency and, therefore, greater virtual machine density because it has direct access to the hardware.

Full Virtualization

Using full virtualization, a complete virtual system is created and maintained by the VMM to abstract the real hardware from the virtual machine. This allows an operating system to execute in a virtual machine without any modification. Virtual Server 2005 R2 uses this technique along with binary translation, a process that allows the VMM to handle non-virtualizable x86 instructions, to provide system virtualization on the pre- Intel VT and AMD-V x86 processor architectures.

A benefit of full virtualization and the approach of decoupling the physical hardware from the virtual machine is the ability to easily move virtual machines between servers with different physical configurations. This flexibility comes with a performance hit due to overhead associated with the maintenance of each virtual machine state, and latency introduced with binary translation.

Native Virtualization

Native virtualization depends on a virtualizable processor architecture, such as is available with the x86 Intel-VT and AMD-V series. These processors implement new execution modes, instructions, and data constructs in hardware that are designed to reduce the complexity of the VMM.

With native virtualization, the VMM is no longer required to maintain virtual machine resource characteristics and state in software; these functions now belong to the processor hardware and logic. Just as in the case of full virtualization, operating systems can run unmodified inside the virtual machines. Windows Server Virtualization will use this method to run legacy operating systems.

This type of implementation has many potential benefits ranging from the simplification of the VMM architecture to significant performance improvements due to reduction of software-based overhead. By lowering the virtualization overhead, a greater partition density can be achieved on any single system.

Paravirtualization

Paravirtualization was developed as an alternative to using binary translation to handle x86 non-virtualizable instructions. In this approach, guest operating systems require modification to enable “hypercalls” from the virtual machine to the hypervisor. Instead of the hypervisor (or VMM) having to translate a potentially unsafe instruction from a guest operating system to guarantee system state integrity, a structured hypercall is made from the guest to the hypervisor to manage the system state changes. A strict paravirtualization implementation offers greater performance on standard x86 hardware by eliminating the need for costly operations incurred using full virtualization and binary translation. However, it does so at the cost of limiting unmodified guest operating system support and migration of virtual machines back to a physical server. Recognizing these limitations, newer virtualization solutions based on paravirtualization implementations usually leverage hardware virtualization to host unmodified operating systems. This allows a broader range of support, extending to legacy operating systems that are unlikely to be modified, while allowing newer operating systems to be updated, taking advantage of enhancements and performance gains offered through paravirtualization.

Operating System-Level Virtualization

Operating system-level virtualization is based on abstraction of the operating system layer to support multiple, isolated partitions, or virtual environments (VE) on a single instance host operating system. The virtualization is accomplished by multiplexing access to the kernel while ensuring that no single VE is able to take down the system.

This technique results in very low virtualization overhead and can yield high partition density. However, there are two major drawbacks with this type of solution. The first drawback is the inability to run a heterogeneous operating system mix on a given server because all partitions share a single operating system kernel. The second big drawback, also caused by the shared kernel model, is the lack of support for running a mixed 32-bit and 64-bit workload. In addition, any operating system kernel patch affects all virtual environments. For these reasons, operating system-level virtualization tends to work best for largely homogeneous workload environments.

Application-Level Virtualization

Application-level virtualization is a technology that is geared towards partitioning and isolating client side applications running on the local operating system. Applications are isolated in a virtual environment layered between the operating system and application stack. The virtual environment loads prior to the application, isolates the application from other applications and the operating system, and prevents the application from modifying local resources such as files and registry settings. Applications can read information from the local system registry and files, but writeable versions of these resources are maintained inside the virtual environment. In fact, the application may never be locally installed on the desktop; instead the code bits can be dynamically streamed and cached in the virtual environment as new portions of the application are needed.

There are several benefits provided by application-level virtualization. Of most importance are increased stability of the local desktop, simple application removal without changes to the local environment that could negatively affect other applications, and seamless, conflict-free, side-by-side execution of multiple instances of an application. One or more additional servers may be required to maintain application distributions, application streaming to the desktop, and other enterprise-wide functions.

 

 

If you ever want to move an IDE-based virtual hard disk (VHD) from Virtual PC to a SCSI-based VHD in Virtual Server, here are the steps to get it done!

  1. Move the VHD and VMC files to the Virtual Server host
  2. Open the Virtual Server Web Administration site
  3. In the Virtual Machines window, click Add and register the new Virtual Machine
  4. Once back in the Virtual Machines window, click Configure and choose the new Virtual Machine
  5. In the new Virtual Machine  Configuration windows, click on SCSI adapters
  6. Click on Add SCSI Adapter (ID 7) and then OK
  7. Leave the boot disk as IDE disk
  8. Start the new Virtual Machine
  9. You should see the following when the adapter is identified
    • Found new hardware: Adaptec AIC-7870 PCI SCSI Adapter
    • You will need a CD or ISO to load the aic78xx.sys driver
    • The driver will install and the Virtual Machine will now be able to boot using SCSI, but this is a slow SCSI driver.
  10. In the Virtual Machine, open Device Manager
  11. Expand the SCSI and RAID controllers section 
  12. Right-click on the Adaptec driver and choose Update Driver
  13. Choose the Install from a list or specific location and Have Disk options
  14. Browse to C:\Program Files\Virtual Machine Additions and click OK
  15. The Microsoft Virtual Machine PCI SCSI Controller driver will now install
    • Now the fast SCSI driver is loaded
  16. Shutdown the Virtual Machine
  17. Back in the Virtual Server Virtual Machine configuration, click on Hard disks in the Configuration section
  18. Change the Virtual Hard Disk 1 attachment to a SCSI ID
  19. Click OK
  20. Start the Virtual machine