0

A QEMU VM, both the host and guest OS being Ubuntu 20.04. QEMU 6.1.0 is compiled without any special parameters. The guest was installed from a downloaded iso image of Ubuntu server.

If I start the VM using

qemu-system-x86_64 -hda ubuntu.qcow -m 4000

, QEMU starts a VNC server and I can view in VNC Viewer that the guest Ubuntu OS is running properly.

But if I start the VM using

qemu-system-x86_64 -hda ubuntu.qcow -m 4000 -nographic

, QEMU prints out the following and freezes.

SeaBIOS (version rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org)
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+BFF8F290+BFEEF290 CA00
Booting from Hard Disk...

I can see from top that CPU is 100% busy with qemu-system-x86 at first and turns back to idle after a while. I guess the guest OS has finished booting successfully, but I can see nothing on the screen. What I want is that the guest can take over the console of the host and output to it. I did not find -console parameter, so I guess -nographic would do the job. Did I choose a wrong parameter? If so, how can I see the display of booting procedure and the login prompt of the guest Ubuntu? Thanks.

zzzhhh
  • 101
  • 2

1 Answers1

-1

Since you have no graphics and the OS does output there, then it is much expected that you don't get much.

You could configure bootloader, kernel, and shell to use serial. For the kernel it is something like console=/dev/ttyS0

For ubuntu there seems to be a guide at https://help.ubuntu.com/community/SerialConsoleHowto

NiKiZe
  • 1,246
  • 8
  • 20
  • I have only a downloaded iso image of ubuntu, and installed the guest in a ubuntu.qcow. Do you have a recipe to "configure bootloader, kernel, and shell to use serial"? Do you want me to compile a whole Linux from source? – zzzhhh Nov 08 '21 at 04:14
  • There is probably a guide for "Ubuntu on serial console" but that is a different question. – NiKiZe Nov 08 '21 at 04:19
  • PS, I tried `-curses`, but I was shown a blank window except "1024 x 768 Graphic mode" displayed at the center. – zzzhhh Nov 08 '21 at 04:19
  • By "Ubuntu on serial console", do you mean I force qemu to have only a serial console, so that qemu will not simulate a text console on graphics monitor? Do I have to compile Ubuntu from source, or reinstall from the downloaded iso image? Does this link the guide of "Ubuntu on serial console": https://topslakr.com/2021/02/install-ubuntu-20-04-lts-via-serial-console/ – zzzhhh Nov 08 '21 at 04:26
  • Ubuntu goes into graphic mode early, curses could work if you switch the software that runs inside of qemu to only use text mode. but the best is usually to configure the software that runs INSIDE qemu to use serial IO https://help.ubuntu.com/community/SerialConsoleHowto – NiKiZe Nov 08 '21 at 05:33
  • most it looks like the question is an end-user question.i would suggest you to install proxmox from rpoxmox.com for easy learning – djdomi Nov 08 '21 at 05:44
  • by "software" do you mean the ubuntu guest OS? – zzzhhh Nov 08 '21 at 06:32
  • By "Ubuntu goes into graphic mode early" do you mean Ubuntu was designed to stick to graphics mode when it was developed many years ago? – zzzhhh Nov 08 '21 at 06:34
  • I do think that the SerialConsoleHowto will resolve your issue. I do not think trying to explain why and how from the absolute basic level is appropriate here. – NiKiZe Nov 08 '21 at 12:49