blob: dd8609e25fe2b9cb638eec421c60cc44fb6ad396 [file] [log] [blame]
Ales Komarekefc4f0f2015-03-06 15:48:25 +01001
2=======
3Libvirt
4=======
5
6Sample pillars
7==============
8
9simple libvirt server
10
11
12.. code-block:: yaml
13
14 libvirt:
15 server:
16 enabled: true
Ales Komarek6419a8e2015-03-06 16:27:18 +010017 virtualization:
18 - kvm
19 network:
20 default:
21 ensure: absent
Ales Komarekefc4f0f2015-03-06 15:48:25 +010022
23.. code-block:: yaml
24
25 libvirt:
26 server:
27 enabled: true
28 network:
29 default:
30 ensure: absent #present, running, stopped, absent
31 mydefault:
32 xml: |
33 <network>
34 <name>mydefault</name>
35 <bridge name="virbr0"/>
36 <forward/>
37 <ip address="192.168.122.1" netmask="255.255.255.0">
38 <dhcp>
39 <range start="192.168.122.2" end="192.168.122.254"/>
40 </dhcp>
41 </ip>
42 </network>
43 ovs-net:
44 autostart: False
45 xml: |
46 <network>
47 <name>ovs-net</name>
48 <forward mode='bridge'/>
49 <bridge name='ovsbr0'/>
50 <virtualport type='openvswitch'>
51 <parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
52 </virtualport>
53 </network>
54
55.. code-block:: yaml
56
57 libvirt:
58 server:
59 enabled: true
60 pool:
61 virtimages:
62 type: dir
63 path: /var/lib/libvirt/images
64 xml: |
65 <pool type="dir">
66 <name>virtimages</name>
67 <target>
68 <path>/var/lib/libvirt/images</path>
69 </target>
70 </pool>
71 virtimages2:
72 ensure: absent
73 type: dir
74 path: /var/lib/libvirt/images2
75 xml: |
76 <pool type="dir">
77 <name>virtimages2</name>
78 <target>
79 <path>/var/lib/libvirt/images2</path>
80 </target>
81 </pool>
82
83Read more
84=========
85
86* https://github.com/bechtoldt/saltstack-libvirt-formula