May 21, 2018

Hey Team,

Awesome Fling. Totally would love to see this productized in some way. One feature, which should be an easy fix, that the 6.5 GUI offers is to know what fields within the Host Customization are required and which are not. It would be nice to have this as an added item JSON mapping that is exported. Not sure if this is the right place to ask for this, but it was the only place that I know off. Again all, great work and would love to see this become more of a thing. Keep up the great work.

Thanks,

Shiraaz

Jul 14, 2017

Hi Eric, Mayur
I'm in the process of building a deployment solution for our ESXi-Hosts with vSphere Auto Deploy and Host Profiles. My target is a fully "unattended" installation. This is why "Host Profiles CLI" came into my focus.
Our Automation Platform is currently Windows based (PowerShell). This means I have to run Host Profiles CLI on Winodws. On the Requirements Page you mention "vCenter Server for Windows" - so I am confident that there is a possibility to do that. Unfortunately our vCenter is already migrated to VCSA.
I tried to met the prerequisites for "Host Profiles CLI" my own, but I'm stuck.
I installed Python for Windows 3.5.3 (also tried 3.6.1) and populated the PATH environment variable accordingly.
I then installed "pyVmomi" Version 6.5.0.2017.5.post1 with the command "pip install --upgrade pyVmomi" and also "pyVim" Version 0.0.20 with the command "pip install --upgrade pyVim".

When I try to run "src\hostprofilescli", I always get the same error about not being able to import "rbd" from pyVmomi:

D:\appl\hostprofilescli-1.0.0\src>hostprofilescli
Traceback (most recent call last):
File "hpcli_commands", line 19, in <module>
from pyVmomi import SoapStubAdapter, vim, vmodl, rbd, imagefactory
ImportError: cannot import name 'rbd'

Did I miss a prerequisite?

Thank you and kind regards
Cedric

Jan 24, 2018

Did you have a fix for this??

Jan 31, 2018

monkeyBoy, first you have to use Python 2 (I'm using 2.7.13) since Hostprofilecli uses a function calles "xrange()". In Python 3 this function was renamed to "range()".
Then you have to install the Python module "six" (I'm running version 1.11.0).
In addition you have to download the modules "pyVim" and "pyVmomi" from VCSA. You can find them under /usr/lib/vmware/site-packages/pyVim and /usr/lib/vmware/site-packages/pyVmomi. They have to be copied to your Phython install directory unter /Lib/site-packages/pyVim and /Lib/site-packages/pyVmomi.
Finally you have to set the Environment variable "VMWARE_PYTHON_BIN" to point to <pythoninstalldir>/python.exe.
And you should be good to go.

Jul 14, 2017

Cedric, there are a couple of different approaches you can use to run the utility on Windows. Let me get in touch with you via email to see which one works best for you. -Eric

May 12, 2017

vSAN Cluster export error
Trying this fling in a vSAN cluster and getting this error

2017-05-12 13:41:50,321[495][INFO] Adding dummy host with 1.1.1.1 in 'vim.ClusterComputeResource:domain-c631'
2017-05-12 13:41:50,608[495][ERROR] Failed to generate deployment template
2017-05-12 13:41:50,609[495][ERROR] (vim.fault.NotSupportedHostForVsan) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = "Host '1.1.1.1' does not support Virtual SAN.",
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) [],
productName = '',
productVersion = '',
hostName = '1.1.1.1'
}

Is there a special flag required for a vSAN cluster? Didn't see anything regarding support or not specific to vSAN.

May 12, 2017

FYI current environment is on 6.0 U2 but tested on a 6.5 environment with the same results.
I'm using Photon to test the utility but i don't think it matter?
Works great on 6.0 U2 and 6.5 with non vSAN clusters

May 12, 2017

Chris, thanks for your feedback. Currently, vSAN and Auto Deploy do not work together, so this deployment approach would be n/a today.

May 12, 2017

Hi Eric

Even in the situation autodeploy woud perform a statefull install?

Thanks!

May 12, 2017

Hi Chris,

Thanks for the feedback. With VSAN cluster, we have an issue with adding a disconnected stateless host in VC to a VSAN cluster to generate a deployment template. Stateful install happens much later in the stage when that disconnected stateless host boots using autodeploy.

If you don't have VSAN configuration in the host profile that you are using for this deployment, can you setup VSAN after the cluster has been deployed with stateful host. Create a cluster, attach the host profile, go through this deployment process, once all hosts are added to cluster as stateful host, enable VSAN on that cluster.

This is the only workaround I can think off in your case.

Thanks
Mayur

May 12, 2017

Hi Mayur,

I think this will work, need to further test but i needed the most was to get the customization from the profile so i can pre-propulate them. So i created a dummy cluster attached my profile and i'm able to export the customization. Next steps will be to test the import after.

Thanks for the explanation