puppet-n1k-vsm/templates/vsm_vm_secondary.xml.erb
Steven Hillman a9bbbc6e64 Add pacemaker integration code into VSM puppetry
This patch adds in the option to support pacemaker integration in OSP7.
Specifically when pacemaker integration is enabled two VMs will be
created- one for the primary, and one for the secondary. Neither VM
will be defined or started. Addditionally MACs will be generated for
both VMs to prevent an issue on VSM switchover.

Code was also added to support cases where the VSM needs to be
brought up in setups where there's an existing bridge.

Change-Id: I2ca2ccc12a9db56348440d210eef4bde25142aef
2015-08-23 17:10:23 -07:00

93 lines
3.8 KiB
Plaintext

<domain type='kvm' >
<name><%= scope.lookupvar('n1k_vsm::vsmname_s') %></name>
<memory unit='KiB'><%= scope.lookupvar('n1k_vsm::memory') %></memory>
<vcpu placement='static'> <%= scope.lookupvar('n1k_vsm::vcpu') %></vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type>
<boot dev='hd'/>
<boot dev='cdrom'/>
</os>
<features> <acpi/> <apic/> <pae/> </features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='<%= scope.lookupvar('n1k_vsm::diskfile_s') %>'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='<%= scope.lookupvar('n1k_vsm::imgfile_s') %>'/>
<target dev='hdb' bus='ide'/>
<readonly/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'>
<source bridge='<%= scope.lookupvar('n1k_vsm::ovsbridge') %>'/>
<virtualport type='openvswitch' />
<target dev='<%= @ctrltap_s %>'/>
<model type='e1000'/>
<% if scope.lookupvar('n1k_vsm::pacemaker_control') == true %>
<mac address='<%= @ctrlmac_s %>'/>
<% end %>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>
<interface type='bridge'>
<source bridge='<%= scope.lookupvar('n1k_vsm::ovsbridge') %>'/>
<virtualport type='openvswitch' />
<target dev='<%= @mgmttap_s %>'/>
<model type='e1000'/>
<% if scope.lookupvar('n1k_vsm::pacemaker_control') == true %>
<mac address='<%= @mgmtmac_s %>'/>
<% end %>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</interface>
<interface type='bridge'>
<source bridge='<%= scope.lookupvar('n1k_vsm::ovsbridge') %>'/>
<virtualport type='openvswitch' />
<target dev='<%= @pkttap_s %>'/>
<model type='e1000'/>
<% if scope.lookupvar('n1k_vsm::pacemaker_control') == true %>
<mac address='<%= @pktmac_s %>'/>
<% end %>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</memballoon>
<console type='pty' tty='/dev/pts/<%= scope.lookupvar('n1k_vsm::consolepts') %>'>
<source path='/dev/pts/<%= scope.lookupvar('n1k_vsm::consolepts') %>'/>
<target port='0'/>
</console>
</devices>
</domain>