Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GuestOS is missing on vm which was shut down #1014

Open
dmetzler1988 opened this issue May 2, 2023 · 2 comments
Open

GuestOS is missing on vm which was shut down #1014

dmetzler1988 opened this issue May 2, 2023 · 2 comments
Labels

Comments

@dmetzler1988
Copy link

Describe the bug

We have some VMs, which are in shut-down state some times. On these VMs no guestOS Informations was given by this pyvmomi tool. I had taken the credentials and SOAP requests from the SoapAdapter.py and pasted it into Postman to check, if there is an issue with pyvmomi or the vSphere API itself. If i send the SOAP requests directly to the vSphere API, i receive the GuetOS information in the response (tested it with the same VM which which was shut down). The pyvmomi response doesn't contain the guestOS information - it is empty.

I don't can find anything else instead of the shut-down-state, what could make an issue there.

I am not sure, if this is a wanted case, that a shut down vm doesn't can contain a vm.

Reproduction steps

  1. shut down a vm
  2. try to get the guestOS information via pyvmomi tool of the vm in shut-down-state
  3. try to make a manual SOAP request to the same vm via another tool (like Postman or SOAP-UI)

Expected behavior

The guestOS information should be also available with shut down vm's.

Additional context

I tried the pyvmomi versions 7.0, 7.0.3 and 8.0.0.1.2 - same issue on each version.

@karaatanassov
Copy link

karaatanassov commented Dec 29, 2023

Can you share the details of the SOAP request and Python code you used? PyVMOMI is usually a mere Python binding for the SOAP API.

@dmetzler1988
Copy link
Author

@karaatanassov The soap request will be sent to https://<our-url>/sdk with this body:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soapenv:Body>
        <RetrievePropertiesEx xmlns="urn:vim25">
            <_this type="PropertyCollector">propertyCollector</_this>
            <specSet>
                <propSet>
                    <type>VirtualMachine</type>
                    <all>false</all>
                    <pathSet>config</pathSet>
                </propSet>
                <objectSet>
                    <obj type="VirtualMachine">vm-123456</obj>
                    <skip>false</skip>
                </objectSet>
            </specSet>
            <options>
                <maxObjects>1</maxObjects>
            </options>
        </RetrievePropertiesEx>
    </soapenv:Body>
</soapenv:Envelope>

This soap request returns a guestFullName value - so its not empty.
If i inspect the pyVmomi code after the datas are fetched from the server, this value is empty. So its nothing on our side - seems something gone wrong on resolving data from the soap response into the object model of pyVmomi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants