Skip to content

Commit

Permalink
[FIX] Configure Guest Services on new VM prior to power on
Browse files Browse the repository at this point in the history
  • Loading branch information
jteehan committed Mar 28, 2016
1 parent cc24d09 commit 76a9b28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mgmtsystem/scvmm.py
Original file line number Diff line number Diff line change
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 76a9b28

Please sign in to comment.