ENTERPRISE

Managing Xen : Xen Domain Configuration Files

6/11/2012 11:29:26 AM
The domain configuration file for a Xen domain specifies the various parameters that govern the behavior of the domain. The various files related to configuring Xen are located in the /etc/xen directory. The configuration file, which contains various options in the key=value format is an executable file written in Python. The options must therefore be in valid Python code. The /etc/xen/xend-config.sxp

The configuration files for the domUs that you are creating can be placed anywhere as long as you provide the full path to the file when creating the domain. The /etc/xen/auto is a special directory and any domain configuration files that are placed in this directory will automatically be started when the xend

Here are some of the common options specified in a Xen domain configuration file:

  • kernel: The kernel image that is used for the domain is provided as the complete path to the kernel image file.

  • ramdisk: Specifies the initial ramdisk for the domain. If your kernel has built-in drivers for your root file system and hard disk, you may not need to create and specify a ramdisk. This is provided as a complete path to the location of the initrd file.

  • memory: Specifies the amount of RAM, in megabytes, that is allocated for the domain. Insufficient memory allocation will prevent the domain from starting up. You must also ensure that the total memory taken by Xen—both dom0 and all the domUs—must be less than or equal to the amount of physical RAM present in your machine.

  • name: Provides a unique name to identify the domain. This name will be be displayed when you list the domains running on the system.

  • root: Specifies the root device for the domain.

  • disk: Specifies a list of block devices that is exported to the domain. This is provided in the following the format:

    disk = [ "backend device", "frontend device", "mode" ]

    The "backend device" specifies the format and name of the device that will be exported to the guest domain. The format can be a simple file image or an actual physical disk. A file image is exported to the guest domain as a file-based VBD by Xen.

    • file://path_to_the_file_image: The file image is exported as a loopback device. The setup of the loopback device is taken care of by Xen.

    • tap:aio:/path_to_the_file_image: The file image is exported as a tap device that can be accessed by the Xen blktap driver. This is specified as the suggested way in the Xen documentation for exporting file images to the guest domain.

    • phy:device:/name_of_the_device: The specified physical device is exported to the guest domain. The device can be specified in the usual /dev/sda1 form or using the hex major/minor number for the device—0x301.

      The "frontend device" specifies how the exported backend device should appear to the guest domain. This can be specified in the usual /dev/sda1 form or using the hex major/minor number for the device—0x301.

      The "mode" specifies whether the device is to be exported as read-only or read‑write. The two valid options are:

    • r—read-only

    • rw—read and write.

  • vif: Specifies the virtual network interface configuration for the domain. This is provided in the following format:

    vif = [ "key1 = value1", "key2 = value2" ]

    The common options used for this configuration directive are:

    • bridge: Specifies the network bridge that will be used for this interface.

    • mac: Specifies the MAC address for this virtual interface. If you do not provide a MAC address, it is set to a random MAC address by Xen on boot. The random address is selected from the range of addresses assigned to Xensource by IEEE in the XenSource Organizationally Unique Identifier (OUI) range 00-16-3E. You can also use this directive for defining a static MAC address that will receive a static IP assignment from your DHCP server.

  • on_reboot: Specifies the action taken by the domain during a reboot. The valid states on a reboot are:

    • destroy: Completely shuts down the domain.

    • preserve: The domain is not cleaned up. The debugging information from the domain is available to help debug crashes.

    • rename-restart: The old domain is not cleaned up. Instead it is renamed and a new domain is started in place of the old domain.

  • on_crash: Specifies the action taken by the domU if it crashes. The valid states for this directive are the same as that for on_reboot option.

  • vcpus: The number of virtual CPUs.

The following figure shows the domain configuration file for creating and running the Ubuntu Feisty guest domain:

Other  
  •  Visual Studio 2010 : Introducing the Visual Studio Extensibility - Deploying Visual Studio Extensions
  •  Visual Studio 2010 : Introducing the Visual Studio Extensibility - Building a Visual Studio Package
  •  Advanced FAQ Corner, May 2012
  •  The drive toward DSLs : Taking a DSL apart—what makes it tick?
  •  The drive toward DSLs : Choosing between imperative and declarative DSLs
  •  Visual Studio Team System 2008 : Creating new report (part 2)
  •  Visual Studio Team System 2008 : Creating new report (part 1) - Report server project
  •  Visual Studio Team System 2008 : TFS reports for testing - Bugs
  •  Extra Network Hardware Round-Up (Part 3)
  •  Extra Network Hardware Round-Up (Part 2) - NAS Drives, Media Center Extenders & Games Consoles
  •  Extra Network Hardware Round-Up (Part 1)
  •  Networking Jargon Explained (Part 2)
  •  Networking Jargon Explained (Part 1)
  •  The Micro Revolution
  •  Computing Yourself Fit (Part 4)
  •  Computing Yourself Fit (Part 3)
  •  Computing Yourself Fit (Part 2)
  •  Computing Yourself Fit (Part 1)
  •  Touch Interaction - Multi-Touch: An Evolution
  •  Think the Brighter Side to Piracy
  •  
    Video
    Top 10
    Windows Server 2003 : Managing and Implementing Disaster Recovery - Fundamentals of Backup
    Microsoft .NET : Design Principles and Patterns - From Principles to Patterns (part 2)
    Microsoft .NET : Design Principles and Patterns - From Principles to Patterns (part 1)
    Brother MFC-J4510DW - An Innovative All-In-One A3 Printer
    Computer Planet I7 Extreme Gaming PC
    All We Need To Know About Green Computing (Part 4)
    All We Need To Know About Green Computing (Part 3)
    All We Need To Know About Green Computing (Part 2)
    All We Need To Know About Green Computing (Part 1)
    Master Black-White Copying
    Most View
    Programming WCF Services : Queued Services - Transactions
    Managing Exchange Server 2010 : The Exchange Management Console
    The 50 Best Headphones You Can Buy (Part 4)
    Play It Smart (Part 2) - Western Digital WD TV Live, Apple TV, D-Link Boxee Box
    All in One - The iDevice To Rule Them All
    Understanding Network Access Protection (NAP) in Windows Server 2008 R2
    WCF Services : Data Contract - Hierarchy
    Building LOB Applications : Databinding in XAML
    Windows System Programming : File Pointers & Getting the File Size
    OS X Mountain Lion: What’s New - The System (Part 4)
    Exploring the T-SQL Enhancements in SQL Server 2005 : Exception Handling in Transactions
    Amiga – Amiga on the web
    Personalizing Windows 8 : Tweaking Your Touch Experience
    Samsung LED Monitor With 170 Degree Viewing Angle
    System Center Configuration Manager 2007 : Developing the Solution Architecture (part 4) - Capacity Planning,Site Boundaries,Roaming
    The ASP.NET AJAX Control Toolkit (part 2) - The Accordion
    Writing 64-Bit Applications for Windows 7 (part 2)
    Create, Read, and Write a Binary File
    Windows Server 2003 : Building a Nameserver (part 1) - Enabling Incremental Transfers, Entering A Records into a Zone, Entering and Editing SOA Records
    BenQ Joybee GP2 Mini Projector - Compact HD-ready projection