Govc is super cool, but sadly it doesn't fully work with my ESXi setup since my license doesn't have support for writing to the SDK endpoint. What I want is the ability create a new VM remotely, but for the free license of ESXi.
starts another new project…
I've been using a simple go program that allows me to SSH into my ESXi box to turn on/off VMs, but is very limited at the moment. The SSH method works for simple one-off commands, but has many problems. My naive solution is slow for multiple commands since it establishes a new SSH connection for each command. I'm thinking a keep-alive daemon will be useful for running multiple commands in sequence. Might be overkill MVP, so I'm going to stick that into the backlog until it's necessary.
Next steps will be parsing
I'm not entirely sure if this parser/grammar can be used for other outputs from various other ESXi commands, so this might be a waste.
This is a WIP right now, I'm using a simple output from one of the commands as my spec.
Also, I need to figure out a way to create a VM from the ESXi CLI.
My first guess is to create a VMX file then register it via the
vim-cmd solo/registervm command, but this will have to wait till the next blog post.
Now to finish up the parser/grammar.