lost and found ( for me ? )

KVM : how to connect BackTrack Linux 5 VM via virsh console

host OS : ubuntu 11.04
BT5 has been installed as VM on ubuntu 11.04 KVM

1. make ttyS0.conf file
root@bt:~# cat /etc/init/ttyS0.conf
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

root@bt:~# start ttyS0


2. edit grub.cfg

By default , grub.cfg is read-only , so give grub.cfg writable permissions.
root@bt:/boot/grub# ls -lh grub.cfg
-r--r--r-- 1 root root 3.4K 2011-05-20 17:18 grub.cfg

root@bt:/boot/grub# chmod 622 /boot/grub/grub.cfg

root@bt:/boot/grub# ls -lh grub.cfg
-rw--w--w- 1 root root 3.4K 2011-05-20 17:18 grub.cfg
edit grub.cfg ( add red line )
root@bt:/boot/grub# egrep console grub.cfg
       linux   /boot/vmlinuz-2.6.38 root=UUID=2ecef416-17e4-453d-a69b-7db7e3bcb5e1 ro   text splash nomodeset vga=791 console=ttyS0,115200n8

Reboot BT. you will be able to connect BT w/ virsh console like this.
virsh # list --all
Id 名前               状態
----------------------------------
 1 BT5                  実行中
 - SL6-vm1              シャットオフ
 - SL6-vm2              シャットオフ

virsh # console 1
Connected to domain BT5
エスケープ文字は  ^] です

BackTrack 5 - Code Name Revolution 32 bitbt ttyS0
bt login: root
Password:
Last login: Mon May 23 17:38:05 JST 2011 on tty1
Linux bt 2.6.38 #1 SMP Thu Mar 17 20:52:18 EDT 2011 i686 GNU/Linux

###################################################################
[*] Welcome to the BackTrack 5 Distribution, Codename "Revolution"

[*] Official BackTrack Home Page: http://www.backtrack-linux.org

[*] Official BackTrack Training : http://www.offensive-security.com
###################################################################

[*] To start a graphical interface, type "startx".
[*] The default root password is "toor".

root@bt:~#

2 comments:

  1. user:root
    pass:toor
    vinanuclear@yahoo.com
    0945952627
    in vietnam

    ReplyDelete
  2. i ve typed root in user but when i type toor the curser didnt move , i ve to press enter to move to the next line .. then i can type toor .. but after that the result is - login incorrect ... ever time i m facing same prob .. sombody help me or suggest me some thing

    ReplyDelete

Note: Only a member of this blog may post a comment.