Create ceph disk in bash script 81/35381/1
authorAlex Yang <yangyang1@zte.com.cn>
Fri, 26 May 2017 02:13:00 +0000 (10:13 +0800)
committerAlex Yang <yangyang1@zte.com.cn>
Fri, 26 May 2017 02:15:03 +0000 (10:15 +0800)
Change-Id: Ib80710c784d384ebc27eb0f51fcb4384017eecca
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
ci/deploy/deploy.sh
templates/virtual_environment/vms/computer01.xml
templates/virtual_environment/vms/computer02.xml
templates/virtual_environment/vms/controller01.xml
templates/virtual_environment/vms/controller02.xml
templates/virtual_environment/vms/controller03.xml

index 6c88dc5..27d91f8 100755 (executable)
@@ -312,7 +312,8 @@ if [ $IS_BARE == 0 ];then
         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
+            qemu-img create -f qcow2 ${VM_STORAGE}/${VM_MULTINODE[$i]}.qcow2 120G
+            qemu-img create -f qcow2 ${VM_STORAGE}/${VM_MULTINODE[$i]}_data.qcow2 150G
             virsh define ${VMDEPLOY_NODE[$i]}
             virsh start ${VM_MULTINODE[$i]}
         done
index 00d2718..290fe32 100644 (file)
       <alias name='ide0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='/home/qemu/vms/computer01_data.qcow2'/>
+      <backingStore/>
+      <target dev='hdb' bus='ide'/>
+      <alias name='ide0-0-1'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+    </disk>
     <controller type='usb' index='0' model='ich9-ehci1'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
index b2b48bf..ada7e1a 100644 (file)
       <alias name='ide0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='/home/qemu/vms/computer02_data.qcow2'/>
+      <backingStore/>
+      <target dev='hdb' bus='ide'/>
+      <alias name='ide0-0-1'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+    </disk>
     <controller type='usb' index='0' model='ich9-ehci1'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
index fbf14f1..b55e150 100644 (file)
       <alias name='ide0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='/home/qemu/vms/controller01_data.qcow2'/>
+      <backingStore/>
+      <target dev='hdb' bus='ide'/>
+      <alias name='ide0-0-1'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+    </disk>
     <controller type='usb' index='0' model='ich9-ehci1'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
index 931c1f2..d17a07a 100644 (file)
       <alias name='ide0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='/home/qemu/vms/controller02_data.qcow2'/>
+      <backingStore/>
+      <target dev='hdb' bus='ide'/>
+      <alias name='ide0-0-1'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+    </disk>
     <controller type='usb' index='0' model='ich9-ehci1'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
index 8f1c0f0..186868f 100644 (file)
       <alias name='ide0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='/home/qemu/vms/controller03_data.qcow2'/>
+      <backingStore/>
+      <target dev='hdb' bus='ide'/>
+      <alias name='ide0-0-1'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+    </disk>
     <controller type='usb' index='0' model='ich9-ehci1'>
       <alias name='usb'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>