Score:0

Qemu how to get a port for VNC and stop the terminal?

jp flag

Using Ubuntu 20.04, I am starting my Ubuntu server with:

qemu-system-x86_64 \
  -enable-kvm \
  -cpu host \
  -smp 11 \
  -drive format=raw,file=/mnt/kvm-guests/work.img,if=virtio \
  -net nic,model=virtio,macaddr=ec:8d:2c:f3:2a:7c \
  -net tap,ifname=tap2,script=no,downscript=no \
  -runas kvmuser \
  -nographic \
  -m 30000 &

How do I make it to where:

  1. There is a port given in the output if I want to vnc into it
  2. Not have the terminal be used as a display (I don't want a terminal at all)

Using Qemu version 4.2.1 along with KVM

Score:1
sl flag

for the cli configuration of a VNC you need to configure the display that way. To do that drop "nographic" and instead add something like -display none -vnc :0.

Of these options -display none makes it not put output somewhere immediately, but in comparison to nographic it will leave a virtual gpu present to the guest. Then -vnc controls where/how to open a port. There are many suboptions, and I'd recommend to restrict accessibility and authentication. You can aslo combine it with spice, so I'd recommend to have a look for "vnc" in the man page

-display none of the above will already have done that for you, for full background execution consider also adding-daemonize

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.