Results 1 to 8 of 8

Thread: Can't get remote Qemu VNC to work

  1. #1
    Join Date
    Apr 2010
    Location
    Chicago, IL
    Posts
    171

    Default Can't get remote Qemu VNC to work

    I'm trying to run a Qemu VM installation on a headless remote server running openSUSE Leap 42.1. However, I'm never able to connect to the VM with a remote client; I've ensured that VNC gets bound to 0.0.0.0 and even disabled the firewall, but the connection always just times out.

    Here's an example command that I'm trying to run (after creating disk.img):

    Code:
    qemu-system-x86_64 -cdrom <path-to-iso> -boot order=d -drive file=disk.img,format=qcow2 -vnc 0.0.0.0:0
    I've tried adding the -nographic option too, but to no avail.

    Any tips?
    Last edited by malcolmlewis; 18-May-2017 at 12:32. Reason: Update prefix as 42.1 is EOL

  2. #2
    Join Date
    Sep 2012
    Posts
    5,363

    Default Re: Can't get remote Qemu VNC to work

    Did you try omit host part (which should cause qemu to accept connection from any host: qemu ... -vnc :0)? Did you try another VNC number?

  3. #3
    Join Date
    Apr 2010
    Location
    Chicago, IL
    Posts
    171

    Default Re: Can't get remote Qemu VNC to work

    Yeah, I tried it with "-vnc :0" and connecting to port 5900, but no dice. Same with :1 and 5901.

    Not sure if it's relevant, but I'm also getting this output when I kick off the machine:

    Code:
    Warning: default mac address being used, creating potential for address conflict

  4. #4
    Join Date
    Apr 2010
    Location
    Chicago, IL
    Posts
    171

    Default Re: Can't get remote Qemu VNC to work

    Thinking about it more, I'm sure this has to be a problem with the server being headless. Installing Qemu brought in some X dependencies, but none of them are being used by the system. Using VNC should make X unnecessary, right?

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,004
    Blog Entries
    2

    Default Re: Can't get remote Qemu VNC to work

    Quote Originally Posted by kog13 View Post
    Thinking about it more, I'm sure this has to be a problem with the server being headless. Installing Qemu brought in some X dependencies, but none of them are being used by the system. Using VNC should make X unnecessary, right?
    First, of course you need to verify basic network connectivity.
    Then, installing VNC in your VM should be no different than installing on bare metal, the opensuse community docs has a good guide, read it and be sure you understand how vnc server is implemented which may be different than what you may have experienced before

    https://doc.opensuse.org/documentati...e/cha.vnc.html

    Lastly,
    Installing VNC in openSUSE should <always> be done using the YaST Remote Administration module, it will install all the dependencies you need including an xorg x-server. Nowadays, modern Linux architectures will often <not> install an xorg x-server for local use, but these new implementations don't usually support remote access yet (which is why you need to install).

    Otherwise, properly configured the VNC server has little to do with whether your HostOS is a headless install because your VM should be its own isolated and completely self-contained machine, not dependent on what is in the HostOS (unless you do something like pass-through). Or, as I've explained even if your VM is "headless."

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,004
    Blog Entries
    2

    Default Re: Can't get remote Qemu VNC to work

    Quote Originally Posted by kog13 View Post
    Yeah, I tried it with "-vnc :0" and connecting to port 5900, but no dice. Same with :1 and 5901.

    Not sure if it's relevant, but I'm also getting this output when I kick off the machine:

    Code:
    Warning: default mac address being used, creating potential for address conflict
    You need to fix your networking, I don't see anything I recognize in your command that invokes your VM specifying how your networking should be configured. If you installed KVM/QEMU completely and follow standard configurations, you should be making use of configured Linux Bridge Devices.

    What guide are you following creating and invoking your QEMU VMs?

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,004
    Blog Entries
    2

    Default Re: Can't get remote Qemu VNC to work

    FYI - some resources to invoke your qemu VM correctly and manage
    Note that I'm pointing you to SLES documentation, which is perfectly fine and should work without any alterations (except maybe invoke images other than SLES by default)

    The SLES KVM/QEMU documentation
    https://www.suse.com/documentation/s...m.html#id80132

    In a hurry? Just use the invocation in the last section as a template to start your VMs
    https://www.suse.com/documentation/s..._qemu-kvm.html

    More SLES documentation, perhaps organized best for quick reading, the following is for your networking
    https://www.suse.com/documentation/s...etworking.html

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,004
    Blog Entries
    2

    Default Re: Can't get remote Qemu VNC to work

    Quote Originally Posted by kog13 View Post
    Yeah, I tried it with "-vnc :0" and connecting to port 5900, but no dice. Same with :1 and 5901.

    Not sure if it's relevant, but I'm also getting this output when I kick off the machine:

    Code:
    Warning: default mac address being used, creating potential for address conflict
    Pay close attention to the VNC server configuration file used nowadays, it defines the Guest configurations that are enabled.
    In other words, if you're used to defining options in your VNC connection other than an address and a port, you need to update your knowledge.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •