Bug 805199

Summary: vsphere push error
Product: [Retired] CloudForms Cloud Engine Reporter: dgao
Component: imagefactoryAssignee: Ian McLeod <imcleod>
Status: CLOSED NOTABUG QA Contact: Martin Kočí <mkoci>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: akarol, brad, dajohnso, deltacloud-maint, dgao, ssachdev, whayutin
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-17 21:05:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description dgao 2012-03-20 16:32:32 UTC
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).'

Comment 1 Ian McLeod 2012-03-21 18:51:28 UTC
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

Comment 2 wes hayutin 2012-04-17 21:05:47 UTC
not a bug