cfengine/core — pull request #949 by ncharles (2013-09-13 18:03:12+00:00)
Title: Openvz support

Detect OpenVZ/Virtuozzo and Parallels Cloud Server, and define the following hard classes:
- virt_host_openvz: for the openVZ host
- virt_host_vz_vzps: for openVZ host, if the /bin/vzps tool is available
- virt_guest_openvz: for the openVZ guest

On the host:
```
# cf-promises/cf-promises -v | grep openvz
virt_host_openvz
```

Inside an OpenVZ container:
```
# cf-promises/cf-promises -v | grep openvz
virt_guest_openvz
```

On the OpenVZ host, the ps command list the processes on both host and containers, making the *processes* promise type unusable.
The tool /bin/vzps let you select the host or container you want to have the processes from; so this PR add detection for this tool on the host, and define the class *virt_host_vz_vzps*, and uses vzps instead of of ps

This is contains part of the code and naming discussion in https://github.com/cfengine/core/pull/582, and also part of the patch proposed by Liviu Damian http://pastebin.com/ipTeh1Mk / https://groups.google.com/forum/#!topic/help-cfengine/h098EgAusoA

This Pull request is targeted on 3.4 because it corresponds to my need, but I'd be happy to create a new pull request as well for Master