I have cloned a module for virtual machines, but when I try to apply a virtual machine to a node, I get Error: Could not find a suitable provider for virt
, which is understandable given that the contents of init.pp specify that a virtualization-capable kernel should already be running (a Xen or OpenVZ kernel).
However, with the included init.pp, I'd expect a failure message somewhere when running puppet agent --test --debug
on the node:
class virt {
fail "testfail"
case $::virtual {
/^xen/: { include virt::xen }
#/^kvm/: { include virt::kvm }
/^openvzhn/: { include virt::openvz }
}
}
But it fails with the error above, Error: Could not find a suitable provider for virt
. My node definition:
node 'hostname' {
# common is a custom module including SSH keys, works fine
include common
virt { "1001":
memory => 1024,
cpus => 4,
tmpl_cache => "debian-6.0-x86_64",
ensure => running,
virt_type => "openvz"
}
}