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

vcsim fails to mark VM as template #965

Closed
Akasurde opened this issue Dec 14, 2017 · 0 comments
Closed

vcsim fails to mark VM as template #965

Akasurde opened this issue Dec 14, 2017 · 0 comments

Comments

@Akasurde
Copy link
Contributor

I am unable to mark VM as template using vcsim created VM.

Request: <?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><MarkAsTemplate xmlns="urn:vim25"><_this type="VirtualMachine">vm-61</_this></MarkAsTemplate></soapenv:Body>
</soapenv:Envelope>
2017/12/14 18:54:06 VirtualMachine:vm-61 does not implement: MarkAsTemplate
Response: <?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>VirtualMachine:vm-61 does not implement: MarkAsTemplate</faultstring><detail><Fault xmlns:XMLSchema-instance="http://www.w3.org/2001/XMLSchema-instance" XMLSchema-instance:type="MethodNotFound"><receiver type="VirtualMachine">vm-61</receiver><method>MarkAsTemplate</method></Fault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Python Traceback

python mark_vm_as_template.py
Traceback (most recent call last):
  File "mark_vm_as_template.py", line 11, in <module>
    vm.MarkAsTemplate()
  File "/Volumes/data/src/ansible/venv4/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 580, in <lambda>
    self.f(*(self.args + (obj,) + args), **kwargs)
  File "/Volumes/data/src/ansible/venv4/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 386, in _InvokeMethod
    return self._stub.InvokeMethod(self, info, args)
  File "/Volumes/data/src/ansible/venv4/lib/python2.7/site-packages/pyVmomi/SoapAdapter.py", line 1357, in InvokeMethod
    raise exc
pyVmomi.SoapAdapter.ParserError: 'xml document: <httplib.HTTPResponse instance at 0x10873ecf8> parse error at: line:2, col:507'

Python reproducer

from pyVmomi import vim
from vm_lib import get_obj, connect

content = connect()

vm = get_obj(content, [vim.VirtualMachine], 'DC0_H0_VM0')
vm.MarkAsTemplate()
anfernee pushed a commit to anfernee/govmomi that referenced this issue Dec 27, 2017
anfernee pushed a commit to anfernee/govmomi that referenced this issue Dec 27, 2017
anfernee pushed a commit to anfernee/govmomi that referenced this issue Dec 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants