Domain configuration-XML
Configure a virtual server with a domain configuration-XML file.
Root element
- domain
- Specify
kvmas the domain type.domain type attribute: kvm
Selected child elements
- name
- Assigns a unique name to the virtual server. You use this name to manage the virtual server.
- memory
- Specifies the amount of memory that is allocated for a virtual server at boot time.
- vcpu
- Specifies the maximum number of CPUs for a virtual server.
- cputune
- Groups the CPU tuning parameters:
- shares
- Optionally specifies the initial CPU weight. The default is 1024.
- os
- Groups the operating system parameters:
- type
- Specifies the machine type.
- kernel
- Optionally specifies the kernel image file on the host.
- initrd
- Optionally specifies the initial ramdisk on the host.
- cmdline
- Optionally specifies command-line arguments.
- iothreads
- Assigns threads that are dedicated to I/O operations on virtual block devices to the virtual server.
- on_poweroff
- Configures the behavior of the virtual server when it is shut down.
- on_reboot
- Configures the behavior of the virtual server when it is rebooted.
- on_crash
- Configures the behavior of the virtual server if it
crashes.
Theon_crash element: preserve | coredump-destroy | coredump-restart preservevalue prevents debug data from being discarded. Thecoredump-destroyandcoredump-restartvalues configure an automatic dump (see Configuring a virtual server for automated dumps on the host). - devices
- Configures the devices that are persistent across virtual server reboots.
- launchSecurity
- Prepares the virtual server for guests in IBM® Secure Execution mode.
Example
<domain type="kvm">
<name>vserv1</name>
<memory unit="GiB">4</memory>
<vcpu>2</vcpu>
<cputune>
<shares>2048</shares>
</cputune>
<os>
<type arch="s390x" machine="s390-ccw-virtio">hvm</type>
</os>
<iothreads>1</iothreads>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>preserve</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-s390x</emulator>
<disk type="block" device="disk">
<driver name="qemu" type="raw" cache="none" io="native" iothread="1"/>
<source dev="/dev/mapper/36005076305ffc1ae00000000000020d3"/>
<target dev="vda" bus="virtio"/>
<boot order="1"/>
</disk>
<interface type="direct">
<source dev="bond0" mode="bridge"/>
<model type="virtio"/>
</interface>
<console type="pty">
<target type="sclp"/>
</console>
<memballoon model="none"/>
</devices>
</domain>