SYS: Access a virtual machine’s console.

Share this link

To access the virtual machine’s console under X-Window, type:

# virt-manager

If you aren’t under X-Window, there is another way to access a virtual machine’s console: you have to create a serial console.

On the virtual machine, add the following line at the end of the /etc/inittab file:

# echo "S0:12345:respawn:/sbin/agetty ttyS0 115200" >>/etc/inittab

Add ‘console=ttyS0‘ at the end of the kernel lines in the /boot/grub/grub.conf file:

# grubby --update-kernel=ALL --args="console=ttyS0"

Allow root to connect at the console:

# echo "ttyS0" >>/etc/securetty

Now, reboot the virtual machine:

# reboot

Connect to the virtual machine’s console (here vm.example.com):

# virsh console vm.example.com
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Leave a Reply

RHCSA7: Task of the day

Allowed time: 15 minutes.
Get an iso image of CentOS 7 (or a DVD) and set up a local repository.

RHCE7: Task of the day

Allowed time: 10 minutes.
Configure a system to forward all email to a central mail server at 192.168.1.1 (change the IP address accordingly).

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...

Archives