npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pulumiverse/esxi-native

v1.0.0

Published

A Pulumi package for creating and managing ESXi resources

Downloads

221

Readme

Pulumi Native ESXi Provider

This repository crates a VMWare ESXi provider to provision VMs directly on an ESXi hypervisor without a need for vCenter or vSphere.

ci release

The repository is created based on the Terraform Provider terraform-provider-esxi. Thanks to the wonderful work done there by @josenk, I was able to build this provider for Pulumi users.

IMPORTANT NOTES!

Note for Pull Requests (PRs): When creating a pull request, please do it onto the MAIN branch which is the consolidated work-in-progress branch. Do not request it onto another branch.

PLEASE Read our branch guide to know about our branching policy

CONTRIBUTING

IMPORTANT: The contribution details are stated here

Requirements

  • The VMware ovftool is required to be installed in the workstation where pulumi will be executed.

    NOTE: ovftool installer for windows doesn't put ovftool.exe in your path. You will need to manually set your path.

  • You MUST enable ssh access on your ESXi hypervisor.

    Google 'How to enable ssh access on esxi'

    • In general, you should know how to use terraform, esxi and some networking...
  • You will most likely need a DHCP server on your primary network if you are deploying VMs with public OVF/OVA/VMX images. (Sources that have unconfigured primary interfaces.)
  • The source OVF/OVA/VMX images must have open-vm-tools or vmware-tools installed to properly import an IPAddress. (you need this to run provisioners)

Features and Compatibility

  • Source image can be a clone of a VM or local vmx, ovf, ova file. This provider uses ovftool, so there should be a wide compatibility.
  • Supports adding your VM to Resource Pools to partition CPU and memory usage from other VMs on your ESXi host.
  • Pulumi will Create, Destroy, Update & Import Resource Pools.
  • Pulumi will Create, Destroy, Update & Import Virtual Machines.
  • Pulumi will Create, Destroy, Update & Import Virtual Disks.
  • Pulumi will Create, Destroy, Update & Import Virtual Switches.
  • Pulumi will Create, Destroy, Update & Import Port Groups.

Why this provider?

If you do not have a vCenter or vSphere, especially if you are running a home lab, these services are expensive, and maybe you cannot have them, but the ESXi is free, so that is the reason behind it!

How to install

The Pulumi ESXi Native provider is available as a package in all Pulumi languages:

Provider Binary

The ESXi Native provider binary is a third party binary. It can be installed using the pulumi plugin command.

pulumi plugin install resource esxi-native <version> --server github://api.github.com/pulumiverse

Replace the <version> string with your desired version.

How to use and configure

In order to use the provider, we need to provide SSH credentials to the ESXi Host

Set configuration using pulumi config

Remember to pass --secret when setting password so that it is properly encrypted:

$ pulumi config set esxi-native:username <username>
$ pulumi config set esxi-native:password <password> --secret
$ pulumi config set esxi-native:host <host IP or FQDN>

Set configuration using environment variables

For bash users

$ export ESXI_USERNAME=<YOUR_ESXI_USERNAME>
$ export ESXI_PASSWORD=<YOUR_ESXI_PASSWORD>
$ export ESXI_HOST=<YOUR_ESXI_HOST_IP>

For powershell users

> $env:ESXI_USERNAME = "<YOUR_ESXI_USERNAME>"
> $env:ESXI_PASSWORD = "<YOUR_ESXI_PASSWORD>"
> $env:ESXI_HOST = "<YOUR_ESXI_HOST>"

Getting started example

import * as esxi from "@pulumiverse/esxi-native";


export = async () => {
    const vm = new esxi.VirtualMachine("vm-test", {
        diskStore: "nvme-ssd-datastore",
        networkInterfaces: [
            {
                virtualNetwork: "default"
            }
        ]
    });

    return {
        "id": vm.id,
        "name": vm.name,
        "os": vm.os,
    };
}

Known issues with vmware_esxi

  • Using a local source vmx files should not have any networks configured. There is very limited network interface mapping abilities in packer for vmx files.
    It's best to simply clean out all network information from your vmx file. The plugin will add network configuration to the destination vm guest as required.
  • pulumi import cannot import the guest disk type (thick, thin, etc.) if the VM is powered on and cannot import the guest ipAddress if it's powered off.
  • Only numVCpus are supported, numCores is not.
  • Doesn't support CD-ROM or floppy.
  • Doesn't support Shared bus Interfaces, or Shared disks.
  • Using an incorrect password could lockout your account using default esxi pam settings.
  • Don't set startupTimeout or shutdownTimeout to 0 (zero). It's valid, however it will be changed to default values.