Cannot connect QEMU guest os with vncviewer

The question is as follows.

harry@debian:~/workshop1/qemu_test/version1/test$ qemu-system-x86_64 -hda qcow2.img -cdrom domU-x86_64-FS.img -boot d -m 1024
VNC server running on `::1:5900'

harry@debian:~/workshop1/qemu_test/version1/test$ vncviewer 127.0.0.1:1
vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server

Solution (add -vnc parameter for qemu-system-x86_64):

harry@debian:~/workshop1/qemu_test/version1/test$ qemu-system-x86_64 -hda qcow2.img -cdrom domU-x86_64-FS.img -boot d -m 1024 -vnc 127.0.0.1:2

harry@debian:~/workshop1/qemu_test/version1/test$ vncviewer 127.0.0.1:2
Connected to RFB server, using protocol version 3.8
No authentication needed
Authentication successful
Desktop name "QEMU"
VNC server default format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Using default colormap which is TrueColor.  Pixel format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Same machine: preferring raw encoding
asked Aug 27, 2014 by harryxiyou (5,740 points)

1 Answer

-vnc display[,option[,option[,...]]]

Normally, QEMU uses SDL to display the VGA output. With this option, you can have QEMU listen on VNC display display and redirect the VGA display over the VNC session.

-- http://www.pkill.info/linux/man/1-qemu/

I guess this is the reason.

answered Aug 28, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...