You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.markdown
+85-26
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,15 @@ Puppet Module to manage virtual machines. Provides a the type: `virt`.
6
6
7
7
### virt
8
8
9
-
Manage virtual environments. [Xen][1], [KVM][2], and [OpenVZ][3]hypervisors are supported, which of the first three uses [libvirt][4] as provider.
10
-
This module is the result of my work at GSoC 2010. I thank [Reliant Security][5] for funding the OpenVZ provider development.
9
+
Manage virtual environments. [Xen][1], [KVM][2], [OpenVZ][3], and [LXC][4]hypervisors are supported, which of the first three uses [libvirt][5] as provider.
10
+
This module is the result of my work at GSoC 2010. I thank [Reliant Security][6] for funding the OpenVZ provider development.
11
11
12
12
[1]: http://xen.org"Xen® Hypervisor"
13
13
[2]: http://www.linux-kvm.org/"Kernel Based Virtual Machin"
**Autorequires:** If Puppet is managing Xen or KVM guests, the virt resource will autorequire `libvirt` library.
19
20
@@ -38,6 +39,24 @@ Note that some values can be specified as an array of values:
38
39
interfaces => ["eth0", "eth1"]
39
40
}
40
41
42
+
LXC Example:
43
+
44
+
virt { 'lxc1':
45
+
ensure => running,
46
+
os_template => 'ubuntu',
47
+
provider => 'lxc'
48
+
}
49
+
50
+
# clone from lxc1
51
+
virt { 'lxc2':
52
+
ensure => running,
53
+
clone => 'lxc1',
54
+
snapshot => true,
55
+
provider => 'lxc',
56
+
require => Virt['lxc1']
57
+
}
58
+
59
+
41
60
#### Features
42
61
43
62
-*disabled*: The provider can disable guest start.
@@ -54,29 +73,32 @@ Note that some values can be specified as an array of values:
54
73
-*manages_devices*: The provider can give the guest an access to a device.
55
74
-*manages_users*: The provider manage guest's users and passwords.
56
75
-*manages_behaviour*: The provider manage the quest's behaviour for reboot, crash and shutdown.
57
-
-*initial_config*: The provider can receive a config file with default values for VE creation.
76
+
-*initial_config*: The provider can receive a config file with default values for VE or lxc creation.
58
77
-*storage_path*: The provider can set the path to storage and mount VE files.
59
-
60
-
61
-
Features \ Provider | libvirt | openvz |
62
-
-------------------- | ------- | ------ |
63
-
disabled | | *X* |
64
-
cpu_fair | | *X* |
65
-
disk_quota | | *X* |
66
-
pxe | *X* | |
67
-
iptables | | *X* |
68
-
graphics | *X* | |
69
-
clocksync | *X* | |
70
-
boot_params | *X* | |
71
-
manages_resources | | *X* |
72
-
manages_capabilities | | *X* |
73
-
manages_features | | *X* |
74
-
manages_devices | | *X* |
75
-
manages_users | | *X* |
76
-
manages_behaviour | *X* | |
77
-
initial_config | | *X* |
78
-
storage_path | | *X* |
79
-
78
+
-*cloneable*: The provider can create clones of other instances
79
+
-*backingstore*: The provider can use a backingstore such as lvm or btrfs
80
+
81
+
82
+
Features \ Provider | libvirt | openvz | lxc |
83
+
-------------------- | ------- | ------ | ------|
84
+
disabled | | *X* | |
85
+
cpu_fair | | *X* | |
86
+
disk_quota | | *X* | |
87
+
pxe | *X* | | |
88
+
iptables | | *X* | |
89
+
graphics | *X* | | |
90
+
clocksync | *X* | | |
91
+
boot_params | *X* | | |
92
+
manages_resources | | *X* | |
93
+
manages_capabilities | | *X* | |
94
+
manages_features | | *X* | |
95
+
manages_devices | | *X* | |
96
+
manages_users | | *X* | |
97
+
manages_behaviour | *X* | | |
98
+
initial_config | | *X* | *X* |
99
+
storage_path | | *X* | |
100
+
cloneable | | | *X* |
101
+
backingstore | | | *X* |
80
102
81
103
#### Parameters
82
104
@@ -175,6 +197,16 @@ For OpenVZ provider, available values are:
175
197
*`ubuntu-10.10`: Ubuntu 10.10
176
198
*`ubuntu-11.04`: Ubuntu 11.04
177
199
200
+
For LXC provider, available values on Ubuntu Precise are:
201
+
202
+
*`busybox`
203
+
*`debian`
204
+
*`fedora`
205
+
*`opensuse`
206
+
*`sshd`
207
+
*`ubuntu`
208
+
*`ubuntu-cloud`
209
+
178
210
Also, you can use a custom value with your custom template name. Example: `my-customized-ubuntu-10` or `fedora-mycompany`.
179
211
180
212
When using OpenVZ provider, the template for the new guest will be automaticaly downloaded if don't already exists. It will download from official OpenVZ repository or from URL specified at `tmpl_repo` parameter.
@@ -186,6 +218,7 @@ Available providers are:
186
218
187
219
***openvz**: Guest management for OpenVZ guests. Supported features: `disabled`, `cpu_fair`, `disk_quota`, `iptables`, `manages_resources`, `manages_capabilities`, `manages_features`, `manages_devices` and `manages_users`.
188
220
***libvirt**: Guest management for Xen and KVM guests. Note that you will need to install the `libvirt` Ruby library. Supported features: `pxe`, `graphics`, `clocksync`, `boot_params` and `manages_behaviour`
*`xen_paravirt`: This guest should be a paravirtualized guest. It requires hardware virtualization support
197
230
*`kvm`: When installing a QEMU guest, make use of the KVM or KQEMU kernel acceleration capabilities if available. Use of this option is recommended unless a guest OS is known to be incompatible with the accelerators.
198
231
*`openvz`: When defining an OpenVZ guest, the `os_template` paramenter must be defined.
232
+
*`lxc`: When defining an lxc guest, the `os_template` paramenter must be defined.
233
+
199
234
The values `xen_fullyvirt`, `xen_paravirt` and `kvm` will use libvirt as provider. `openvz` will use the `openvz` provider.
200
235
201
236
##### xml_file
@@ -216,8 +251,14 @@ Requires features `storage_path`.
216
251
217
252
##### configfile
218
253
254
+
OpenVZ:
255
+
219
256
If specified, values from example configuration file `/etc/vz/conf/ve-<VALUE>.conf-sample` are put into the container configuration file. If this container configuration file already exists, it will be removed.
220
257
258
+
LXC:
259
+
260
+
Specify the configuration file to configure the virtualization and isolation functionalities for the container
desc"If specified, values from example configuration file /etc/vz/conf/ve-<VALUE>.conf-sample are put into the container configuration file. If this container configuration file already exists, it will be removed."
174
184
185
+
# FIXME: VZ validation interferes with lxc configfiles
0 commit comments