Xen FAQ
Last Updated: August 2008
Maintained by Penny Cotten et al.
Dozens of contributors
This list of Frequently Asked Questions is intended for use by anyone interested in learning more about Xen.
If you would like to provide feedback on this FAQ, please send it to discuss xen.
Topics in this FAQ
Questions:
Section 1: Basics
- What's the relationship between Sun™ xVM hypervisor and Zones?
Some people think of hypervisor and Zones as competing alternatives, when inreality they are used in a complementary fashion. That's because the two technologies operate at different levels in the software stack. The hypervisor virtualizes the hardware, which allows multiple operating system kernels to run simultaneously on one piece of physical hardware. Solaris Zones virtualize the OS, allowing multiple operating system environments to coexist on a single Solaris kernel. Thus, the two technologies can be used either independently or in combination to provide the best set of attributes to fix the problem at hand.
The different approaches possess efficiency, observability, sharing, utilization, isolation, and manageability attributes which can be markedly different. The hypervisor approach is good for isolation, although it presents the need to manage several complete operating environments. The hypervisor approach can be a feature or a problem, depending on what you're trying to do. In contrast, because of the high degree of resource sharing that is possible, Zones are good for utilization, observability, and manageability. - What about the hypervisor for SPARC and other architectures?
The focus of the OpenSolaris on Xen project is for x86 and x64 processors at this time; that mirrors the focus of the Xen project itself.
While we believe SPARC ports of both Xen and OpenSolaris on that version of Xen are indeed possible, this would be a substantial amount of work. In case you're interested, the specification of the OpenSPARC T1 privileged and hyperprivileged architectures can be found here.
Xen is already being ported to a couple of non-x86 architectures, and we are trying to make any of our xVM-related code that could be shared be as portable as possible, to make future ports be simpler. We also hope to make it easier for OpenSolaris on PPC to run on the Xen port to PPC. - Can I install a 64-bit windows guest on an opensolaris host?
Yes, because the recent builds support 32-bit as well as 64-bit guests on 64-bit hosts. - Has xVM 3.3 integrated into OpenSolaris/SXCE
Yes, It integrated in build snv_121. - Are there any special considerations when using ZFS with Sun xVM?
You should limit the ZFS ARC cache when using ZFS and xVM. Also, if you are using disk images on a ZFS filesystem, the record size for that file system should be 8k.
These are the same optimizations that are required for running a large database on ZFS. It's nothing specific to xVM; it's applicable to any functionality that uses a lot of memory and reads/writes to large files.
Section 2: dom0 and domU
- How can I add a second network to domU?
To add a second network interface to domU, you will need to perform the following steps:
1) Extract the XML definition of your domain.
virsh dumpxml domain
2) Modify the XML definition appropriately by adding another interface section.
3) Reload the XML definition.
virsh create xmlfile
- If domU has "xnf0 and xnf1" and dom0 has "nge0 and bge0", how can I connect the domU interfaces to the physical dom0 devices?
Set the bridge parameter of the interface to the name of the NIC that you wish to use. - Can I modify the number of CPUs assigned to a running domU?
When a domain is running, you can only modify the number of CPUs to be equal to or less than the amount given when it was booted (so if the domain boots with 4 VCPUs, you can balloon down to 2, then back up to 4 as needed). This only works with PV domains; HVM domains will ignore the request.
If the domain is shutdown, setvcpus will set the number of CPUs to be used on next boot.
To view allocation changes on Solaris guests, use psrinfo from inside the guest domain.
Section 3: Troubleshooting
- Can a PV Linux guest be installed from a CD?
Because of a standard Linux restriction that PV guests cannot be installed from a CD, the CD must be mounted in a location (usually dom0) exported over NFS, then an NFS Linux install done.
Often it is much easier to do an HTTP Linux install.