support mutinode deploy in vm deployment env 47/33147/9
authorzhouya <zhou.ya@zte.com.cn>
Sat, 8 Apr 2017 07:48:40 +0000 (15:48 +0800)
committerzhouya <zhou.ya@zte.com.cn>
Tue, 11 Apr 2017 07:47:58 +0000 (15:47 +0800)
Change-Id: Ic9e19d4e120fc53d96d0794239cd6e421f25ea27
Signed-off-by: zhouya <zhou.ya@zte.com.cn>
ci/deploy/deploy.sh
deploy/config/bm_environment/zte-baremetal1/network.yml
deploy/config/vm_environment/zte-virtual1/deploy.yml
deploy/config/vm_environment/zte-virtual2/deploy.yml [new file with mode: 0644]
deploy/config/vm_environment/zte-virtual2/network.yml [new file with mode: 0644]
templates/virtual_environment/vms/computer01.xml [new file with mode: 0644]
templates/virtual_environment/vms/computer02.xml [new file with mode: 0644]
templates/virtual_environment/vms/controller01.xml [new file with mode: 0644]
templates/virtual_environment/vms/controller02.xml [new file with mode: 0644]
templates/virtual_environment/vms/controller03.xml [new file with mode: 0644]

index 4ec2c2f..eba6b58 100755 (executable)
@@ -69,6 +69,7 @@ POD_NAME=''
 TARGET_HOSTS_NUM=0
 DRY_RUN=0
 IS_BARE=1
+VM_MULTINODE=("computer01" "computer02" "controller01" "controller02" "controller03")
 #
 # END of variables to customize
 ############################################################################
@@ -153,6 +154,11 @@ VMDEPLOY_TARGET_NODE_NET=$WORKSPACE/templates/virtual_environment/networks/os-al
 VMDEPLOY_DAISY_SERVER_VM=$WORKSPACE/templates/virtual_environment/vms/daisy.xml
 VMDEPLOY_TARGET_NODE_VM=$WORKSPACE/templates/virtual_environment/vms/all_in_one.xml
 
+VMDEPLOY_NODE=[]
+for ((i=0;i<${#VM_MULTINODE[@]};i++));do
+    VMDEPLOY_NODE[$i]=$WORKSPACE/templates/virtual_environment/vms/${VM_MULTINODE[$i]}.xml
+    echo ${VMDEPLOY_NODE[$i]}
+done
 
 BMDEPLOY_DAISY_SERVER_NET=$WORKSPACE/templates/physical_environment/networks/daisy.xml
 BMDEPLOY_DAISY_SERVER_VM=$WORKSPACE/templates/physical_environment/vms/daisy.xml
@@ -253,6 +259,10 @@ function clean_up
 echo "=====clean up all node and network======"
 if [ $IS_BARE == 0 ];then
     clean_up all_in_one daisy2
+    for ((i=0;i<${#VM_MULTINODE[@]};i++));do
+        virsh destroy ${VM_MULTINODE[$i]}
+        virsh undefine ${VM_MULTINODE[$i]}
+    done
     clean_up daisy daisy1
 else
     virsh destroy daisy
@@ -305,8 +315,19 @@ ssh $SSH_PARAS $DAISY_IP "python ${REMOTE_SPACE}/deploy/tempest.py --dha $DHA --
 
 echo "=====create and find node======"
 if [ $IS_BARE == 0 ];then
-    qemu-img create -f qcow2 ${VM_STORAGE}/all_in_one.qcow2 200G
-    create_node $VMDEPLOY_TARGET_NODE_NET daisy2 $VMDEPLOY_TARGET_NODE_VM all_in_one
+    if [ $TARGET_HOSTS_NUM == 1 ];then
+        qemu-img create -f qcow2 ${VM_STORAGE}/all_in_one.qcow2 200G
+        create_node $VMDEPLOY_TARGET_NODE_NET daisy2 $VMDEPLOY_TARGET_NODE_VM all_in_one
+    else
+        virsh net-define $VMDEPLOY_TARGET_NODE_NET
+        virsh net-autostart daisy2
+        virsh net-start daisy2
+        for ((i=0;i<${#VM_MULTINODE[@]};i++));do
+            qemu-img create -f qcow2 ${VM_STORAGE}/${VM_MULTINODE[$i]}.qcow2 200G
+            virsh define ${VMDEPLOY_NODE[$i]}
+            virsh start ${VM_MULTINODE[$i]}
+        done
+    fi
     sleep 20
 else
     for i in $(seq 106 110); do
@@ -320,8 +341,15 @@ ssh $SSH_PARAS $DAISY_IP "python ${REMOTE_SPACE}/deploy/tempest.py  --dha $DHA -
 
 echo "======daisy virtual-deploy os and openstack==========="
 if [ $IS_BARE == 0 ];then
-    virsh destroy all_in_one
-    virsh start all_in_one
+    if [ $TARGET_HOSTS_NUM == 1 ];then
+        virsh destroy all_in_one
+        virsh start all_in_one
+    else
+        for ((i=0;i<${#VM_MULTINODE[@]};i++));do
+            virsh destroy ${VM_MULTINODE[$i]}
+            virsh start ${VM_MULTINODE[$i]}
+        done
+    fi
     sleep 20
     ssh $SSH_PARAS $DAISY_IP "python ${REMOTE_SPACE}/deploy/tempest.py --dha $DHA --network $NETWORK --install 'yes'"
 fi
@@ -334,7 +362,13 @@ fi
 sleep 10
 
 if [ $IS_BARE == 0 ];then
-    virsh reboot all_in_one
+    if [ $TARGET_HOSTS_NUM == 1 ];then
+        virsh reboot all_in_one
+    else
+        for ((i=0;i<${#VM_MULTINODE[@]};i++));do
+            virsh reboot ${VM_MULTINODE[$i]}
+        done
+    fi
 fi
 ssh $SSH_PARAS $DAISY_IP "${REMOTE_SPACE}/deploy/check_openstack_progress.sh -n $TARGET_HOSTS_NUM"
 if [ $? -ne 0 ]; then
index 53f21d9..ad0ec64 100644 (file)
@@ -8,52 +8,66 @@
 # http://www.apache.org/licenses/LICENSE-2.0\r
 ##############################################################################\r
 \r
+##############################################################################\r
+# Description\r
+# MANAGEMENT: used for PXE, vlan used\r
+# SOTRAGE: used for storage access\r
+# EXTERNAL: tenant public/floating IP associated network,\r
+#     requires a dedicated interface\r
+# PUBLICAPI: used for horizon access, openstack API access\r
+# TENANT: used for tenant access, vlan and VxLan supported, default VxLan\r
+##############################################################################\r
 network-config-metadata:\r
-  title: 'zte-bm-deploy network config'\r
+  title: 'Deployment Adapter for baremetal POD'\r
   version: '0.1'\r
-  created: 'Mon Oct 31 2016'\r
-  comment:\r
+  created: 'Feb 2 2017'\r
+  comment: 'For Daisy initial'\r
 networks:\r
-  - cidr: '10.20.7.0/24'\r
-    gateway: '10.20.7.1'\r
+  - cidr: '192.168.71.0/24'\r
+    gateway: '192.168.71.1'\r
     ip_ranges:\r
-    - 'start': '10.20.7.4'\r
-      'end': '10.20.7.11'\r
+      - 'start': '192.168.71.2'\r
+        'end': '192.168.71.254'\r
+    vlan_id: 171\r
     name: 'MANAGEMENT'\r
-  - cidr: '10.20.7.0/24'\r
-    gateway: '10.20.7.1'\r
+  - cidr: '192.168.72.0/24'\r
+    gateway: '192.168.72.1'\r
     ip_ranges:\r
-    - start: '10.20.7.4'\r
-      end: '10.20.7.11'\r
+      - 'start': '192.168.72.2'\r
+        'end': '192.168.72.254'\r
+    vlan_id: 172\r
     name: 'STORAGE'\r
-  - cidr: '172.10.101.0/24'\r
-    gateway: '172.10.101.0'\r
+  - cidr: '172.70.0.0/24'\r
+    gateway: '172.70.0.0'\r
     ip_ranges:\r
-    - 'start': '172.10.101.1'\r
-      'end': '172.10.101.10'\r
+      - 'start': '172.70.0.2'\r
+        'end': '172.70.0.100'\r
+    vlan_id: 173\r
     'name': 'EXTERNAL'\r
   - cidr: '10.20.7.0/24'\r
     gateway: '10.20.7.1'\r
     ip_ranges:\r
-    - 'start': '10.20.7.4'\r
-      'end': '10.20.7.11'\r
+      - 'start': '10.20.7.20'\r
+        'end': '10.20.7.200'\r
+    vlan_id: null\r
     name: 'PUBLICAPI'\r
-  - cidr: '10.20.7.0/24'\r
-    gateway: '10.20.7.1'\r
+  - cidr: '192.168.73.0/24'\r
+    gateway: '192.168.73.1'\r
     ip_ranges:\r
-    - 'start': '10.20.7.4'\r
-      'end': '10.20.7.11'\r
+      - 'start': '192.168.73.2'\r
+        'end': '192.168.73.254'\r
+    vlan_id: 1130\r
     name: 'TENANT'\r
 interfaces:\r
   - name: 'EXTERNAL'\r
-    interface: 'ens12f1'\r
+    interface: 'ens44f1'\r
   - name: 'MANAGEMENT'\r
-    interface: 'ens4f0'\r
+    interface: 'ens12f0'\r
   - name: 'PUBLICAPI'\r
     interface: 'ens4f0'\r
   - name: 'STORAGE'\r
-    interface: 'ens4f0'\r
+    interface: 'ens12f1'\r
   - name: 'TENANT'\r
-    interface: 'ens4f0'\r
-internal_vip: '10.20.7.12'\r
-public_vip: '10.20.7.12'\r
+    interface: 'ens44f0'\r
+internal_vip: '192.168.71.10'\r
+public_vip: '10.20.7.11'\r
index 12fa169..14508fa 100644 (file)
@@ -10,4 +10,4 @@ disks:
 daisy_passwd: 'r00tme'\r
 daisy_ip: '10.20.11.2'\r
 daisy_gateway: '10.20.11.1'\r
-ceph_disk_name: '/dev/sdb'\r
+ceph_disk_name: ''\r
diff --git a/deploy/config/vm_environment/zte-virtual2/deploy.yml b/deploy/config/vm_environment/zte-virtual2/deploy.yml
new file mode 100644 (file)
index 0000000..f2c8ac1
--- /dev/null
@@ -0,0 +1,24 @@
+hosts:\r
+- name: 'controller01'\r
+  roles:\r
+    - 'CONTROLLER_LB'\r
+- name: 'controller02'\r
+  roles:\r
+    - 'CONTROLLER_LB'\r
+- name: 'controller03'\r
+  roles:\r
+    - 'CONTROLLER_LB'\r
+- name: 'computer01'\r
+  roles:\r
+    - 'COMPUTER'\r
+- name: 'computer02'\r
+  roles:\r
+    - 'COMPUTER'\r
+disks:\r
+  daisy: 50\r
+  controller: 50\r
+  compute: 50\r
+daisy_passwd: 'r00tme'\r
+daisy_ip: '10.20.11.2'\r
+daisy_gateway: '10.20.11.1'\r
+ceph_disk_name: ''\r
diff --git a/deploy/config/vm_environment/zte-virtual2/network.yml b/deploy/config/vm_environment/zte-virtual2/network.yml
new file mode 100644 (file)
index 0000000..28d531c
--- /dev/null
@@ -0,0 +1,60 @@
+##############################################################################\r
+# Copyright (c) 2016 ZTE Coreporation and others.\r
+# hu.zhijiang@zte.com.cn\r
+# sun.jing22@zte.com.cn\r
+# All rights reserved. This program and the accompanying materials\r
+# are made available under the terms of the Apache License, Version 2.0\r
+# which accompanies this distribution, and is available at\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+##############################################################################\r
+\r
+network-config-metadata:\r
+  title: 'zte-virtual2 network config'\r
+  version: '0.1'\r
+  created: 'Tue Apr 11 2017'\r
+  comment:\r
+networks:\r
+  - cidr: '10.20.11.0/24'\r
+    gateway: '10.20.11.1'\r
+    ip_ranges:\r
+    - start: '10.20.11.3'\r
+      end: '10.20.11.10'\r
+    name: 'MANAGEMENT'\r
+  - cidr: '10.20.11.0/24'\r
+    gateway: '10.20.11.1'\r
+    ip_ranges:\r
+    - start: '10.20.11.3'\r
+      end: '10.20.11.10'\r
+    name: 'STORAGE'\r
+  - cidr: '172.10.101.0/24'\r
+    gateway: '172.10.101.1'\r
+    ip_ranges:\r
+    - start: 172.10.101.2\r
+      end: 172.10.101.20\r
+    name: EXTERNAL\r
+    network_name: admin_external\r
+  - cidr: '10.20.11.0/24'\r
+    gateway: '10.20.11.1'\r
+    ip_ranges:\r
+    - start: '10.20.11.3'\r
+      end: '10.20.11.10'\r
+    name: 'PUBLICAPI'\r
+  - cidr: '10.20.11.0/24'\r
+    gateway: '10.20.11.1'\r
+    ip_ranges:\r
+    - start: '10.20.11.3'\r
+      end: '10.20.11.10'\r
+    name: 'TENANT'\r
+interfaces:\r
+  - name: 'EXTERNAL'\r
+    interface: 'ens8'\r
+  - name: 'MANAGEMENT'\r
+    interface: 'ens3'\r
+  - name: 'PUBLICAPI'\r
+    interface: 'ens3'\r
+  - name: 'STORAGE'\r
+    interface: 'ens3'\r
+  - name: 'TENANT'\r
+    interface: 'ens3'\r
+internal_vip: '10.20.11.11'\r
+public_vip: '10.20.11.11'\r
diff --git a/templates/virtual_environment/vms/computer01.xml b/templates/virtual_environment/vms/computer01.xml
new file mode 100644 (file)
index 0000000..323f741
--- /dev/null
@@ -0,0 +1,126 @@
+<domain type='kvm' id='4'>
+  <name>computer01</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/computer01.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/computer02.xml b/templates/virtual_environment/vms/computer02.xml
new file mode 100644 (file)
index 0000000..b8a4eac
--- /dev/null
@@ -0,0 +1,126 @@
+<domain type='kvm' id='4'>
+  <name>computer02</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/computer02.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/controller01.xml b/templates/virtual_environment/vms/controller01.xml
new file mode 100644 (file)
index 0000000..b29b45c
--- /dev/null
@@ -0,0 +1,126 @@
+<domain type='kvm' id='4'>
+  <name>controller01</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/controller01.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/controller02.xml b/templates/virtual_environment/vms/controller02.xml
new file mode 100644 (file)
index 0000000..b49b954
--- /dev/null
@@ -0,0 +1,126 @@
+<domain type='kvm' id='4'>
+  <name>controller02</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/controller02.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/controller03.xml b/templates/virtual_environment/vms/controller03.xml
new file mode 100644 (file)
index 0000000..f35f7ef
--- /dev/null
@@ -0,0 +1,126 @@
+<domain type='kvm' id='4'>
+  <name>controller03</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/controller03.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>