Repository navigation
Fix direct-ESXi (no vCenter) connectivity - #1
Merged
Merged
Conversation
nfc_service() hardcoded the NfcService moref as "nfcService", which is correct for vCenter but wrong for a bare ESXi host (where the moref is "ha-nfc-service"). Connecting directly to ESXi therefore failed with vmodl.fault.ManagedObjectNotFound. Fixed by resolving the moref dynamically via an internal RetrieveInternalContent SOAP call, the same way real VDDK does it (confirmed by an SSL-hook capture of native VDDK connecting to a bare ESXi 8.0.3 host). Also fixes connect_authd() for tickets that omit `host`: on a direct-ESXi ticket the field is absent entirely (the authd endpoint is implicitly the same host already logged into), which previously caused a plain None passed to socket.create_connection. Validated end-to-end (ConnectEx + Open + Read, both nbd and nbdssl transports) against a live standalone ESXi 8.0.3 host with no vCenter in the topology. Full protocol details and the wire-level differences from the vCenter-mediated path are in docs/nfc_auth.md.
The OpenVixDiskLib integration tests currently expect vSphere credentials. We'll add a test class that specifically covers direct ESXi connections. An ESXi node will be picked from vSphere, using credentials from `.test_config.yaml`. If no ESXi credentials are provided, we'll try to use the default "root" user and the vSphere password.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Collected from cloudbase#3
Original author: doccaz
Original branch:
pr1-direct-esxiThis pull request is the open upstream change, retargeted at
replication_agent. It looks up the NFC service moref (ha-nfc-serviceon a standalone ESXi host) instead of hardcodingnfcService.