Sha256: d8d3e3ce778b2b1aaa663f573fea3f0963b822263fc678d950669f7b8e88c780

Contents?: true

Size: 1.88 KB

Versions: 1

Compression:

Stored size: 1.88 KB

Contents

<domain type='<%= @domain_type %>'>
  <name><%= @name %></name>
  <memory><%= @memory_size %></memory>
  <vcpu><%= @cpus %></vcpu>

  <% if @nested %>
    <cpu mode='<%= @cpu_mode %>'>
      <% if @cpu_mode != 'host-passthrough' %>
        <model fallback='allow'>qemu64</model>
        <feature policy='optional' name='vmx'/>
        <feature policy='optional' name='svm'/>
      <% end %>
    </cpu>
  <% end %>

  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='hd'/>
    <kernel><%= @kernel %></kernel>
    <initrd><%= @initrd %></initrd>
    <cmdline><%= @cmd_line %></cmdline>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <devices>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='<%= @domain_volume_cache %>'/>
      <source file='<%= @domain_volume_path %>'/>
      <%# we need to ensure a unique target dev -%>
      <target dev='vda' bus='<%= @disk_bus %>'/>
    </disk>
<%# additional disks -%>
<% @disks.each do |d| -%>
    <disk type='file' device='disk'>
      <driver name='qemu' type='<%= d[:type] %>' cache='<%= d[:cache] %>'/>
      <source file='<%= d[:absolute_path] %>'/>
      <target dev='<%= d[:device] %>' bus='<%= d[:bus] %>'/>
<%# this will get auto generated by libvirt
      <address type='pci' domain='0x0000' bus='0x00' slot='???' function='0x0'/>
-%>
    </disk>
<% end -%>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <%# Video device -%>
    <graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='en-us' <%= @graphics_passwd%> />
      <video>
          <model type='<%= @video_type %>' vram='<%= @video_vram %>' heads='1'/>
      </video>
    <%#End Video -%>
  </devices>
</domain>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-libvirt-0.0.24 lib/vagrant-libvirt/templates/domain.xml.erb