Revision 07813a9e lib/hypervisor/hv_kvm.py

b/lib/hypervisor/hv_kvm.py
52 52
    constants.HV_KERNEL_PATH,
53 53
    constants.HV_INITRD_PATH,
54 54
    constants.HV_ROOT_PATH,
55
    constants.HV_KERNEL_ARGS,
55 56
    constants.HV_ACPI,
56 57
    constants.HV_SERIAL_CONSOLE,
57 58
    constants.HV_VNC_BIND_ADDRESS,
......
219 220

  
220 221
    return data
221 222

  
222
  def _GenerateKVMRuntime(self, instance, block_devices, extra_args):
223
  def _GenerateKVMRuntime(self, instance, block_devices):
223 224
    """Generate KVM information to start an instance.
224 225

  
225 226
    """
......
281 282
      initrd_path = hvp[constants.HV_INITRD_PATH]
282 283
      if initrd_path:
283 284
        kvm_cmd.extend(['-initrd', initrd_path])
284
      root_append = 'root=%s ro' % instance.hvparams[constants.HV_ROOT_PATH]
285
      if instance.hvparams[constants.HV_SERIAL_CONSOLE]:
286
        kvm_cmd.extend(['-append', 'console=ttyS0,38400 %s' % root_append])
287
      else:
288
        kvm_cmd.extend(['-append', root_append])
285
      root_append = ['root=%s' % hvp[constants.HV_ROOT_PATH],
286
                     hvp[constants.HV_KERNEL_ARGS]]
287
      if hvp[constants.HV_SERIAL_CONSOLE]:
288
        root_append.append('console=ttyS0,38400')
289
      kvm_cmd.extend(['-append', ' '.join(root_append)])
289 290

  
290 291
    mouse_type = hvp[constants.HV_USB_MOUSE]
291 292
    if mouse_type:
......
435 436
    for filename in temp_files:
436 437
      utils.RemoveFile(filename)
437 438

  
438
  def StartInstance(self, instance, block_devices, extra_args):
439
  def StartInstance(self, instance, block_devices):
439 440
    """Start an instance.
440 441

  
441 442
    """
......
444 445
      raise errors.HypervisorError("Failed to start instance %s: %s" %
445 446
                                   (instance.name, "already running"))
446 447

  
447
    kvm_runtime = self._GenerateKVMRuntime(instance, block_devices, extra_args)
448
    kvm_runtime = self._GenerateKVMRuntime(instance, block_devices)
448 449
    self._SaveKVMRuntime(instance, kvm_runtime)
449 450
    self._ExecuteKVMRuntime(instance, kvm_runtime)
450 451

  

Also available in: Unified diff