diff options
author | Yao Lu <lu.yao135@zte.com.cn> | 2016-11-30 19:06:14 +0800 |
---|---|---|
committer | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2016-12-08 08:22:30 +0000 |
commit | 54cb41be218f387cc3641fcde4e9eac3a19f8155 (patch) | |
tree | 6aad4bfb75731042b47424b5ab8350b8dbc20713 /templates/virtual_environment | |
parent | 53917cb499147b494fb488e945662535e01013a2 (diff) |
add xml for virtual machine
Change-Id: Ib8e0626519d25faff8bffd8f37ba37d5c4eb5015
Signed-off-by: Yao Lu <lu.yao135@zte.com.cn>
Diffstat (limited to 'templates/virtual_environment')
-rw-r--r-- | templates/virtual_environment/networks/daisy1.xml | 12 | ||||
-rw-r--r-- | templates/virtual_environment/networks/daisy2.xml | 12 | ||||
-rw-r--r-- | templates/virtual_environment/vms/all_in_one.xml | 126 | ||||
-rw-r--r-- | templates/virtual_environment/vms/daisy.xml | 121 |
4 files changed, 271 insertions, 0 deletions
diff --git a/templates/virtual_environment/networks/daisy1.xml b/templates/virtual_environment/networks/daisy1.xml new file mode 100644 index 00000000..91b2dff4 --- /dev/null +++ b/templates/virtual_environment/networks/daisy1.xml @@ -0,0 +1,12 @@ +<network connections='1'> + <name>daisy1</name> + <forward mode='nat'> + <nat> + <port start='1024' end='65535'/> + </nat> + </forward> + <bridge name='daisy1' stp='on' delay='0'/> + <domain name='daisy1'/> + <ip address='10.20.11.1' netmask='255.255.255.0'> + </ip> +</network> diff --git a/templates/virtual_environment/networks/daisy2.xml b/templates/virtual_environment/networks/daisy2.xml new file mode 100644 index 00000000..f8e86830 --- /dev/null +++ b/templates/virtual_environment/networks/daisy2.xml @@ -0,0 +1,12 @@ +<network connections='1'> + <name>daisy2</name> + <forward mode='nat'> + <nat> + <port start='1024' end='65535'/> + </nat> + </forward> + <bridge name='daisy2' stp='on' delay='0'/> + <domain name='daisy2'/> + <ip address='172.10.101.1' netmask='255.255.255.0'> + </ip> +</network> diff --git a/templates/virtual_environment/vms/all_in_one.xml b/templates/virtual_environment/vms/all_in_one.xml new file mode 100644 index 00000000..75caed25 --- /dev/null +++ b/templates/virtual_environment/vms/all_in_one.xml @@ -0,0 +1,126 @@ +<domain type='kvm' id='4'> + <name>all_in_one</name> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <resource> + <partition>/machine</partition> + </resource> + <os> + <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type> + <boot dev='network'/> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + </features> + <cpu mode='custom' match='exact'> + <model fallback='allow'>IvyBridge</model> + </cpu> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> + <devices> + <emulator>/usr/libexec/qemu-kvm</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/home/qemu/vms/all_in_one.qcow2'/> + <backingStore/> + <target dev='hda' bus='ide'/> + <alias name='ide0-0-0'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <controller type='usb' index='0' model='ich9-ehci1'> + <alias name='usb'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci1'> + <alias name='usb'/> + <master startport='0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci2'> + <alias name='usb'/> + <master startport='2'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci3'> + <alias name='usb'/> + <master startport='4'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pci-root'> + <alias name='pci.0'/> + </controller> + <controller type='ide' index='0'> + <alias name='ide'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='virtio-serial' index='0'> + <alias name='virtio-serial0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </controller> + <interface type='network'> + <source network='daisy1' bridge='daisy1'/> + <model type='rtl8139'/> + </interface> + <interface type='network'> + <source network='daisy2' bridge='daisy2'/> + <model type='rtl8139'/> + </interface> + <serial type='pty'> + <source path='/dev/pts/4'/> + <target port='0'/> + <alias name='serial0'/> + </serial> + <console type='pty' tty='/dev/pts/4'> + <source path='/dev/pts/4'/> + <target type='serial' port='0'/> + <alias name='serial0'/> + </console> + <channel type='spicevmc'> + <target type='virtio' name='com.redhat.spice.0' state='connected'/> + <alias name='channel0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='spice' port='5903' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> + <image compression='off'/> + </graphics> + <sound model='ich6'> + <alias name='sound0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </sound> + <video> + <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/> + <alias name='video0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <redirdev bus='usb' type='spicevmc'> + <alias name='redir0'/> + </redirdev> + <redirdev bus='usb' type='spicevmc'> + <alias name='redir1'/> + </redirdev> + <memballoon model='virtio'> + <alias name='balloon0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> + </memballoon> + </devices> + <seclabel type='dynamic' model='selinux' relabel='yes'> + <label>system_u:system_r:svirt_t:s0:c182,c195</label> + <imagelabel>system_u:object_r:svirt_image_t:s0:c182,c195</imagelabel> + </seclabel> +</domain> diff --git a/templates/virtual_environment/vms/daisy.xml b/templates/virtual_environment/vms/daisy.xml new file mode 100644 index 00000000..c95219b8 --- /dev/null +++ b/templates/virtual_environment/vms/daisy.xml @@ -0,0 +1,121 @@ +<domain type='kvm' id='4'> + <name>daisy</name> + <memory unit='KiB'>4194304</memory> + <currentMemory unit='KiB'>4194304</currentMemory> + <vcpu placement='static'>4</vcpu> + <resource> + <partition>/machine</partition> + </resource> + <os> + <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + </features> + <cpu mode='custom' match='exact'> + <model fallback='allow'>IvyBridge</model> + </cpu> + <clock offset='utc'> + <timer name='rtc' tickpolicy='catchup'/> + <timer name='pit' tickpolicy='delay'/> + <timer name='hpet' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <pm> + <suspend-to-mem enabled='no'/> + <suspend-to-disk enabled='no'/> + </pm> + <devices> + <emulator>/usr/libexec/qemu-kvm</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/tmp/workdir/daisy/centos7.qcow2'/> + <backingStore/> + <target dev='hda' bus='ide'/> + <alias name='ide0-0-0'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <controller type='usb' index='0' model='ich9-ehci1'> + <alias name='usb'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci1'> + <alias name='usb'/> + <master startport='0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci2'> + <alias name='usb'/> + <master startport='2'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/> + </controller> + <controller type='usb' index='0' model='ich9-uhci3'> + <alias name='usb'/> + <master startport='4'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pci-root'> + <alias name='pci.0'/> + </controller> + <controller type='ide' index='0'> + <alias name='ide'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='virtio-serial' index='0'> + <alias name='virtio-serial0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </controller> + <interface type='network'> + <source network='daisy1' bridge='daisy1'/> + <model type='rtl8139'/> + </interface> + <serial type='pty'> + <source path='/dev/pts/4'/> + <target port='0'/> + <alias name='serial0'/> + </serial> + <console type='pty' tty='/dev/pts/4'> + <source path='/dev/pts/4'/> + <target type='serial' port='0'/> + <alias name='serial0'/> + </console> + <channel type='spicevmc'> + <target type='virtio' name='com.redhat.spice.0' state='connected'/> + <alias name='channel0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='spice' port='5903' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> + <image compression='off'/> + </graphics> + <sound model='ich6'> + <alias name='sound0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </sound> + <video> + <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/> + <alias name='video0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <redirdev bus='usb' type='spicevmc'> + <alias name='redir0'/> + </redirdev> + <redirdev bus='usb' type='spicevmc'> + <alias name='redir1'/> + </redirdev> + <memballoon model='virtio'> + <alias name='balloon0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> + </memballoon> + </devices> + <seclabel type='dynamic' model='selinux' relabel='yes'> + <label>system_u:system_r:svirt_t:s0:c182,c195</label> + <imagelabel>system_u:object_r:svirt_image_t:s0:c182,c195</imagelabel> + </seclabel> +</domain> |