You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 19 Feb 2014 at 6:38The text was updated successfully, but these errors were encountered: