libvirt

A Pulumi provider that lets you provision servers on a libvirt host using Pulumi.

See the full API documentation for complete details of the available libvirt provider APIs.

Requirements

Please note, there is a requirement to have libvirt on the machine using the libvirt provider. You can install this as follows:

$ brew install libvirt

Example

const libvirt = require("@pulumi/libvirt")

const myPool = new libvirt.Pool("test", {
  type: "dir",
  path: "/home/user/cluster_storage"
})
import * as libvirt from "@pulumi/libvirt";

const myPool = new libvirt.Pool("test", {
  type: "dir",
  path: "/home/user/cluster_storage"
})
import pulumi_libvirt as libvirt

pool = libvirt.Pool("demo-py-pool", type="dir", path="/home/user/cluster_storage")
import (
  "github.com/pulumi/pulumi-libvirt/sdk/go/libvirt"
  "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
  pulumi.Run(func(ctx *pulumi.Context) error {
    pool, err := libvirt.NewPool(ctx, "cluster", &libvirt.PoolArgs{
        Type: pulumi.String("dir"),
        Path: pulumi.String("/home/user/cluster_storage"),
    })
    if err != nil {
      return err
    }

    return nil
  })
}
using System.Collections.Generic;
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Libvirt;

class Program
{
    static Task Main() =>
        Deployment.Run(() => {
          var cluster = new Libvirt.Pool("cluster", new Libvirt.PoolArgs
          {
              Type = "dir",
              Path = "/home/user/cluster_storage",
          });
        });
}

Libraries

The following packages are available in packager managers:

The libvirt provider is open source and available in the pulumi/pulumi-libvirt repo.