Ask Your Question
0

Can't access single user mode via virsh console or novnc

asked 2013-12-06 18:46:45 -0500

mismith gravatar image

I'm running KVM as a hypervisor with the Openstack Havana release. Using the novnc console through horizon works great except when I drop a VM to single user. At that point I stay connected, but no input/output is received through vnc.

Additionally, by default I'm unable to use "virsh console" to get to the console. I've tried a few things to add a serial console (adding agetty to inittab, adding ttyS0 to /etc/securetty, etc) but this too doesn't work in a single user mode.

Does novnc console work for others when a KVM instances is in single user mode?

edit retag flag offensive close merge delete

Comments

I have the similar problem of unresponsive console response. In my case it's a problem where the system is asking to run fsck on /var partition when it can't fix of it's own. For that, it asks to enter root password to run fsck . But I've not been able to do so. Thanks

stacksam gravatar imagestacksam ( 2013-12-08 09:48:45 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
2

answered 2013-12-10 09:54:58 -0500

mismith gravatar image

I was able to get virsh console to work in single user by putting the following BEFORE the existing serial lines for the log file in the libvirt.xml for the instance:

<serial type='pty'>
  <target port='0'/>
</serial>
<console type='pty'>
  <target type='serial' port='0'/>
</console>

I also removed the existing:

<serial type="pty"></serial>

Then I had to "virsh destroy" and "virsh undefine" the VM, followed by a "virsh define libvirt.xml", a "virsh start domain" and a "nova reset-state domain --active". Once up, I was able to use virsh console to do the fsck. Then I shut everything back down and switched it back as it was so that the console logging would work again.

It might be possible to get both console and logging working together. I'll have to play around with that a bit more.

edit flag offensive delete link more
0

answered 2013-12-07 12:37:01 -0500

marafa gravatar image

virsh needs the parameters console=ttyS0 to be added to the kernel line in grub. as to input output maybe the keyboard setup is incorrect? does it work on normal init 3 or init 5 via novnc?

and finally, you are troubleshooting the symptoms. you should be troubleshooting the problem that led you to want to drop your vm to init 1

edit flag offensive delete link more

Comments

Thanks for the feedback, but yes, console=ttyS0 is already in my grub.conf. I/O via novnc works fine in other init modes. I'd prefer not to have to use single user, sometimes a VM filesystem needs an fsck (for example, when a hypervisor crashes loses power). As is, I can't fix it without.

mismith gravatar imagemismith ( 2013-12-09 09:57:06 -0500 )edit

Apply following patch to access VM console "https://bugs.launchpad.net/nova/+bug/1340518?comments=all"

Harsh Jain gravatar imageHarsh Jain ( 2014-11-25 07:57:47 -0500 )edit
0

answered 2014-11-25 07:57:06 -0500

Harsh Jain gravatar image

Apply following patch to access VM console. https://bugs.launchpad.net/nova/+bug/1340518?comments=all (https://bugs.launchpad.net/nova/+bug/...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2013-12-06 18:46:45 -0500

Seen: 3,903 times

Last updated: Nov 25 '14