Revision 55cc0a44 lib/hypervisor/hv_lxc.py

b/lib/hypervisor/hv_lxc.py
31 31
from ganeti import constants
32 32
from ganeti import errors # pylint: disable-msg=W0611
33 33
from ganeti import utils
34
from ganeti import objects
34 35
from ganeti.hypervisor import hv_base
35 36
from ganeti.errors import HypervisorError
36 37

  
......
374 375
    return self.GetLinuxNodeInfo()
375 376

  
376 377
  @classmethod
377
  def GetShellCommandForConsole(cls, instance, hvparams, beparams):
378
  def GetInstanceConsole(cls, instance, hvparams, beparams):
378 379
    """Return a command for connecting to the console of an instance.
379 380

  
380 381
    """
381
    return "lxc-console -n %s" % instance.name
382
    return objects.InstanceConsole(instance=instance.name,
383
                                   kind=constants.CONS_SSH,
384
                                   host=instance.primary_node,
385
                                   user=constants.GANETI_RUNAS,
386
                                   command=["lxc-console", "-n", instance.name])
382 387

  
383 388
  def Verify(self):
384 389
    """Verify the hypervisor.

Also available in: Unified diff