← Back to team overview

cloud-init team mailing list archive

Re: Using cloud-init on VMWare ESXI

 

Hello

> I'm trying to understand how to use cloud-init to apply an automatic installation on a VM in VMware
> esxi or bare-metal device.

I use cloud-init with both VMs (KVM/qemu) and on physical machines.

There are a couple of ways you could do this - if you search online there appear to be one or more implementations of metadata services or DataSources for VMware/VSphere.

Alternatively if you use the cloud-init NoCloud DataSource then you can supply YAML files (metadata, network, and user-data) for cloud-init to use at boottime. Typically these are provided via a separate ISO filesystem that you make available to the VM. This ISO is prepared using the cloud-localds utiliity that comes with the cloud-utils package.

Alternatively for NoCloud you can supply a FAT-formatted partition wih the YAML files. This is what I do for physical machines - I build a disk image of the operating system with an additional very small partition containing the YAML files. I then use 'dd' to write the OS image onto a machine's hard disk, tweak the YAML files (to set hostname, IP, etc) and then boot the machine and it magically configures itself.

In my case the OS images I prep are of Alpine Linux (and Debian as WIP) but you could do similar for Ubuntu.

Dermot


References