An Oracle Technical White Paper June 2010 Oracle VM Windows Paravirtual (PV) Drivers 2.0: New Features
Introduction... 2 Windows Paravirtual Drivers 2.0 Release... 2 Live Migration... 3 Hibernation... 3 Memory Balloon... 6 Conclusion... 8
Introduction Oracle VM Server for x86 (http://oracle.com/virtualization) is the server virtualization solution that supports both Oracle and non-oracle applications. It helps customers improve server utilization, achieve higher availability and better performance while reducing costs. Linux, Solaris and Windows are the supported guest operating systems. This paper will discuss how to achieve the highest performance for Windows virtual machines, explain how to use the Oracle Windows Paravirtual Drivers, and identify new features available in the 2.0 release. Microsoft Windows relies on hardware virtual machine (HVM) support to virtualize CPU and memory operations. However, it can take advantage of the benefits of paravirtualization (PV) to improve I/O performance. I/O paravirtualization is accomplished by installing paravirtual device drivers (network and block) that are hypervisor-aware and interact with the hypervisor application programming interfaces (APIs) that expose the communication to and from the actual physical I/O devices. These drivers significantly reduce the overhead of the traditional emulated device I/O implementation and provide improved network and disk throughput for Windows guests in an Oracle VM environment. Windows Paravirtual Drivers 2.0 Release Windows Paravirtual (PV) Drivers 2.0 was released June 2010 and is available for download on Oracle edelivery. It s packaged with Oracle VM 2.2.1 software package media and is free to download and use. Windows PV Driver 2.0 release includes new features and optimizations that make them well suited for enterprise usage: Support for more Windows editions, including Windows 7 and Windows Server 2008 R2 Live Migration, Hibernation and Memory Ballooning Windows PV Driver 2.0 is designed for Oracle VM 2.2.1. It is recommended to upgrade to this release before installing or upgrading the Windows PV Drivers. 2
Live Migration Live migration is a key feature of any virtualization solution. With Windows PV Driver 2.0 you can live migrate a Windows virtual machine (VM) from one server to another similar server with no interruption to the Windows operating system and the applications running on it. How to Use Live Migration As shown in Figure 1, the user can select a VM and then choose the Live Migration option. Figure 1. Virtual machine live migration Hibernation Hibernation is a Windows Power Management feature that allows a Windows operating system to save its memory contents (RAM) to disk before shutting down in order to improve the speed at which it can restart. When you start the Windows VM again, your files, documents and applications are available just as you left them. Why Use Hibernation While Oracle VM s save/restore feature is similar to hibernation, hibernation has some unique advantages: 1. Less storage usage. If we save a running Windows VM, we need more disk space out of the VM to storage the saved image file. Hibernation uses the Windows VM s system disk to storage the memory image within the existing Windows file system. For example, if we start a Windows VM with 6GB memory from NFS storage, we have to allocate another 6GB disk space in NFS storage system to store the saved image file. Hibernation can use the Windows 3
VM s system disk to store the memory image file. There is no need to reserve more storage space in NFS storage system for this feature. 2. More efficient. Windows has its own Memory Management and it knows better than any other tool about how to compress the memory of a running Windows system to an image file. Hibernation takes less time to save the same Windows VM. 3. More flexible. Windows has its own Power management policy and that is automatically managed by the operating system. If a Windows VM is idle for a long time, the system can hibernate to release resources to the Oracle VM Server. The Windows VM can boot up again quickly upon user request. How to Use Hibernation Hibernation works similarly in Oracle VM as a physical system. The following Windows Server 2008 provides an example. 1. To enable the hibernate feature in a Windows VM, open a Windows Command Prompt as Administrator. Run the command powercfg /h on as shown in Figure 2. Figure 2. Windows powercfg setup 2. In the power configuration window shown in Figure 3, change Power button action and Start menu power button to Hibernate. 4
Figure 3. Windows powercfg setup 3. Then you can use the power button in the Start menu to hibernate the Windows VM as shown in Figure 4. 5
Figure 4. Hibernate option in Windows Start menu 4. If you want to use the Windows VM again, start the VM from Oracle VM Manager as usual. The Windows VM will resume from hibernation faster than the time to boot up a new Windows VM. Note: It is not possible at this time to hibernate Windows XP or Windows 2003 running in PAE mode. Memory Balloon A Windows VM s memory can be changed dynamically to allow memory to be hot added or removed from a running Windows VM. The Windows PV Driver 2.0 memory balloon feature allows an administrator to shrink the memory of one or more Windows VMs to make room for additional VMs to be deployed. Memory ballooning works within the Windows operating system to force less used memory to be paged to disk. It does this by inflating the balloon to reclaim memory when requested. This process is shown in Figure 5. 6
Figure 5. Balloon impact on Windows memory Balloon Guest Memory Using Xend The command xm mem-set <domain ID> <New Memory Size> is the way to balloon guest memory. Oracle VM Server can only add memory up to the amount specified by the MaxMem configuration key directive in your guest configuration file. If there is no MaxMem configuration key is specified, Oracle VM Service considers Memory key in configuration file as the MaxMem. Following is an example: # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 542 2 r----- 19851.6 win2k3 157 400 1 -b---- 41.0 # xm mem-set 157 600 # xm lis Name ID Mem VCPUs State Time(s) Domain-0 0 542 2 r----- 19851.6 win2k3 157 600 1 -b---- 41.0 7
[root@dhcannie win2k3]# xm mem-set 157 200 [root@dhcannie win2k3]# xm lis Name ID Mem VCPUs State Time(s) Domain-0 0 542 2 r----- 19851.6 win2k3 157 200 1 -b---- 41.0 Note: After Windows guest VM memory is changed, Windows will still show the same memory as it was created with. This is because the balloon has reclaimed the memory. You can use the xm info command to confirm that memory was freed to the Oracle VM Server if you shrink memory from a Windows guest VM. Conclusion Oracle VM Server for x86 provides improved server utilization, higher availability and better performance while reducing costs. Oracle Windows Paravirtual (PV) Drivers 2.0 provides excellent performance with additional capabilities to the feature-rich platform: Support for the following Windows editions: o Microsoft Windows Server 2008 R2 o Microsoft Windows Server 2008 o Microsoft Windows Server 2003 o Microsoft Windows 7 o o Microsoft Windows Vista Microsoft Windows XP Live Migration, Hibernation and Memory Ballooning 8
Oracle VM Windows Paravirtual Drivers: New Features in 2.0 Release June 2010 Author: Annie Yansu Li, Wayne Wei Gong, Chris Barclay Contributing Authors: Susan Roberts Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Copyright 2010, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. UNIX is a registered trademark licensed through X/Open Company, Ltd. 0110