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