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

pysphere.resources.vi_exception.VIException: [Task Error]: The object has already been deleted or has not been completely created #52

Open
GoogleCodeExporter opened this issue Apr 14, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Test that code
2.
3.

What is the expected output? What do you see instead?
The Virtual machine getting deployed from template

What version of the product are you using? On what operating system?
vSphere 5.5

Please provide any additional information below.

#Create new Virtual machine from template
from pysphere import VIServer
server = VIServer()
server.connect("host", "username", "passwd", trace_file="debug.txt")

#Set Variables
sHost = "host"
sDataStore = "ovh4-2-HDD2TB"

#Get Resource Pools
resource_pools = server.get_resource_pools()
a_rp = resource_pools.keys()[0]

#Define Template
template = server.get_vm_by_name("Windows Server 2008 R2 Standard #2")

#Define new Virtual machine name
newMachineName = "Test Machine"

#Deploy new virtual machine
newVirtualMachine = template.clone(newMachineName, resourcepool=a_rp, 
host=sHost)


#Get Status
print newVirtualMachine.get_status()

#Close server connection
server.disconnect()

It gives the following output: 
pysphere.resources.vi_exception.VIException: [Task Error]: The object has 
already been deleted or has not been completely created

Original issue reported on code.google.com by [email protected] on 19 Feb 2014 at 6:38

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

1 participant