Merge "Stop cluster VMs when building basedisk"

This commit is contained in:
Jenkins
2017-05-25 10:42:15 +00:00
committed by Gerrit Code Review
3 changed files with 5 additions and 3 deletions

View File

@@ -223,6 +223,9 @@ def main():
if conf.wbatch:
wbatch.wbatch_reset()
if conf.do_build and not conf.leave_vms_running:
vm.stop_running_cluster_vms()
if conf.do_build and install_base.base_disk_exists():
if args.target == "basedisk":
print("Basedisk exists: %s" % conf.get_base_disk_name())

View File

@@ -65,9 +65,6 @@ def get_next_prefix(dir_path, suffix, digits=3):
def create_host_networks():
if conf.do_build and not conf.leave_vms_running:
vm.stop_running_cluster_vms()
if conf.wbatch:
wbatch.wbatch_begin_hostnet()
cnt = 0

View File

@@ -192,6 +192,8 @@ def vm_acpi_shutdown(vm_name):
# Shut down all VMs in group VM_GROUP
# Note: This function must be called when no Windows batch file is open for
# writing (wbatch_write will ignore all these calls).
def stop_running_cluster_vms():
# Get VM ID from a line looking like this:
# "My VM" {0a13e26d-9543-460d-82d6-625fa657b7c4}