Revision c4fbefc8

b/lib/hypervisor/hv_kvm.py
57 57
      if not os.path.exists(mydir):
58 58
        os.mkdir(mydir)
59 59

  
60
  def _InstanceMonitor(self, instance_name):
61
    """Returns the instance monitor socket name
62

  
63
    """
64
    return '%s/%s.monitor' % (self._CTRL_DIR, instance_name)
65

  
66
  def _InstanceSerial(self, instance_name):
67
    """Returns the instance serial socket name
68

  
69
    """
70
    return '%s/%s.serial' % (self._CTRL_DIR, instance_name)
71

  
60 72
  def _WriteNetScript(self, instance, seq, nic):
61 73
    """Write a script to connect a net interface to the proper bridge.
62 74

  
......
229 241
    # How do we decide whether to have it or not?? :(
230 242
    #"vnc_bind_address",
231 243
    #"network_port"
232
    base_control = '%s/%s' % (self._CTRL_DIR, instance.name)
233
    monitor_dev = 'unix:%s.monitor,server,nowait' % base_control
244
    monitor_dev = 'unix:%s,server,nowait' % \
245
      self._InstanceMonitor(instance.name)
234 246
    kvm_cmd.extend(['-monitor', monitor_dev])
235
    serial_dev = 'unix:%s.serial,server,nowait' % base_control
247
    serial_dev = 'unix:%s,server,nowait' % self._InstanceSerial(instance.name)
236 248
    kvm_cmd.extend(['-serial', serial_dev])
237 249

  
238 250
    result = utils.RunCmd(kvm_cmd)
......
270 282

  
271 283
    if not utils.IsProcessAlive(pid):
272 284
      utils.RemoveFile(pid_file)
285
      utils.RemoveFile(self._InstanceMonitor(instance.name))
286
      utils.RemoveFile(self._InstanceSerial(instance.name))
273 287

  
274 288
  def RebootInstance(self, instance):
275 289
    """Reboot an instance.

Also available in: Unified diff