Hide Forgot
2012-03-20 12:27:52,905 DEBUG imgfac.builders.BaseBuilder.RHEL6_vsphere_Builder thread(7c8cccf9) Message: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_vsphere_Builder.py", line 245, in push_image_upload credentials) File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_vsphere_Builder.py", line 232, in vmware_push_image_upload guest_id='otherLinux64Guest', imagefilename=input_image) File "/usr/lib/python2.6/site-packages/imgfac/VMWare.py", line 192, in import_vm self.vim.invoke('MarkAsTemplate', _this=lease.info.entity) File "/usr/lib/python2.6/site-packages/psphere/vim25.py", line 54, in invoke result = self.vsoap.invoke(method, _this=_this, **kwargs) File "/usr/lib/python2.6/site-packages/psphere/soap.py", line 45, in invoke result = getattr(self.client.service, method)(**kwargs) File "/usr/lib/python2.6/site-packages/suds/client.py", line 542, in __call__ return client.invoke(args, kwargs) File "/usr/lib/python2.6/site-packages/suds/client.py", line 602, in invoke result = self.send(soapenv) File "/usr/lib/python2.6/site-packages/suds/client.py", line 657, in send result = self.failed(binding, e) File "/usr/lib/python2.6/site-packages/suds/client.py", line 712, in failed r, p = binding.get_fault(reply) File "/usr/lib/python2.6/site-packages/suds/bindings/binding.py", line 265, in get_fault raise WebFault(p, faultroot) WebFault: Server raised fault: 'The attempted operation cannot be performed in the current state (Powered on).'
dgao, As discussed on chat, I have to take vsphere at its word here. What it is saying is that the VM we create during the image push was powered on before we were able to mark it as a Template. Once a VM is running, it cannot have the Template flag set. We do not power on the VM that we create. I have never seen this before and the only way I know that this might happen is if the machine were manually powered on at the vsphere console or via the DC API. Is this repeatable? If so, can you watch it from a vsphere console and see if you can figure out what is causing the VM to be powered on? -Ian
not a bug