0

How to start a KVM-guest as single user mode?

When I tried to start the VM as sigle user mode, it displayed "Booting a command line" on the screen and got stucked. This guest VM starts fine as multi user mode.

Here is the procedure I did:

  1. Start a guest VM on a Host.

    $ virsh start --console myguestvm
    
  2. Select a menu on grub menu and press e.

  3. Edit a line below and add "single" parameter

    linux /boot/vmlinuz-3.11.0-20-generic root=UUID=XXXXX ro quiet splash $vt_handoff
    
  4. Then press ctrl + x.

Thanks in advance.

1

1 Answer 1

2

Remove the $vt_handoff, quiet, and splash parts of the line.

The vt_handoff option causes the kernel not to display the text console so that there can be a flickerless transition to Xwindows when it starts up, which is why you don't see anything when you boot to single user mode. The splash option tells plymouth to show the pretty splash screen, and the quiet option suppresses a bunch of text console output.

6
  • @guntbert, good point ;)
    – psusi
    Jan 6, 2015 at 23:07
  • I removed the $vt_handoff, quiet and splash, then add single. But the situation didn't change. What do I miss? BTW, when I just removed the $vt_handoff, quiet and splash, it displayed "Booting a command list" message and no message but login prompt displayed.
    – matsuzaki
    Jan 7, 2015 at 4:20
  • @matsuzaki, when you do log in, run tty and what does it say? I'm not sure how your virtualization is set up, but it could be that the console is a special virtual device and you'd need to pass "console=/dev/whatever" to redirect the standard linux console there.
    – psusi
    Jan 7, 2015 at 14:04
  • when i logged in and ran "tty", it said "/dev/ttyS0". How do I tell "console=/dev/ttyS0" to kvm when I start the vm?
    – matsuzaki
    Jan 8, 2015 at 1:18
  • @matsuzaki, if you are having the vm bootstrap itself with grub, you need to add that to the kernel command line in your grub config.
    – psusi
    Jan 8, 2015 at 2:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .