define virtual::kvm::manager::instance( $vg, $size, $ram, $udev = false, ) { exec { "kvm-creator-${name}": command => "/usr/local/sbin/kvm-creator create $name $vg $size $ram", user => "root", #creates => "/home/${name}/vms/${name}", creates => "/etc/sv/kvm/${name}", } exec { "update-service-kvm-${name}": command => "/usr/sbin/update-service --add /etc/sv/kvm/${name}", creates => "/etc/service/${name}", require => [ Exec["kvm-creator-${name}"], User["${name}"] ], } virtual::kvmx::instance { "$name": udev => $udev, require => Exec["kvm-creator-${name}"], } }