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