mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Tidy up XML generated (#1407)
To make it easier to see when the XML generated has deviated from expected, tidy up the emitted XML to use a more consistent formatting that would be inline with what would be expected to be output by virsh directly.
This commit is contained in:
@@ -75,11 +75,7 @@ module VagrantPlugins
|
|||||||
@graphics_autoport = config.graphics_autoport
|
@graphics_autoport = config.graphics_autoport
|
||||||
@graphics_port = config.graphics_port
|
@graphics_port = config.graphics_port
|
||||||
@graphics_ip = config.graphics_ip
|
@graphics_ip = config.graphics_ip
|
||||||
@graphics_passwd = if config.graphics_passwd.to_s.empty?
|
@graphics_passwd = config.graphics_passwd
|
||||||
''
|
|
||||||
else
|
|
||||||
"passwd='#{config.graphics_passwd}'"
|
|
||||||
end
|
|
||||||
@graphics_gl = config.graphics_gl
|
@graphics_gl = config.graphics_gl
|
||||||
@video_type = config.video_type
|
@video_type = config.video_type
|
||||||
@sound_type = config.sound_type
|
@sound_type = config.sound_type
|
||||||
@@ -312,7 +308,7 @@ module VagrantPlugins
|
|||||||
env[:ui].info(" -- Graphics Type: #{@graphics_type}")
|
env[:ui].info(" -- Graphics Type: #{@graphics_type}")
|
||||||
env[:ui].info(" -- Graphics Port: #{@graphics_port}")
|
env[:ui].info(" -- Graphics Port: #{@graphics_port}")
|
||||||
env[:ui].info(" -- Graphics IP: #{@graphics_ip}")
|
env[:ui].info(" -- Graphics IP: #{@graphics_ip}")
|
||||||
env[:ui].info(" -- Graphics Password: #{@graphics_passwd.empty? ? 'Not defined' : 'Defined'}")
|
env[:ui].info(" -- Graphics Password: #{@graphics_passwd.nil? ? 'Not defined' : 'Defined'}")
|
||||||
env[:ui].info(" -- Video Type: #{@video_type}")
|
env[:ui].info(" -- Video Type: #{@video_type}")
|
||||||
env[:ui].info(" -- Video VRAM: #{@video_vram}")
|
env[:ui].info(" -- Video VRAM: #{@video_vram}")
|
||||||
env[:ui].info(" -- Video 3D accel: #{@video_accel3d}")
|
env[:ui].info(" -- Video 3D accel: #{@video_accel3d}")
|
||||||
|
|||||||
@@ -5,115 +5,111 @@
|
|||||||
<uuid><%= @uuid %></uuid>
|
<uuid><%= @uuid %></uuid>
|
||||||
<memory><%= @memory_size %></memory>
|
<memory><%= @memory_size %></memory>
|
||||||
<vcpu<% if @cpuset %> cpuset='<%= @cpuset %>'<% end %>><%= @cpus %></vcpu>
|
<vcpu<% if @cpuset %> cpuset='<%= @cpuset %>'<% end %>><%= @cpus %></vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='<%= @cpu_mode %>'>
|
<cpu mode='<%= @cpu_mode %>'>
|
||||||
<% if @cpu_mode != 'host-passthrough' %>
|
<%- if @cpu_mode != 'host-passthrough' -%>
|
||||||
<model fallback='<%= @cpu_fallback %>'><% if @cpu_mode == 'custom' %><%= @cpu_model %><% end %></model>
|
<model fallback='<%= @cpu_fallback %>'><% if @cpu_mode == 'custom' %><%= @cpu_model %><% end %></model>
|
||||||
<% if @nested %>
|
<%- if @nested -%>
|
||||||
<% if @cpu_features.select{|x| x[:name] == 'vmx'}.empty? %>
|
<%- if @cpu_features.select{|x| x[:name] == 'vmx'}.empty? -%>
|
||||||
<feature policy='optional' name='vmx'/>
|
<feature policy='optional' name='vmx'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @cpu_features.select{|x| x[:name] == 'svm'}.empty? %>
|
<%- if @cpu_features.select{|x| x[:name] == 'svm'}.empty? -%>
|
||||||
<feature policy='optional' name='svm'/>
|
<feature policy='optional' name='svm'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% @cpu_features.each do |cpu_feature| %>
|
<%- @cpu_features.each do |cpu_feature| -%>
|
||||||
<feature name='<%= cpu_feature[:name] %>' policy='<%= cpu_feature[:policy] %>'/>
|
<feature name='<%= cpu_feature[:name] %>' policy='<%= cpu_feature[:policy] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% unless @cpu_topology.empty? %>
|
<%- unless @cpu_topology.empty? -%>
|
||||||
<%# CPU topology -%>
|
<%# CPU topology -%>
|
||||||
<topology sockets='<%= @cpu_topology[:sockets] %>' cores='<%= @cpu_topology[:cores] %>' threads='<%= @cpu_topology[:threads] %>'/>
|
<topology sockets='<%= @cpu_topology[:sockets] %>' cores='<%= @cpu_topology[:cores] %>' threads='<%= @cpu_topology[:threads] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @numa_nodes %>
|
<%- if @numa_nodes -%>
|
||||||
<numa>
|
<numa>
|
||||||
<% @numa_nodes.each_with_index do |node, index| %>
|
<%- @numa_nodes.each_with_index do |node, index| -%>
|
||||||
<cell id='<%= index %>' cpus='<%= node[:cpus] %>' memory='<%= node[:memory] %>'/>
|
<cell id='<%= index %>' cpus='<%= node[:cpus] %>' memory='<%= node[:memory] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</numa>
|
</numa>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
<%- if @nodeset -%>
|
<%- if @nodeset -%>
|
||||||
<numatune>
|
<numatune>
|
||||||
<memory nodeset='<%= @nodeset %>'/>
|
<memory nodeset='<%= @nodeset %>'/>
|
||||||
</numatune>
|
</numatune>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<% unless @memory_backing.empty? %>
|
<%- unless @memory_backing.empty? -%>
|
||||||
<memoryBacking>
|
<memoryBacking>
|
||||||
<% @memory_backing.each do |backing| %>
|
<%- @memory_backing.each do |backing| -%>
|
||||||
<<%= backing[:name] %> <%= backing[:config].map { |k,v| "#{k}='#{v}'"}.join(' ') %>/>
|
<<%= backing[:name] %> <%= backing[:config].map { |k,v| "#{k}='#{v}'"}.join(' ') %>/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</memoryBacking>
|
</memoryBacking>
|
||||||
<% end%>
|
<%- end%>
|
||||||
<% if @shares %>
|
<%- if @shares -%>
|
||||||
<cputune>
|
<cputune>
|
||||||
<shares><%= @shares %></shares>
|
<shares><%= @shares %></shares>
|
||||||
</cputune>
|
</cputune>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<% if @machine_type %>
|
<%- if @machine_type -%>
|
||||||
<% if @machine_arch %>
|
<%- if @machine_arch -%>
|
||||||
<type arch='<%= @machine_arch %>' machine='<%= @machine_type %>'>hvm</type>
|
<type arch='<%= @machine_arch %>' machine='<%= @machine_type %>'>hvm</type>
|
||||||
<% else %>
|
<%- else -%>
|
||||||
<type machine='<%= @machine_type %>'>hvm</type>
|
<type machine='<%= @machine_type %>'>hvm</type>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% else %>
|
<%- else -%>
|
||||||
<% if @machine_arch %>
|
<%- if @machine_arch -%>
|
||||||
<type arch='<%= @machine_arch %>'>hvm</type>
|
<type arch='<%= @machine_arch %>'>hvm</type>
|
||||||
<% else %>
|
<%- else -%>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @loader %>
|
<%- if @loader -%>
|
||||||
<% if @nvram %>
|
<%- if @nvram -%>
|
||||||
<loader readonly='yes' type='pflash'><%= @loader %></loader>
|
<loader readonly='yes' type='pflash'><%= @loader %></loader>
|
||||||
<% else %>
|
<%- else -%>
|
||||||
<loader readonly='yes' type='rom'><%= @loader %></loader>
|
<loader readonly='yes' type='rom'><%= @loader %></loader>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @nvram %>
|
<%- if @nvram -%>
|
||||||
<nvram><%= @nvram %></nvram>
|
<nvram><%= @nvram %></nvram>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @boot_order.count >= 1 %>
|
<%- if @boot_order.count >= 1 -%>
|
||||||
<bootmenu enable='yes'/>
|
<bootmenu enable='yes'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<kernel><%= @kernel %></kernel>
|
<kernel><%= @kernel %></kernel>
|
||||||
<initrd><%= @initrd %></initrd>
|
<initrd><%= @initrd %></initrd>
|
||||||
<cmdline><%= @cmd_line %></cmdline>
|
<cmdline><%= @cmd_line %></cmdline>
|
||||||
<% if @dtb %>
|
<%- if @dtb -%>
|
||||||
<dtb><%= @dtb %></dtb>
|
<dtb><%= @dtb %></dtb>
|
||||||
<% end %>
|
<% end -%>
|
||||||
</os>
|
</os>
|
||||||
<features>
|
<features>
|
||||||
<% @features.each do |feature| %>
|
<%- @features.each do |feature| -%>
|
||||||
<<%= feature %>/>
|
<<%= feature %>/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @kvm_hidden %>
|
<%- if @kvm_hidden -%>
|
||||||
<kvm>
|
<kvm>
|
||||||
<hidden state='on'/>
|
<hidden state='on'/>
|
||||||
</kvm>
|
</kvm>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if !@features_hyperv.empty? %>
|
<%- if !@features_hyperv.empty? -%>
|
||||||
<hyperv>
|
<hyperv>
|
||||||
<% @features_hyperv.each do |feature| %>
|
<%- @features_hyperv.each do |feature| -%>
|
||||||
<<%= feature[:name] %> state='<%= feature[:state] %>'<% if feature[:name] == 'spinlocks' %> retries='<%= feature[:retries] %>'<% end %> />
|
<<%= feature[:name] %> state='<%= feature[:state] %>'<% if feature[:name] == 'spinlocks' %> retries='<%= feature[:retries] %>'<% end %> />
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</hyperv>
|
</hyperv>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</features>
|
</features>
|
||||||
<clock offset='<%= @clock_offset %>'>
|
<clock offset='<%= @clock_offset %>'>
|
||||||
<% @clock_timers.each do |clock_timer| %>
|
<%- @clock_timers.each do |clock_timer| -%>
|
||||||
<timer<% clock_timer.each do |attr, value| %> <%= attr %>='<%= value %>'<% end %>/>
|
<timer<% clock_timer.each do |attr, value| %> <%= attr %>='<%= value %>'<% end %>/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</clock>
|
</clock>
|
||||||
<devices>
|
<devices>
|
||||||
<% if @emulator_path %>
|
<%- if @emulator_path -%>
|
||||||
<emulator><%= @emulator_path %></emulator>
|
<emulator><%= @emulator_path %></emulator>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% @domain_volumes.each_with_index do |volume, index| -%>
|
<%- @domain_volumes.each_with_index do |volume, index| -%>
|
||||||
<disk type='file' device='disk'>
|
<disk type='file' device='disk'>
|
||||||
<alias name='ua-box-volume-<%= index -%>'/>
|
<alias name='ua-box-volume-<%= index -%>'/>
|
||||||
<driver name='qemu' type='qcow2' <%=
|
<driver name='qemu' type='qcow2' <%=
|
||||||
@@ -125,9 +121,9 @@
|
|||||||
<%# we need to ensure a unique target dev -%>
|
<%# we need to ensure a unique target dev -%>
|
||||||
<target dev='<%= volume[:dev] %>' bus='<%= volume[:bus] %>'/>
|
<target dev='<%= volume[:dev] %>' bus='<%= volume[:bus] %>'/>
|
||||||
</disk>
|
</disk>
|
||||||
<% end -%>
|
<%- end -%>
|
||||||
<%# additional disks -%>
|
<%# additional disks -%>
|
||||||
<% @disks.each_with_index do |d, index| -%>
|
<%- @disks.each_with_index do |d, index| -%>
|
||||||
<disk type='file' device='disk'>
|
<disk type='file' device='disk'>
|
||||||
<alias name='ua-disk-volume-<%= index -%>'/>
|
<alias name='ua-disk-volume-<%= index -%>'/>
|
||||||
<driver name='qemu' type='<%= d[:type] %>' <%=
|
<driver name='qemu' type='<%= d[:type] %>' <%=
|
||||||
@@ -138,187 +134,186 @@
|
|||||||
-%>/>
|
-%>/>
|
||||||
<source file='<%= d[:absolute_path] %>'/>
|
<source file='<%= d[:absolute_path] %>'/>
|
||||||
<target dev='<%= d[:device] %>' bus='<%= d[:bus] %>'/>
|
<target dev='<%= d[:device] %>' bus='<%= d[:bus] %>'/>
|
||||||
<% if d[:shareable] %>
|
<%- if d[:shareable] -%>
|
||||||
<shareable/>
|
<shareable/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if d[:serial] %>
|
<%- if d[:serial] -%>
|
||||||
<serial><%= d[:serial] %></serial>
|
<serial><%= d[:serial] %></serial>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if d[:wwn] %>
|
<%- if d[:wwn] -%>
|
||||||
<wwn><%= d[:wwn] %></wwn>
|
<wwn><%= d[:wwn] %></wwn>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<%# this will get auto generated by Libvirt
|
<%# this will get auto generated by Libvirt
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='???' function='0x0'/>
|
<address type='pci' domain='0x0000' bus='0x00' slot='???' function='0x0'/>
|
||||||
-%>
|
-%>
|
||||||
</disk>
|
</disk>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<%- @cdroms.each do |c| -%>
|
||||||
<% @cdroms.each do |c| %>
|
|
||||||
<disk type='file' device='cdrom'>
|
<disk type='file' device='cdrom'>
|
||||||
<driver name='qemu' type='<%= c[:type] %>' />
|
<driver name='qemu' type='<%= c[:type] %>' />
|
||||||
<source file='<%= c[:path] %>'/>
|
<source file='<%= c[:path] %>'/>
|
||||||
<target dev='<%= c[:dev] %>' bus='<%= c[:bus] %>'/>
|
<target dev='<%= c[:dev] %>' bus='<%= c[:bus] %>'/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
</disk>
|
</disk>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
|
<%- @serials.each_with_index do |serial, port| -%>
|
||||||
<% @serials.each_with_index do |serial, port| %>
|
|
||||||
<serial type='<%= serial[:type] %>'>
|
<serial type='<%= serial[:type] %>'>
|
||||||
<% unless serial[:source].nil? %>
|
<%- unless serial[:source].nil? -%>
|
||||||
<source path='<%= serial[:source][:path] %>'/>
|
<source path='<%= serial[:source][:path] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<target port='<%= port %>'/>
|
<target port='<%= port %>'/>
|
||||||
</serial>
|
</serial>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% console_log = @serials.first %>
|
<%- console_log = @serials.first -%>
|
||||||
<console type='<%= console_log[:type] %>'>
|
<console type='<%= console_log[:type] %>'>
|
||||||
<% unless console_log[:source].nil? %>
|
<%- unless console_log[:source].nil? -%>
|
||||||
<source path='<%= console_log[:source][:path] %>'/>
|
<source path='<%= console_log[:source][:path] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<%- @channels.each do |channel| -%>
|
||||||
<% @channels.each do |channel| %>
|
|
||||||
<channel type='<%= channel[:type] %>' >
|
<channel type='<%= channel[:type] %>' >
|
||||||
<%if channel[:source_mode] or channel[:source_path] %>
|
<%-if channel[:source_mode] or channel[:source_path] -%>
|
||||||
<source
|
<source <%=
|
||||||
<% if channel[:source_mode] %>
|
channel.select { |k,_| [:source_mode, :source_path].include? k }
|
||||||
mode='<%= channel[:source_mode] %>'
|
.reject { |k,v| v.nil? }
|
||||||
<% end %>
|
.map { |k,v| "#{k.to_s.split('_').last}='#{v}'"}
|
||||||
<% if channel[:source_path] %>
|
.join(' ')
|
||||||
path="<%= channel[:source_path] %>"
|
-%>/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
/>
|
<target type='<%= channel[:target_type] %>' <%=
|
||||||
<% end %>
|
channel.select { |k,_| [:target_name, :target_address, :target_port].include? k }
|
||||||
<target type='<%= channel[:target_type] %>'
|
.reject { |k,v| v.nil? }
|
||||||
<% if channel[:target_name] %>
|
.map { |k,v| "#{k.to_s.split('_').last}='#{v}'"}
|
||||||
name="<%= channel[:target_name] %>"
|
.join(' ')
|
||||||
<% end %>
|
-%>/>
|
||||||
<% if channel[:target_address] %>
|
|
||||||
address="<%= channel[:target_address] %>"
|
|
||||||
<% end %>
|
|
||||||
<% if channel[:target_port] %>
|
|
||||||
port="<%= channel[:target_port] %>"
|
|
||||||
<% end %>
|
|
||||||
/>
|
|
||||||
</channel>
|
</channel>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
|
<%- @inputs.each do |input| -%>
|
||||||
<% @inputs.each do |input| %>
|
|
||||||
<input type='<%= input[:type] %>' bus='<%= input[:bus] %>'/>
|
<input type='<%= input[:type] %>' bus='<%= input[:bus] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
|
<%- if !@sound_type.nil? -%>
|
||||||
<% if !@sound_type.nil? %>
|
|
||||||
<%# Sound device-%>
|
<%# Sound device-%>
|
||||||
<sound model='<%= @sound_type %>'>
|
<sound model='<%= @sound_type %>'>
|
||||||
</sound>
|
</sound>
|
||||||
<%# End Sound%>
|
<%# End Sound%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @graphics_type != 'none' %>
|
<%- if @graphics_type != 'none'
|
||||||
|
graphics = {
|
||||||
|
'type' => @graphics_type,
|
||||||
|
'port' => @graphics_port,
|
||||||
|
'autoport' => @graphics_autoport,
|
||||||
|
'listen' => @graphics_ip,
|
||||||
|
'keymap' => @keymap,
|
||||||
|
'passwd' => @graphics_passwd,
|
||||||
|
}
|
||||||
|
-%>
|
||||||
<%# Video device -%>
|
<%# Video device -%>
|
||||||
<graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='<%= @keymap %>' <%= @graphics_passwd %> <% if not @graphics_gl %>/><% else %>>
|
<graphics <%=
|
||||||
<gl enable='yes' />
|
graphics.reject { |k,v| v.nil? }
|
||||||
</graphics><% end %>
|
.map { |k,v| "#{k}='#{v}'" }
|
||||||
|
.join(' ')
|
||||||
|
-%><%- if not @graphics_gl %>/><% else %>>
|
||||||
|
<gl enable='yes'/>
|
||||||
|
</graphics><% end -%>
|
||||||
<video>
|
<video>
|
||||||
<model type='<%= @video_type %>' vram='<%= @video_vram %>' heads='1'<% if not @video_accel3d %>/><% else %>>
|
<model type='<%= @video_type %>' vram='<%= @video_vram %>' heads='1'<% if not @video_accel3d %>/><% else %>>
|
||||||
<acceleration accel3d='yes'/>
|
<acceleration accel3d='yes'/>
|
||||||
</model><% end %>
|
</model><% end -%>
|
||||||
</video>
|
</video>
|
||||||
<%#End Video -%>
|
<%#End Video -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @rng[:model] == "random"%>
|
<%- if @rng[:model] == "random"%>
|
||||||
<rng model='virtio'>
|
<rng model='virtio'>
|
||||||
<backend model='random'>/dev/random</backend>
|
<backend model='random'>/dev/random</backend>
|
||||||
</rng>
|
</rng>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% @pcis.each do |pci| %>
|
<%- @pcis.each do |pci| -%>
|
||||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||||
<source>
|
<source>
|
||||||
<address domain='<%= pci[:domain] %>'
|
<address <%= pci.select { |k,_| [:domain, :bus, :slot, :function].include? k }
|
||||||
bus='<%= pci[:bus] %>'
|
.reject { |k,v| v.nil? }
|
||||||
slot='<%= pci[:slot] %>'
|
.map { |k,v| "#{k.to_s}='#{v}'" }
|
||||||
function='<%= pci[:function] %>'/>
|
.join(' ')
|
||||||
|
-%>/>
|
||||||
</source>
|
</source>
|
||||||
</hostdev>
|
</hostdev>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% @usbs.each do |usb| %>
|
<%- @usbs.each do |usb| -%>
|
||||||
<hostdev mode='subsystem' type='usb'>
|
<hostdev mode='subsystem' type='usb'>
|
||||||
<source startupPolicy='<%= usb[:startupPolicy] || "mandatory" %>'>
|
<source startupPolicy='<%= usb[:startupPolicy] || "mandatory" %>'>
|
||||||
<% if usb[:vendor] %>
|
<%- if usb[:vendor] -%>
|
||||||
<vendor id='<%= usb[:vendor] %>'/>
|
<vendor id='<%= usb[:vendor] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if usb[:product] %>
|
<%- if usb[:product] -%>
|
||||||
<product id='<%= usb[:product] %>'/>
|
<product id='<%= usb[:product] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if usb[:bus] && usb[:device] %>
|
<%- if usb[:bus] && usb[:device] -%>
|
||||||
<address bus='<%= usb[:bus] %>' device='<%= usb[:device] %>'/>
|
<address bus='<%= usb[:bus] %>' device='<%= usb[:device] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</source>
|
</source>
|
||||||
</hostdev>
|
</hostdev>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% unless @redirdevs.empty? %>
|
<%- unless @redirdevs.empty? -%>
|
||||||
<% @redirdevs.each do |redirdev| %>
|
<%- @redirdevs.each do |redirdev| -%>
|
||||||
<redirdev bus='usb' type='<%= redirdev[:type] %>'>
|
<redirdev bus='usb' type='<%= redirdev[:type] %>'>
|
||||||
</redirdev>
|
</redirdev>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% unless @redirfilters.empty? %>
|
<%- unless @redirfilters.empty? -%>
|
||||||
<redirfilter>
|
<redirfilter>
|
||||||
<% @redirfilters.each do |usbdev| %>
|
<%- @redirfilters.each do |usbdev| -%>
|
||||||
<usbdev class='<%= usbdev[:class] %>' vendor='<%= usbdev[:vendor] %>' product='<%= usbdev[:product] %>' version='<%= usbdev[:version] %>' allow='<%= usbdev[:allow] %>'/>
|
<usbdev class='<%= usbdev[:class] %>' vendor='<%= usbdev[:vendor] %>' product='<%= usbdev[:product] %>' version='<%= usbdev[:version] %>' allow='<%= usbdev[:allow] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</redirfilter>
|
</redirfilter>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% unless @watchdog_dev.empty? %>
|
<%- unless @watchdog_dev.empty? -%>
|
||||||
<%# Watchdog Device -%>
|
<%# Watchdog Device -%>
|
||||||
<watchdog model='<%= @watchdog_dev[:model] %>' action='<%= @watchdog_dev[:action] %>'/>
|
<watchdog model='<%= @watchdog_dev[:model] %>' action='<%= @watchdog_dev[:action] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
|
<%- unless @smartcard_dev.empty? -%>
|
||||||
<% unless @smartcard_dev.empty? -%>
|
<%- if @smartcard_dev[:mode] == 'passthrough' -%>
|
||||||
<% if @smartcard_dev[:mode] == 'passthrough' %>
|
<%- if @smartcard_dev[:type] == 'tcp' -%>
|
||||||
<% if @smartcard_dev[:type] == 'tcp' %>
|
|
||||||
<smartcard mode='<%= @smartcard_dev[:mode] %>' type='<%= @smartcard_dev[:type] %>'>
|
<smartcard mode='<%= @smartcard_dev[:mode] %>' type='<%= @smartcard_dev[:type] %>'>
|
||||||
<source mode='<%= @smartcard_dev[:source_mode] %>' host='<%= @smartcard_dev[:source_host] %>' service='<%= @smartcard_dev[:source_service] %>'/>
|
<source mode='<%= @smartcard_dev[:source_mode] %>' host='<%= @smartcard_dev[:source_host] %>' service='<%= @smartcard_dev[:source_service] %>'/>
|
||||||
</smartcard>
|
</smartcard>
|
||||||
<% else %>
|
<%- else -%>
|
||||||
<smartcard mode='<%= @smartcard_dev[:mode] %>' type='<%= @smartcard_dev[:type] %>'/>
|
<smartcard mode='<%= @smartcard_dev[:mode] %>' type='<%= @smartcard_dev[:type] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end -%>
|
<%- end -%>
|
||||||
|
<%- if @tpm_path || @tpm_version -%>
|
||||||
<% if @tpm_path || @tpm_version -%>
|
|
||||||
<%# TPM Device -%>
|
<%# TPM Device -%>
|
||||||
<tpm model='<%= @tpm_model %>'>
|
<tpm model='<%= @tpm_model %>'>
|
||||||
<backend type='<%= @tpm_type %>'<% if @tpm_version %> version='<%= @tpm_version %>'<% end %>>
|
<backend type='<%= @tpm_type %>'<% if @tpm_version %> version='<%= @tpm_version %>'<% end %>>
|
||||||
<% if @tpm_path -%>
|
<%- if @tpm_path -%>
|
||||||
<device path='<%= @tpm_path %>'/>
|
<device path='<%= @tpm_path %>'/>
|
||||||
<% end -%>
|
<%- end -%>
|
||||||
</backend>
|
</backend>
|
||||||
</tpm>
|
</tpm>
|
||||||
<% end -%>
|
<%- end -%>
|
||||||
<% if not @usbctl_dev.empty? %>
|
<%- if not @usbctl_dev.empty? -%>
|
||||||
<%# USB Controller -%>
|
<%# USB Controller -%>
|
||||||
<controller type='usb' model='<%= @usbctl_dev[:model] %>' <%= "ports=\"#{@usbctl_dev[:ports]}\" " if @usbctl_dev[:ports] %>/>
|
<controller type='usb' model='<%= @usbctl_dev[:model] %>' <%= "ports=\"#{@usbctl_dev[:ports]}\" " if @usbctl_dev[:ports] %>/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% unless @memballoon_enabled.nil? %>
|
<%- unless @memballoon_enabled.nil? -%>
|
||||||
<% if @memballoon_enabled %>
|
<%- if @memballoon_enabled -%>
|
||||||
<memballoon model='<%= @memballoon_model %>'>
|
<memballoon model='<%= @memballoon_model %>'>
|
||||||
<address type='pci' domain='0x0000' bus='<%= @memballoon_pci_bus %>' slot='<%= @memballoon_pci_slot %>' function='0x0'/>
|
<address type='pci' domain='0x0000' bus='<%= @memballoon_pci_bus %>' slot='<%= @memballoon_pci_slot %>' function='0x0'/>
|
||||||
</memballoon>
|
</memballoon>
|
||||||
<% else %>
|
<%- else -%>
|
||||||
<memballoon model='none'/>
|
<memballoon model='none'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</devices>
|
</devices>
|
||||||
|
<%- if not @qemu_args.empty? or not @qemu_env.empty? -%>
|
||||||
<% if not @qemu_args.empty? or not @qemu_env.empty? %>
|
|
||||||
<qemu:commandline>
|
<qemu:commandline>
|
||||||
<% @qemu_args.each do |arg| %>
|
<%- @qemu_args.each do |arg| -%>
|
||||||
<qemu:arg value='<%= arg[:value] %>'/>
|
<qemu:arg value='<%= arg[:value] %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% @qemu_env.each do |env_var, env_value| %>
|
<%- @qemu_env.each do |env_var, env_value| -%>
|
||||||
<qemu:env name='<%= env_var.to_s %>' value='<%= env_value %>'/>
|
<qemu:env name='<%= env_var.to_s %>' value='<%= env_value %>'/>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</qemu:commandline>
|
</qemu:commandline>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory>524288</memory>
|
<memory>524288</memory>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'></model>
|
<model fallback='allow'></model>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel></kernel>
|
<kernel></kernel>
|
||||||
@@ -38,24 +34,16 @@
|
|||||||
<source file='/var/lib/libvirt/images/vagrant-test_default-vdb.qcow2'/>
|
<source file='/var/lib/libvirt/images/vagrant-test_default-vdb.qcow2'/>
|
||||||
<target dev='vdb' bus='virtio'/>
|
<target dev='vdb' bus='virtio'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory>524288</memory>
|
<memory>524288</memory>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'></model>
|
<model fallback='allow'></model>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel></kernel>
|
<kernel></kernel>
|
||||||
@@ -32,24 +28,16 @@
|
|||||||
<source file='/var/lib/libvirt/images/vagrant-test_default.img'/>
|
<source file='/var/lib/libvirt/images/vagrant-test_default.img'/>
|
||||||
<target dev='sda' bus='virtio'/>
|
<target dev='sda' bus='virtio'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory>524288</memory>
|
<memory>524288</memory>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'></model>
|
<model fallback='allow'></model>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel></kernel>
|
<kernel></kernel>
|
||||||
@@ -32,24 +28,16 @@
|
|||||||
<source file='/var/lib/libvirt/images/vagrant-test_default.img'/>
|
<source file='/var/lib/libvirt/images/vagrant-test_default.img'/>
|
||||||
<target dev='vda' bus='virtio'/>
|
<target dev='vda' bus='virtio'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory>524288</memory>
|
<memory>524288</memory>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'></model>
|
<model fallback='allow'></model>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel></kernel>
|
<kernel></kernel>
|
||||||
@@ -38,24 +34,16 @@
|
|||||||
<source file='/var/lib/libvirt/images/vagrant-test_default_1.img'/>
|
<source file='/var/lib/libvirt/images/vagrant-test_default_1.img'/>
|
||||||
<target dev='vdb' bus='virtio'/>
|
<target dev='vdb' bus='virtio'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid/>
|
<uuid/>
|
||||||
<memory/>
|
<memory/>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'/>
|
<model fallback='allow'/>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel/>
|
<kernel/>
|
||||||
@@ -27,24 +23,16 @@
|
|||||||
<timer name='rtc'/>
|
<timer name='rtc'/>
|
||||||
</clock>
|
</clock>
|
||||||
<devices>
|
<devices>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input bus='ps2' type='mouse'/>
|
<input bus='ps2' type='mouse'/>
|
||||||
|
|
||||||
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/>
|
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/>
|
||||||
<video>
|
<video>
|
||||||
<model heads='1' type='cirrus' vram='9216'/>
|
<model heads='1' type='cirrus' vram='9216'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid/>
|
<uuid/>
|
||||||
<memory/>
|
<memory/>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'/>
|
<model fallback='allow'/>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel/>
|
<kernel/>
|
||||||
@@ -25,24 +21,16 @@
|
|||||||
</features>
|
</features>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
<devices>
|
<devices>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input bus='ps2' type='mouse'/>
|
<input bus='ps2' type='mouse'/>
|
||||||
|
|
||||||
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/>
|
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/>
|
||||||
<video>
|
<video>
|
||||||
<model heads='1' type='cirrus' vram='9216'/>
|
<model heads='1' type='cirrus' vram='9216'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid/>
|
<uuid/>
|
||||||
<memory/>
|
<memory/>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'/>
|
<model fallback='allow'/>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel/>
|
<kernel/>
|
||||||
@@ -25,24 +21,16 @@
|
|||||||
</features>
|
</features>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
<devices>
|
<devices>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input bus='ps2' type='mouse'/>
|
<input bus='ps2' type='mouse'/>
|
||||||
|
|
||||||
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/>
|
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/>
|
||||||
<video>
|
<video>
|
||||||
<model heads='1' type='cirrus' vram='9216'/>
|
<model heads='1' type='cirrus' vram='9216'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
<tpm model='tpm-tis'><backend type='passthrough'><device path='/dev/tpm0'/></backend></tpm></devices>
|
<tpm model='tpm-tis'><backend type='passthrough'><device path='/dev/tpm0'/></backend></tpm></devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid/>
|
<uuid/>
|
||||||
<memory/>
|
<memory/>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'/>
|
<model fallback='allow'/>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel/>
|
<kernel/>
|
||||||
@@ -25,24 +21,16 @@
|
|||||||
</features>
|
</features>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
<devices>
|
<devices>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input bus='ps2' type='mouse'/>
|
<input bus='ps2' type='mouse'/>
|
||||||
|
|
||||||
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/>
|
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/>
|
||||||
<video>
|
<video>
|
||||||
<model heads='1' type='cirrus' vram='9216'/>
|
<model heads='1' type='cirrus' vram='9216'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
<tpm model='tpm-crb'><backend type='emulator' version='2.0'/></tpm></devices>
|
<tpm model='tpm-crb'><backend type='emulator' version='2.0'/></tpm></devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,21 +5,17 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory></memory>
|
<memory></memory>
|
||||||
<vcpu cpuset='1-4,^3,6'>1</vcpu>
|
<vcpu cpuset='1-4,^3,6'>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='custom'>
|
<cpu mode='custom'>
|
||||||
<model fallback='allow'>qemu64</model>
|
<model fallback='allow'>qemu64</model>
|
||||||
<feature name='AAA' policy='required'/>
|
<feature name='AAA' policy='required'/>
|
||||||
<topology sockets='1' cores='3' threads='2'/>
|
<topology sockets='1' cores='3' threads='2'/>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
<numatune>
|
<numatune>
|
||||||
<memory nodeset='1-4,^3,6'/>
|
<memory nodeset='1-4,^3,6'/>
|
||||||
</numatune>
|
</numatune>
|
||||||
<cputune>
|
<cputune>
|
||||||
<shares>1024</shares>
|
<shares>1024</shares>
|
||||||
</cputune>
|
</cputune>
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type arch='x86_64' machine='pc-compatible'>hvm</type>
|
<type arch='x86_64' machine='pc-compatible'>hvm</type>
|
||||||
<loader readonly='yes' type='rom'>/efi/loader</loader>
|
<loader readonly='yes' type='rom'>/efi/loader</loader>
|
||||||
@@ -67,7 +63,6 @@
|
|||||||
<source file='/var/lib/libvirt/images/test-disk2.qcow2'/>
|
<source file='/var/lib/libvirt/images/test-disk2.qcow2'/>
|
||||||
<target dev='vdd' bus='virtio'/>
|
<target dev='vdd' bus='virtio'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
|
||||||
<disk type='file' device='cdrom'>
|
<disk type='file' device='cdrom'>
|
||||||
<driver name='qemu' type='raw' />
|
<driver name='qemu' type='raw' />
|
||||||
<source file=''/>
|
<source file=''/>
|
||||||
@@ -80,7 +75,6 @@
|
|||||||
<target dev='hdb' bus='ide'/>
|
<target dev='hdb' bus='ide'/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
</disk>
|
</disk>
|
||||||
|
|
||||||
<serial type='file'>
|
<serial type='file'>
|
||||||
<source path='/var/log/vm_consoles/machine.log'/>
|
<source path='/var/log/vm_consoles/machine.log'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
@@ -89,31 +83,19 @@
|
|||||||
<source path='/var/log/vm_consoles/machine.log'/>
|
<source path='/var/log/vm_consoles/machine.log'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
<channel type='unix' >
|
<channel type='unix' >
|
||||||
<target type='virtio'
|
<target type='virtio' name='org.qemu.guest_agent.0'/>
|
||||||
name="org.qemu.guest_agent.0"
|
|
||||||
/>
|
|
||||||
</channel>
|
</channel>
|
||||||
<channel type='spicevmc' >
|
<channel type='spicevmc' >
|
||||||
<target type='virtio'
|
<target type='virtio' name='com.redhat.spice.0'/>
|
||||||
name="com.redhat.spice.0"
|
|
||||||
/>
|
|
||||||
</channel>
|
</channel>
|
||||||
<channel type='unix' >
|
<channel type='unix' >
|
||||||
<source
|
<source path='/tmp/foo'/>
|
||||||
path="/tmp/foo"
|
<target type='guestfwd' address='192.0.2.42' port='4242'/>
|
||||||
/>
|
|
||||||
<target type='guestfwd'
|
|
||||||
address="192.0.2.42"
|
|
||||||
port="4242"
|
|
||||||
/>
|
|
||||||
</channel>
|
</channel>
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' >
|
<gl enable='yes'/>
|
||||||
<gl enable='yes' />
|
|
||||||
</graphics>
|
</graphics>
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'>
|
<model type='cirrus' vram='9216' heads='1'>
|
||||||
@@ -125,18 +107,12 @@
|
|||||||
</rng>
|
</rng>
|
||||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||||
<source>
|
<source>
|
||||||
<address domain='0x0000'
|
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
|
||||||
bus='0x06'
|
|
||||||
slot='0x12'
|
|
||||||
function='0x5'/>
|
|
||||||
</source>
|
</source>
|
||||||
</hostdev>
|
</hostdev>
|
||||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||||
<source>
|
<source>
|
||||||
<address domain='0x0001'
|
<address domain='0x0001' bus='0x03' slot='0x00' function='0x0'/>
|
||||||
bus='0x03'
|
|
||||||
slot='0x00'
|
|
||||||
function='0x0'/>
|
|
||||||
</source>
|
</source>
|
||||||
</hostdev>
|
</hostdev>
|
||||||
<hostdev mode='subsystem' type='usb'>
|
<hostdev mode='subsystem' type='usb'>
|
||||||
@@ -152,9 +128,7 @@
|
|||||||
<usbdev class='0x0b' vendor='0x08e6' product='0x3437' version='2.00' allow='yes'/>
|
<usbdev class='0x0b' vendor='0x08e6' product='0x3437' version='2.00' allow='yes'/>
|
||||||
</redirfilter>
|
</redirfilter>
|
||||||
<watchdog model='i6300esb' action='reset'/>
|
<watchdog model='i6300esb' action='reset'/>
|
||||||
|
|
||||||
<smartcard mode='passthrough' type='spicevmc'/>
|
<smartcard mode='passthrough' type='spicevmc'/>
|
||||||
|
|
||||||
<tpm model='tpm-tis'>
|
<tpm model='tpm-tis'>
|
||||||
<backend type='passthrough'>
|
<backend type='passthrough'>
|
||||||
<device path='/dev/tpm0'/>
|
<device path='/dev/tpm0'/>
|
||||||
@@ -162,7 +136,6 @@
|
|||||||
</tpm>
|
</tpm>
|
||||||
<controller type='usb' model='nec-xhci' ports="4" />
|
<controller type='usb' model='nec-xhci' ports="4" />
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
<qemu:commandline>
|
<qemu:commandline>
|
||||||
<qemu:arg value='-device'/>
|
<qemu:arg value='-device'/>
|
||||||
<qemu:arg value='dummy-device'/>
|
<qemu:arg value='dummy-device'/>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory></memory>
|
<memory></memory>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='custom'>
|
<cpu mode='custom'>
|
||||||
<model fallback='allow'>SandyBridge</model>
|
<model fallback='allow'>SandyBridge</model>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel></kernel>
|
<kernel></kernel>
|
||||||
@@ -26,24 +22,16 @@
|
|||||||
<clock offset='utc'>
|
<clock offset='utc'>
|
||||||
</clock>
|
</clock>
|
||||||
<devices>
|
<devices>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory></memory>
|
<memory></memory>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'></model>
|
<model fallback='allow'></model>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel></kernel>
|
<kernel></kernel>
|
||||||
@@ -26,24 +22,16 @@
|
|||||||
<clock offset='utc'>
|
<clock offset='utc'>
|
||||||
</clock>
|
</clock>
|
||||||
<devices>
|
<devices>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory></memory>
|
<memory></memory>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'></model>
|
<model fallback='allow'></model>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel></kernel>
|
<kernel></kernel>
|
||||||
@@ -26,29 +22,21 @@
|
|||||||
<clock offset='utc'>
|
<clock offset='utc'>
|
||||||
</clock>
|
</clock>
|
||||||
<devices>
|
<devices>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
<tpm model='tpm-tis'>
|
<tpm model='tpm-tis'>
|
||||||
<backend type='passthrough'>
|
<backend type='passthrough'>
|
||||||
<device path='/dev/tpm0'/>
|
<device path='/dev/tpm0'/>
|
||||||
</backend>
|
</backend>
|
||||||
</tpm>
|
</tpm>
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
<uuid></uuid>
|
<uuid></uuid>
|
||||||
<memory></memory>
|
<memory></memory>
|
||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
|
|
||||||
|
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model'>
|
||||||
<model fallback='allow'></model>
|
<model fallback='allow'></model>
|
||||||
</cpu>
|
</cpu>
|
||||||
|
|
||||||
|
|
||||||
<os>
|
<os>
|
||||||
<type>hvm</type>
|
<type>hvm</type>
|
||||||
<kernel></kernel>
|
<kernel></kernel>
|
||||||
@@ -26,28 +22,20 @@
|
|||||||
<clock offset='utc'>
|
<clock offset='utc'>
|
||||||
</clock>
|
</clock>
|
||||||
<devices>
|
<devices>
|
||||||
|
|
||||||
|
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
|
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' />
|
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
<tpm model='tpm-crb'>
|
<tpm model='tpm-crb'>
|
||||||
<backend type='emulator' version='2.0'>
|
<backend type='emulator' version='2.0'>
|
||||||
</backend>
|
</backend>
|
||||||
</tpm>
|
</tpm>
|
||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
</domain>
|
</domain>
|
||||||
|
|||||||
Reference in New Issue
Block a user