vsphere_guest only supports vcenter?

Hey All,

I was playing around with the vsphere_guest module today and it appears that it only supports creating VMs if the ESXi host is actually joined to vcenter. I don’t think that this is a limitation of pysphere. At least one of the reasons for it not working seems to be a requirement for passing a Datacenter string to the module. This wouldn’t exist on a standalone ESXi host that wasn’t joined to a vcenter system.

I guess I have two questions:

  1. Am I correct in my findings that standalone ESXi hosts aren’t supported?
  2. Is this a by-design thing? Or could I work on the module to add ESXi support and submit a pull request? I’d be more than willing to do the work if it was welcome.

Nathan

Try Enterprise R Now!
Get a 14 Day Free Trial of Revolution R Enterprise on AWS Marketplace

Goal was to get vcenter going first and foremost.

I’m totally open to changes to make it support raw ESX, that would be quite welcome!

Cool! I’ll get working on that.

On a related note, do you think there would be any demand for a hyper-v module? I’d be willing to start work on that if there isn’t already development being done on it.

Nathan

Hi there,

Just found this thread and I wonder whether this raw esx modules is already in place, if so, where can I find further details?

Thanks so much

i've used it with ESXI, for some options you just have to use a
default resource when it is vcenter specific.

Cool! I was able to run some commands:

`

HI!

Could you give an example on how to create vm on just esxi , without a vcenter.

All my attempts have failed this far.

Regards
Alland

Hi all,

Does anyone have any example of creating vm and/or cloning a VM with the ESXi free version (without vcenter) using Ansible?

Thanks so much for your help.

Regards,
Alex

Hello Alex,

i was searching for a solution to the same problem you’re facing. I finally made it, i got a running vm. Here i provide the steps i think are necessary.

  1. Make sure you can login to your ESXI with ssh:
    `

    ssh root@esxi.default.de

    `

  2. Create inventory file containing ESXI Host (replace esxi.default.de with your esxi hostname):
    `

    cat inventory

    [esxi]
    esxi.default.de

    `

  3. Make sure you maintained the ESXI Hostname in vsphere client (navigate to Configuration → DNS and Routing → Change (link in the top right) → set here hostname and domain

  4. Create a playbook like this (Credit to Michael Hampton and user3796292):
    `

    cat newvm.yml

Hi Matthias,

This is very helpful. Thank You very much for the detailed instruction.

Regards,
Alex

I can confirm this ansible playbook works! I struggled for a few days trying to figure out how to bypass vcenter and couldn’t tell from the raw python on git if it was required. I was able to create a vm just now. Thank you for the post and directions. Especially the DNS part because mine was wrong.