Saturday, October 20

troubleshoot: no console access on openvz container

Hari ini server virtualisasi yang baru telah selesai disetup. beberapa template openvz pun sudah didownload. sekarang kita bisa buat container openvz yang baru.

Sayangnya, setelah setup container, start vm, kemudian klik tombol console, saya tidak dapat mengakses consolenya. ya, di console ada muncul output seperti normalnya komputer booting namun tidak ada prompt input username & password.

Selidik punya selidik, ternyata ini dikarenakan template vm yang tidak mensupport ini, sehingga kita perlu masuk vm tersebut dari host OS kemudian mengubah beberapa file disana.

jika guest OS menggunakan debian:

  1. masuk container:
    # vzctl enter 101
  2. edit /etc/inittab. add line:
    1:2345:respawn:/sbin/getty 38400 tty1
  3. restart container

jika guest OS menggunakan ubuntu 12.04:

  1. masuk container:
    # vzctl enter 101
  2. edit /etc/init/tty1.conf. add line:
    # tty1 – getty
    # This service maintains a getty on tty1 from the point the system is
    # started until it is shut down again.
    start on stopped rc RUNLEVEL=[2345]
    stop on runlevel [!2345]
    respawn
    exec /sbin/getty -8 38400 tty1
  3. restart container

jika guest OS menggunakan centos 5:

  1. masuk container:
    # vzctl enter 101
  2. edit /etc/inittab. add line:
    1:2345:respawn:/sbin/agetty tty1 38400 linux
  3. restart container

jika guest OS menggunakan centos 6:

  1. masuk container:
    # vzctl enter 101
  2. edit /etc/inittab. add line:
    # This service maintains a getty on tty1 from the point the system is
    # started until it is shut down again.
    start on stopped rc RUNLEVEL=[2345]
    stop on runlevel [!2345]
    respawn
    exec /sbin/agetty -8 tty1 38400
  3. restart container

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.