Chef Infra Language: Checking Hypervisors

[edit on GitHub]

Chef Infra Client 15.8 and later include a number of helper methods for checking if a hypervisor host or guest.

guest?

Determine if the current node is running under any virtualization environment.

hypervisor?

Determine if the current node supports running guests under any virtualization environment.

physical?

Determine if the current node is NOT running under any virtualization environment (bare-metal or hypervisor on metal).

kvm?

Determine if the current node is a KVM guest.

kvm_host?

Determine if the current node is a KVM host.

lxc?

Determine if the current node is a LXC-based container.

lxc_host?

Determine if the current node is a LXC host.

parallels?

Determine if the current node is running under Parallels Desktop.

parallels_host?

Determine if the current node is a Parallels Desktop host.

vbox?

Determine if the current node is a VirtualBox guest.

vbox_host?

Determine if the current node is a VirtualBox host.

vmware?

Determine if the current node is a VMWare guest.

vmware_host?

Determine if the current node is VMware host.

openvz?

Determine if the current node is an openvz guest.

openvz_host?

Determine if the current node is an openvz host.

vagrant?

Determine if the current node is running as a vagrant guest.

vagrant_key?

Check if the vagrant key exists on the +node+ object. Note: This key is no longer populated by vagrant, but it is kept around for legacy purposes.

vagrant_domain?

Check if vagrantup.com is included in the node’s domain.

vagrant_user?

Check if the system contains a vagrant user.

© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/infra_language/checking_hypervisors/