Xen Gpl Pv Driver Developers Driver



  1. Xen Gpl Pv Driver Developers Driver License
  2. Xen Gpl Pv Driver Developers Driver Download
  3. Xen Windows Pv

In the last chapter we described Xen’shardware virtualization support and how touse it. Now that we have Xen operating withhardware virtualization, we can run unmodifiedoperating systems, including Windows, that 800-poundgorilla of the computing world.

  • 3Windows on Xen: Installation
  • 5Et Voilà!
    • 5.2Graphics Cards
  • 6Paravirtualized Drivers for Windows

Why Run Windows Under Xen?

Part of this effort made the XenServer Windows Paravirtual (PV) drivers available in source form under a BSD 2 clause license on GitHub. Building these drivers outside of the internal Citrix XenServer build environment was quite hard and the resulting binaries would only run correctly in a XenServer host environment. Install Xen GPL PV Driver Developers Xen PVUSB Device Driver driver for Windows 10 x86, or download DriverPack Solution software for automatic driver installation and update. Re: Xen-users New version of GPL PV drivers for Windows 0.10.0.47, Fajar A. Nugraha Previous by Date: RE: Xen-users Creating DomU by copying the files from another DomU, Ryan Perc.

  1. Xen GPL PV Driver Developers other devices Xen GPL PV Driver Developers Xen Block Device Driver Operating System Versions: Windows XP, 7, 8, 8.1, 10 (x64, x86).
  2. About The Xen Project. Governance; Trademark Policy; Export Control; Logos & Mascots; Website.

Now, why exactly would you want to do this terrible thing? We could say,“because you can,” and that’s reason enough to do many things. But it mightnot be entirely satisfying—it sounds like a lot of work, after all.

Fortunately, reasons abound. Probably the best of these is the software—especially the server software, considering that Xen’s strengths are in theserver field.1 Much of the Windows server software, like Exchange Server, hasa giant installed base and would be difficult to replace. The same holds forthe client software. Take, for example, Office, Outlook, Visual Studio—Microsoft continues to be a fact of life. Xen with VNC, SDL, or rdesktopallows you to run productivity software at acceptable speeds, with full, albeitunaccelerated, graphics support, all while retaining your comfortable Linuxcomputing environment.

Xen also gives you a way out from the old worry that the next security fixor driver update will leave the machine completely unbootable—it providesan equivalent to Microsoft’s “system restore points” but under your owncontrol, rather than the OS’s. By running Windows in a virtual machine withan effective storage backend, you can snapshot it, roll back updates, andprotect yourself from malware—all without involving the domU.

Security furnishes another reason to run Windows under Xen. Althoughit’s cliche to say that Windows is insecure, the fact remains that virtualization,when properly used, can be an effective layer of isolation for any server,Windows, *nix, or otherwise. The fact that Windows is a popular targetmakes this reasoning even more compelling.

It’s also worth noting that Xen’s design, which partitions drivers in isolateddomains, at least contributes to security. An intrusion in the Windows domain,even if it manages to exploit driver code to interact with physical hardware, isunlikely to compromise other domains on the same hardware. This doesn’tmean that Xen is inherently secure, but it does suggest that it might bepossible to secure it. Work remains to be done, of course—indeed, a lot ofthe present work in QEMU is in precisely the area of validating emulateddevice access to improve security. But even as things are, Xen can help toreduce the exposure of Windows machines.

Besides, it’s easier to run Windows in a domU than you might suppose.

Windows on Xen: Prerequisites

Before stepping into the brave new world of virtualized Windows, make surethat you’ve got a few things.

First, you’re going to need a box that does HVM. (See Chapter 12 fordetails on what that is, how it works, and how to tell if you have it.) The boxwill also need enough free memory and storage for a Windows install—Xencan help to use resources more efficiently, but it’s not magic. For example,we suggest that a Xen box running Windows Server 2003 domUs have 512MBof memory and about 10GB of hard drive space for each domU, plus 512MBand another 10GB for dom0. You might want to consult Microsoft’s websitefor more specific system requirements or requirements for other Windowsversions.

It might sound obvious, but you’re also going to need a copy of Windows,with a license that allows virtualization. This copy of Windows should bereasonably new. We’re going to focus on Windows XP Service Pack 2 andWindows Server 2003 in this chapter—Vista’s just too much hassle at thispoint. Windows NT and 9x, while they should in theory work, seem to crashduring the install step. No one (us included) seems too interested in figuringout why this happens. Life is full of mysteries.

Windows on Xen: Installation

Windows is actually quite easy to get installed and running. The basic stepsare exactly like any other Xen install, with some extra configuration:

  1. Get Windows install media and put it somewhere that Xen can find it.
  2. Make a config file.
  3. Boot from the install media.
  4. Install using the Windows installer.
  5. Reboot from the emulated hard drive.
  6. Install paravirtualized drivers.
  7. Use Windows.

Easy, right? Let’s get started.

Installing Windows Manually

The first thing to do is get a copy of Windows. In our case, we used a physicalCD-ROM, which we put in the Xen server’s CD-ROM drive. For convenience,you can of course create an image from the CD and use it just like the physicaldisc:

(If you go that route, specify file:/var/tmp/windows2k3.iso instead ofphy:/dev/cdrom in the following steps.)

While you’re at it, create the backing store in the usual way. Here we’lluse a file-backed device, but you can use any storage backend that Xen knowsabout.

Next, create a config file. Here’s a sample (pulled from Chapter 12 withminor changes). We’ll save this as /etc/xen/falstaff:

This should be pretty familiar by now. Note that we’re leaving ACPI andAPIC at their default “off” values to avoid confusing the Windows installer.You’ll want to point the entries in the disk= lines to the appropriate locationsfor your install, of course. You might also want to diverge from our configurationby setting sdl=1 rather than vnc—SDL works only on the local X displaybut has the virtue of popping up automatically.

Then create the machine as usual:

Start a VNC session so that you can talk to it, assuming you decidedagainst SDL. Insert the correct host and display number—in this case we’reon the local machine, and this is the first VNC session running:

Now Windows Setup will start in its accustomed fashion. Install Windowsas usual.

A Discussion of HALs

One problem that occasionally pops up at this stage involves the WindowsHAL (hardware abstraction layer). Windows ships with a selection of possibleDLLs to implement the abstraction layer, picking one of six choices duringthe install process. The correct HAL to use with the system is affected by theacpi, apic, and vcpus configuration directives, as indicated in Table 13-1.

Table13-1: HALs Available with Windows

The lucky winner becomes $SYSTEMROOTsystem32HAL.DLL.

The easy answer, therefore, is to use HAL.DLL, regardless of the values ofACPI and APIC. This should always work, but it might reduce performance.Microsoft also warns that such a configuration is unsupported.2 We generallyturn ACPI and APIC on so that Windows will install the ACPI APIC HAL, andit hasn’t caused the machine to burst into flames yet.

With Windows XP, however, this sometimes doesn’t work. Setting ACPIcan cause the install process to fail, usually by hanging at Setup is StartingWindows. The easiest way to install Windows XP is to leave ACPI and APICoff during the initial boot from the CD-ROM and then turn them on beforethe first boot into graphical mode.

Then go through the initial format, copy, and so on. When the first phaseof Windows Setup completes and the VM turns off, change the config fileto read:

This will cause Windows to install the correct HAL during its secondphaseinstallation.

If you need to change the HAL later on—for example, if you decide tomove from a uniprocessor to a multiprocessor configuration—we recommendreinstalling Windows. It’s possible to change the HAL manually by overwritingthe various driver files, but it’s probably not a great idea.

Installing Windows the Red Hat Way

Red Hat’s virt-manager app can handle most of the trouble of setting upWindows for you. Just create a machine from the virt-manager GUI, selectFully Virtualized rather than Paravirtualized in the appropriate dialog, andindicate the location of Windows install media (either an ISO file or physical

CD-ROM). Indicate whether you’d like to connect to the network using avirtual network or shared physical device (corresponding to networking viavirbr and xenbr, respectively). Install Windows as normal, using Microsoft’sinstall program.

The configuration generated by virt-manager will look something like this:

Unfortunately, this doesn’t get you quite to the end of the Windows install.For whatever reason, the emulated CD-ROM isn’t presented to Windows afterthe first reboot in the install process, so Windows will complain that it can’tfind its files.

Red Hat’s documentation will tell you that Windows needs to format itsvirtual disk as a FAT or FAT32 partition so that you can copy the install filesto it. While this approach will work, we prefer to avoid FAT32 in favor of NTFS.To get around this problem, we use the I/O emulator. Modify the disk= lineto use QEMU’s I/O emulation as follows:

(Put your definition for the first hard drive in the appropriate place,of course.) The second stanza specifies an ISO to use as a virtual CD-ROMdrive, with hardware emulation provided by Xen’s hardware emulationlayer (inherited from QEMU). When you’ve made this change, the CD willappear to the domU as a QEMU emulated device, and you can proceed withthe installation.

Windows with the Virtual Framebuffer

“What’s the best remote administration tool for Windows NT?”
“A car.”
—Anonymous, Usenet

However you’ve gone about installing Windows, you’ll almost certainly wantto log in and use the system when it’s running. That’s where the virtualframebuffer comes in.

Xen’s virtual framebuffer allows you to interact with the domU at allstages—from BIOS load, through the bootloader, to postsystem boot. It canbe accessed through SDL on the local console or via VNC over the network.It’s one of the neater features of HVM domUs, and it really helps to cementthe illusion of a real machine.

Wonderful though the virtual framebuffer is, however, it’s got someannoyances. Mouse tracking, for example, can be kind of iffy out of the box.Here are some ways to fix the most common problems that we’ve had withthe VNC framebuffer.

First, by default Xen’s built-in VNC server won’t listen on interfacesother than the loopback. To change this behavior, set vnc-listen in /etc/xen/xend-config.sxp to listen on all interfaces:

You can also specify the IP address of the interface that you want theVNC server to listen on. Note that this will expose the machine’s consoleover the network and should probably only be done on trusted networks.

One useful trick when working with the VNC framebuffer under Windowsis to specify a tablet as the pointing device, rather than a mouse. This improvesthe mouse tracking by using absolute positioning.

(The usb=1 line isn’t strictly necessary—it’s turned on implicitly byusbdevice=. However, it’s a useful reminder that Xen’s USB emulation hasbeen turned on.)

One last minor annoyance: Sometimes the VNC mouse and keyboardinterface just stops working (or else the display stops updating). Nine timesout of ten, if you close and reopen the VNC session, it’ll come back.

In addition to Xen’s virtual framebuffer, you can handle access atthe OS level—for example, by installing the VNC server under Windows orusing Microsoft’s built-in RDP (Remote Desktop Protocol). These have theadvantage of allowing the virtual machine to handle its own graphics tasksrather than involving an emulator in dom0. RDP is also a higher-level, moreefficient protocol than VNC, analogous to X in its handling of widgets andgraphics primitives. We recommend using it if possible. As Figure 13-1 shows,VNC, RDP, and SDL can coexist, with multiple independent sessions on thesame VM.

To enable RDP in administration mode, access System Properties, clickthe Remote tab, and check the box marked Enable Remote Desktop.

Figure13-1: Here we see two domains: one running Windows XP and being accessed through VNC; and one Windows Server 2003 domU being accessed through VNC, RDP from the Windows XP domain, and rdesktop from a Linux machine.

Windows XP and Windows Server 2003 include RDP clients. On otherplatforms, the open source rdesktop client allows you to access Windowsmachines from Unix-like operating systems (including Mac OS X). Simplyrun the following:

Et Voilà!

Now you have Windows running. This would be a good time to make a backupof your clean Windows install so that you can conveniently reimage it whensomething goes wrong. Just create an LVM snapshot or file-based CoW device,as we outline in the Chapter 4. It’ll be good for your peace of mind.

When you’ve got a backup, you can do whatever it is you are accustomedto do with Windows. We would not presume to instruct you in this regard.

There are, however, some things to keep in mind about this new Windowsinstall.

Windows Activation

Windows licenses and activations are tied to hardware unless you’ve got avolume license. Thus, it would be a good idea to decide on a hardwareconfiguration ahead of time and keep it constant to avoid the computerdemanding reactivation.

In particular, specify a MAC address so that Xen doesn’t randomlygenerate a new one on every reboot—this is the single most important valuein Windows XP’s hardware hash calculation. Other things to keep in mindare the memory amount and virtual CD-ROM.

Graphics Cards

Another of the big caveats about Windows under Xen is that it still won’tallow you to use 3D hardware—so the scenario of a desktop Linux box thatruns games in a Windows domU is still purely in the realm of fantasy for now.As our discussion above has shown, the virtual Windows machine uses anemulated framebuffer via SDL or VNC. Neither of these modes supports anysort of acceleration.

The problem with hardware access in HVM mode (this applies to anyPCI device, not just graphics cards) is that there’s no way to map the hardware’smemory space into the memory of the guest—the guest has anadditional layer of abstraction, translating a discontiguous block of physicalmemory into something that the unmodified domU operating system can use.Recently, chipsets have been incorporating an IOMMU, which is hardwarethat can do this translation job in a manner analogous to the processor’smemory management unit (hence the name). Xen’s support for Intel’sIOMMU implementation, under the name of VT-d, is progressing, but ithasn’t gotten to the point where it can make a graphics card usable by aWindows domU.

VT-D SUPPORT

If you’re curious about whether your machine supports VT-d, you can run xm dmesg |grep -i vt-d in the dom0 to find out. A machine with VT-d will say something likeIntel VT-d has been enabled. If you see this, congratulations! The next Xen versionwill likely include facilities to enable you to use this advanced feature.

Another approach to graphics—one that wouldn’t require replacementof all existing hardware—would be for the the graphics driver authors toimplement the translation from domU addresses to machine addresses indriver software. Rumor has it that NVIDIA has a Xen-aware driver that couldbe assigned to an HVM domU and used for 3D acceleration; however, it hasn’tyet been released, so there’s a good chance it doesn’t actually exist.

One other promising direction uses a virtual 3D graphics driver to forwardOpenGL calls to the actual graphics hardware. There are a couple of Xenbasedprojects that use this principle, but they are Linux only at the moment.

VMware has also done some work on a driver architecture that allows for 3D,which appears to take the same tack.

No finished products exist, that we know of, to allow hardware 3D supportunder Windows. Nonetheless, it’s a much-requested feature, and it is beingworked on. We wouldn’t make it an essential part of any Xen deploymentjust yet, however.

Paravirtualized Drivers for Windows

As we’ve already mentioned (several times), HVM is somewhat slower thanparavirtualization. Partially this is because of the need to virtualize memoryaccess; however, this overhead is minimal compared with emulated I/O andits attendant context switches. (See Chapter 12 for mind-numbing detail.)

You can address many of the speed issues related to HVM by swappingthe emulated devices for paravirtualized devices after the install processcompletes. These devices will improve I/O speeds dramatically; however,Windows driver support is lacking. There are two options: proprietary andexpensive drivers, or free and unfinished ones.

Xen gpl pv driver developers driver windows 7

Proprietary Windows PVM Drivers

Three companies have so far provided Windows drivers that take advantageof paravirtualization: XenSource, Virtual Iron, and Novell. All of these driversare signed by Microsoft for trouble-free installation on Windows.

Citrix, wearing its XenSource hat, produces paravirtualized drivers forWindows as part of its Xen-based virtualization suite. These drivers work well,and you can test them for yourself by downloading the free version of theXenSource product. Unfortunately, these drivers don’t work with the opensource version of Xen.

Virtual Iron (http://virtualiron.com/) also provides paravirtualized driversfor Windows as part of its product. These drivers work with open source Xen,and Virtual Iron has been working on contributing changes to the Xencommunity. However, the drivers themselves are still closed source.

Finally, Novell offers Windows PV drivers that work with open sourceXen as an independent product. These drivers are quite expensive (to saythe least)—they are so expensive that we haven’t actually tried them. Moreinformation is at http://www.novell.com/products/vmdriverpack/ if you’re curious.

At this point, while all of these drivers (in our experience) function asadvertised, none of them seem especially compelling to us. We’re content touse Windows, with the HVM drivers, solely in light productivity tasks.

Xen Gpl Pv Driver Developers Driver License

GPL Windows Paravirtualized Drivers

Driver

There is one thing that you can try if you’re sufficiently adventurous. GPLWindows PV drivers do exist. They are under active development, which isdeveloper-speak for “don’t use these for anything important.” They workpretty well for us, but occasionally they do something surprising (usuallyunpleasant). These drivers try to improve performance by avoiding some ofthe inefficient device emulation and by using advanced techniques such asTCP Segmentation Offload, or TSO.

The GPL PV drivers are easy to install. First, we recommend checkingthe xen-devel archives to figure out which version is the latest. As of this writing,0.8.8 is the most current version, and it’s available at http://www.meadowcourt.org/WindowsXenPV-0.8.8.zip. Unfortunately, there’s no web page that listsreleases, so you’ll want to search the archives of the xen-devel mailing list tofind out the most recent version. (Alternatively, you can check the currentversion using Mercurial—check the repository at http://xenbits.xensource.com/ext/win-pvdrivers.hg.)

We opted to download the binary driver package directly within anHVM Windows XP Professional instance. It includes a fairly comprehensiveset of installation instructions, but we’ll go over what we did anyway, just forconvenience.

First, unpack the drivers. We just dragged the appropriate folder to thedesktop.

Next, run install.bat. Windows will complain several times about thedrivers not being signed. Just click OK.

When the install finishes, reboot to make sure that everything still works.

Assuming you rebooted successfully, you should now be able to accessPV devices from Windows. Try creating a scratch device in the dom0, thenrunning an xm block-attach command like the following (with appropriatenames, as always):

This should cause Windows to notice a new device, use the correct driver,and present a blank disk, which we can then format, as shown in Figure 13-2.Similarly, you can attach a network device with the xm network-attach command.

Finally, you’ll need to edit the boot.ini file to tell the GPL PV drivers toactivate. (You might need to turn on Show Hidden Files and Folders anduncheck Hide Protected Operating System Files in Tools􀀀Folder Options tomake boot.ini accessible.)

Here we’ve modified the boot entry by putting /gplpv on the end to tellthe GPL PV drivers to activate.

Figure 13-2: Adding a paravirtualized disk with the GPL PV drivers

Now shut down the Windows install.

Gpl

Reboot, select the Windows XP Professional (PV Drivers) entry from theboot menu, and you should have a full set of PV devices.

Ongoing Development

Windows under Xen is still immature, but it’s already developed far enoughto be useful. Using Xen, you can consolidate Windows servers in a robust,manageable platform and run client software in a native environment on thedesktop. You have a reasonable way of accessing the machine via the framebufferor rdesktop, and finally you have PV drivers for reasonable speed.

All in all, Xen is quite a good platform for Windows. Not perfect, butcertainly usable.

Developers

Footnotes

1At least in light of the ongoing commodification of the operating system, which really is at least part of what Xen is all about, isn’t it?
2So is everything else about running Windows under Xen, as far as we can tell.


Navigation

Xen Gpl Pv Driver Developers Driver Download

Previous Chapter | Next Chapter

Xen Windows Pv

Retrieved from 'https://wiki.prgmr.com/mediawiki/index.php?title=Chapter_13:_Xen_and_Windows&oldid=2930'