SmartState Analysis through vSphere (eg. with no connection to host)

Continuing the discussion from SmartState Analysis on Vmware Virtual Machines not working:

Context: I want to manage a VMware vSphere environment that does not allow to connect to ESXi, only vCenter. Thus, I modified scan_via_host to false, to perform SmartState Analysis through vCenter. However, connection to the host still seems to be required.

I have traced down the issue a bit further.

When I launch a SmartState Analysis, at some point in the process, CloudForms tries to connect to host on port 902, even with scan_via_host set to false.

I have found this document, that explains that VIX guest operations are meant to be performed via a connection to host on port 902. Until VIX API 5, that folded VIX guest operations into the vSphere API, removing the need to connect to host:902.

It sounds great as it is exactly the behaviour I would expect from scan_via_host: false. Unfortunately, it still tries to connect to host:902.

Thus, I wonder which version is used and if vSphere API supports mounting VM snapshot.

The following pull request make the situation clearer :

Apparently, vCenter returns a handler pointing to the host and then ManageIQ uses this handler to access the snapshoted disk. It seems that bypassing the hosts is not possible at the moment.

This is all true, it only authenticates through vCenter, all the traffic goes directly to/from the host.

We haven’t looked into using the vSphere API to perform VIX operations, but there may be issues in doing that as well - load on the vCenter server, overhead in transferring binary data using a SOAP API, etc.

This kind of feature would be really interesting to address vSphere-as-a-Service providers. Users should be warned of performance considerations. I change the topic to “Development” to continue the discussion. If we could issue a blueprint, it could be good.

1 Like