1.3 Virtual Machine Settings

You can change a virtual machine’s settings by modifying the settings stored in xend. This process requires you to export a virtual machine’s settings from the xend database to a text file, edit the settings in the file to meet your configuration requirements, import the file back into xend, and restart the virtual machine.

NOTE:It is no longer recommended that you edit the initial startup files stored in /etc/xen/vm, because they are used only during the creation of a new virtual machine.

To modify a virtual machine’s settings:

  1. At the host desktop, enter

    xm list -l vm_name > filename
    

    where vm_name is the name of the virtual machine you want to modify and filename is whatever you want to name the text file.

  2. Use a text editor to make and save any desired changes.

  3. Enter xm new -F filename to import the virtual machine’s new settings into xend.

  4. Enter xm start vm_name to start the virtual machine with its new settings.

    You should repeat the entire process of exporting the file each time you want to make changes to a virtual machine’s settings.

1.3.1 xend Virtual Machine Settings Example

Virtual machine settings are exported from the xend database in “S expressions” format.

Example: Exported Virtual Machine Settings (Paravirtual)

(domain
    (domid 1)
    (on_crash destroy)
    (memory 384)
    (uuid 4fbcb943-871c-9a51-3a48-3ad99d933841)
    (bootloader_args '--entry=xvda2:/boot/vmlinuz-xen,/boot/initrd-xen')
    (name SLES10SP1withOES2)    (maxmem 512)
    (on_reboot restart)
    (on_poweroff destroy)
    (vcpus 1)
    (bootloader /usr/lib/xen/boot/domUloader.py)
    (shadow_memory 0)
    (cpu_weight 256)
    (cpu_cap 0)
    (features )
    (on_xend_start ignore)
    (on_xend_stop ignore)
    (start_time 1178219902.47)
    (cpu_time 4574.26779201)
    (online_vcpus 1)
    (image
        (linux
            (kernel /var/lib/xen/tmp/kernel.Bg0o6h)
            (ramdisk /var/lib/xen/tmp/ramdisk.Bch8YM)
            (args 'TERM=xterm ')
        )
    )
    (status 2)
    (memory_dynamic_min 512)
    (memory_dynamic_max 512)
    (state -b----)
    (store_mfn 150467)
    (console_mfn 150608)
    (device
        (vif
            (mac 00:16:3e:16:4f:40)
            (script vif-bridge)
            (uuid 643c21aa-68b8-fb32-7a2d-b9e88884bdd8)
            (backend 0)
        )
    )
    (device
        (vbd
            (uuid c799784d-930b-7608-4480-10463b3a9433)
            (dev xvda:disk)
            (uname file:/var/lib/xen/images/oes2l/disk0)
            (mode w)
            (type disk)
            (backend 0)
        )
    )
    (device
        (vbd
            (uuid 27543b1c-638f-f3d4-45ba-a7cb9bbe5e59)
            (dev xvdb:disk)
            (uname phy:/dev/cdrom)
            (mode r)
            (type disk)
            (backend 0)
        )
    )
    (device (vkbd (backend 0)))
    (device
        (vfb
            (vncunused 1)
            (uuid 82da21c4-483f-4184-fa5e-55441e0fca11)
            (location localhost:5900)
            (type vnc)
            (display :0.0)
            (xauthority /root/.Xauthority)
        )
    )
    (device
        (console
            (protocol vt100)
            (location 2)
            (uuid 9c67c00b-8566-84c2-3353-d1809cf534ca)
        )
    )
)