<%= @name %><%= @title %><%= @description %><%= @uuid %><%= @memory_size %> cpuset='<%= @cpuset %>'<% end %>><%= @cpus %>
<% if @cpu_mode != 'host-passthrough' %>
<% if @cpu_mode == 'custom' %><%= @cpu_model %><% end %>
<% if @nested %>
<% if @cpu_features.select{|x| x[:name] == 'vmx'}.empty? %>
<% end %>
<% if @cpu_features.select{|x| x[:name] == 'svm'}.empty? %>
<% end %>
<% end %>
<% @cpu_features.each do |cpu_feature| %>
<% end %>
<% unless @cpu_topology.empty? %>
<%# CPU topology -%>
<% end %>
<% end %>
<% if @numa_nodes %>
<% @numa_nodes.each_with_index do |node, index| %>
<% end %>
<% end %>
<%- if @nodeset -%>
<%- end -%>
<% unless @memory_backing.empty? %>
<% @memory_backing.each do |backing| %>
<<%= backing[:name] %> <%= backing[:config].map { |k,v| "#{k}='#{v}'"}.join(' ') %>/>
<% end %>
<% end%>
<% if @shares %>
<%= @shares %>
<% end %>
<% if @machine_type %>
<% if @machine_arch %>
hvm
<% else %>
hvm
<% end %>
<% else %>
<% if @machine_arch %>
hvm
<% else %>
hvm
<% end %>
<% end %>
<% if @loader %>
<% if @nvram %>
<%= @loader %>
<% else %>
<%= @loader %>
<% end %>
<% end %>
<% if @nvram %>
<%= @nvram %>
<% end %>
<% if @boot_order.count >= 1 %>
<% end %>
<%= @kernel %><%= @initrd %><%= @cmd_line %>
<% if @dtb %>
<%= @dtb %>
<% end %>
<% @features.each do |feature| %>
<<%= feature %>/>
<% end %>
<% if @kvm_hidden %>
<% end %>
<% if !@features_hyperv.empty? %>
<% @features_hyperv.each do |feature| %>
<<%= feature[:name] %> state='<%= feature[:state] %>'<% if feature[:name] == 'spinlocks' %> retries='<%= feature[:retries] %>'<% end %> />
<% end %>
<% end %>
<% @clock_timers.each do |clock_timer| %>
<%= attr %>='<%= value %>'<% end %>/>
<% end %>
<% if @emulator_path %>
<%= @emulator_path %>
<% end %>
<% @domain_volumes.each_with_index do |volume, index| -%>
/>
<%# we need to ensure a unique target dev -%>
<% end -%>
<%# additional disks -%>
<% @disks.each_with_index do |d, index| -%>
/>
<% if d[:shareable] %>
<% end %>
<% if d[:serial] %>
<%= d[:serial] %>
<% end %>
<% if d[:wwn] %>
<%= d[:wwn] %>
<% end %>
<%# this will get auto generated by Libvirt
-%>
<% end -%>
<% @cdroms.each do |c| %>
<% end %>
<% @serials.each_with_index do |serial, port| %>
<% unless serial[:source].nil? %>
<% end %>
<% end %>
<% console_log = @serials.first %>
<% unless console_log[:source].nil? %>
<% end %>
<% @channels.each do |channel| %>
<%if channel[:source_mode] or channel[:source_path] %>
<% end %>
<% @inputs.each do |input| %>
<% end %>
<% if !@sound_type.nil? %>
<%# Sound device-%>
<%# End Sound%>
<% end %>
<% if @graphics_type != 'none' %>
<%# Video device -%>
<% if not @graphics_gl %>/><% else %>>
<% end %>
<%#End Video -%>
<% end %>
<% if @rng[:model] == "random"%>
/dev/random
<% end %>
<% @pcis.each do |pci| %>
<% end %>
<% @usbs.each do |usb| %>
<% end %>
<% unless @redirdevs.empty? %>
<% @redirdevs.each do |redirdev| %>
<% end %>
<% unless @redirfilters.empty? %>
<% @redirfilters.each do |usbdev| %>
<% end %>
<% end %>
<% end %>
<% unless @watchdog_dev.empty? %>
<%# Watchdog Device -%>
<% end %>
<% unless @smartcard_dev.empty? -%>
<% if @smartcard_dev[:mode] == 'passthrough' %>
<% if @smartcard_dev[:type] == 'tcp' %>
<% else %>
<% end %>
<% end %>
<% end -%>
<% if @tpm_path || @tpm_version -%>
<%# TPM Device -%>
version='<%= @tpm_version %>'<% end %>>
<% if @tpm_path -%>
<% end -%>
<% end -%>
<% if not @usbctl_dev.empty? %>
<%# USB Controller -%>
/>
<% end %>
<% unless @memballoon_enabled.nil? %>
<% if @memballoon_enabled %>
<% else %>
<% end %>
<% end %>
<% if not @qemu_args.empty? or not @qemu_env.empty? %>
<% @qemu_args.each do |arg| %>
<% end %>
<% @qemu_env.each do |env_var, env_value| %>
<% end %>
<% end %>