Revision 323f9095 lib/hypervisor/hv_kvm.py

b/lib/hypervisor/hv_kvm.py
502 502
        data.append(info)
503 503
    return data
504 504

  
505
  def _GenerateKVMRuntime(self, instance, block_devices):
505
  def _GenerateKVMRuntime(self, instance, block_devices, startup_paused):
506 506
    """Generate KVM information to start an instance.
507 507

  
508 508
    """
......
523 523
    kvm_cmd.extend(['-daemonize'])
524 524
    if not instance.hvparams[constants.HV_ACPI]:
525 525
      kvm_cmd.extend(['-no-acpi'])
526
    if startup_paused:
527
      kvm_cmd.extend(['-S'])
526 528

  
527 529
    hvp = instance.hvparams
528 530
    boot_disk = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_DISK
......
901 903
    for filename in temp_files:
902 904
      utils.RemoveFile(filename)
903 905

  
904
  def StartInstance(self, instance, block_devices):
906
  def StartInstance(self, instance, block_devices, startup_paused):
905 907
    """Start an instance.
906 908

  
907 909
    """
908 910
    self._CheckDown(instance.name)
909
    kvm_runtime = self._GenerateKVMRuntime(instance, block_devices)
911
    kvm_runtime = self._GenerateKVMRuntime(instance, block_devices, startup_paused)
910 912
    self._SaveKVMRuntime(instance, kvm_runtime)
911 913
    self._ExecuteKVMRuntime(instance, kvm_runtime)
912 914

  

Also available in: Unified diff