virsh console to KVM

513 Views Asked by At

When logged in through virsh console on to KVM. hostname is not shown properly in bash prompt. We are using 63 character hostname.

bash_prompt

KVM Guest OS: Red Hat Enterprise Linux Server release 7.9 (Maipo) Host OS: Red Hat Enterprise Linux Server release 7.6 (Maipo)

I don't see above issue when logged in using ssh or virt-manager

hostname i'm using is Nikiabcdefdhijklmnopqrst898hd-uvwxyz-jkkdjkjdsdadjkjkkjdkjsdj90

1

There are 1 best solutions below

0
On BEST ANSWER

adding below line in /etc/bashrc resolved the issue.

resize > /dev/null 2>&1

'xterm' rpm provides resize binary.