Skip to content

Commit

Permalink
Merge pull request #21 from jteehan/scvmmdeployfix
Browse files Browse the repository at this point in the history
[FIX] Configure Guest Services on new VM prior to power on
  • Loading branch information
dajohnso committed Mar 29, 2016
2 parents cc24d09 + 76a9b28 commit 69a8fc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mgmtsystem/scvmm.py
Expand Up @@ -272,10 +272,15 @@ def deploy_template(self, template, host_group, vm_name=None, **kwargs):
self.logger.info(" Deploying SCVMM VM `{}` from template `{}` on host group `{}`"
.format(vm_name, template, host_group))
self.run_script(script)
self.enable_virtual_services(vm_name)
self.start_vm(vm_name)
self.wait_vm_running(vm_name, num_sec=timeout)
return vm_name

def enable_virtual_services(self, vm_name):
self.run_script(
"Set-SCVirtualMachine -InstallVirtualizationGuestServices 1 -VM '{}' ".format(vm_name))

def mark_as_template(self, vm_name, library, library_share):
# Converts an existing VM into a template. VM no longer exists afterwards.
script = """
Expand Down

0 comments on commit 69a8fc3

Please sign in to comment.