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
  •  
    Top 10
    A Look At Truecrypt The Open Source Security Tool
    Price Of Piracy
    Acer Aspire 5600U 23" Touchscreen All-in-One PC
    Zalman FX100-Cube Fanless Cooler
    Devolo dLAN LiveCam Starter Kit
    Has Apple Lost It? (Part 2)
    Has Apple Lost It? (Part 1)
    Sony Computer Entertainment (Part 3)
    Sony Computer Entertainment (Part 2)
    Sony Computer Entertainment (Part 1)
    Most View
    Without A Wire
    Windows System Programming : Registry Management
    Windows 7 : Zero Touch Installations - Monitoring Deployment Progress
    Nikon D600 - A Full-Frame Nikon For Your Full-Time Passion (Part 2)
    Windows 8 : Advanced Features (Part 2)
    Microsoft Dynamics AX 2009 : Building Lookups - Creating a lookup dynamically
    Table Dressing With iWork
    MySQL Server Monitoring (part 1) - SQL Commands
    Windows 8's Unexpected Features (Part 2)
    Nanoxia Deep Silence 1 - Low Noise Chassis
    Using Textures
    Managing System Properties
    Manage iOS with iCloud (Part 1)
    iPhone 3D Programming : Adding Depth and Realism - Filling the Wireframe with Triangles
    WCF Services : Data Contract - Equivalence
    Headset & Speaker Buyer’s Guide (Part 3)
    HTC One X - This Is The One
    Implementing Security in Windows 7 : Protect an Account with a Password
    Programming the iPhone : Scrolling Controls
    Sign Language Technology (Part 3) - Seimens Hearing Aids