LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 01-10-2018, 02:14 PM   #1
sallback
LQ Newbie
 
Registered: Jan 2018
Posts: 2

Rep: Reputation: Disabled
Connecting to a KVM VM from a non-graphical host


My first post, so be gentle.

I'm currently playing around with a Centos7 KVM host running a Windows 7 VM. I've already been able to access the VM using VNC from another computer or connecting to it from the host's XCFE desktop environment using virt-viewer.

I was just wondering if is it possible to access the VM from the host itself if it does not have any graphical inteface installed at all?

Basically what I am trying to achieve is a light as possible KVM host which runs the windows VM and the VM is accessed somehow straight from the same host via command line only and without a need to install any desktop environment. Is this even possible or is some kind of a graphical interface needed?

The reason for this setup is that I could experiment stuff with the VM and if/when s*it hits the fan, I could just use snapshot to revert back to previous state.
 
Old 01-10-2018, 02:33 PM   #2
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, Fedora, Arch, & GalliumOS.
Posts: 2,588

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
Without a desktop, sure, you can use xfreerdp or still use virt-viewer like currently. You'll still need a configured working X environment, but you don't need to actually be running a desktop. You can boot to CLI as long as passing startx would work to start an X-session, you should be fine.
 
Old 01-13-2018, 08:23 AM   #3
sallback
LQ Newbie
 
Registered: Jan 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you for the help so far.

I've now played with the system for many hours in many days and I can't seem to find an answer to my current problem.

I've made a few rounds of reinstalling and starting from scratch, but I always get stuck to the same field of mines so to speak. I have a hard time understanding what is the problem with my X / Xorg settings.

If I make an SSH connection from another computer in the same network using X-forwarding option to the virtualization host, I can get the virt-manager running without any problem but the tricky part for me is to get the virt-manager to run directly from the virtualization host itself.

When trying to just launch virt-manager from the console, I get an error stating Gtk-WARNING **: cannot open display:

If I try with the SSH and connect from the host back to the host itself (dont' actually have any point for this but just tried it as it worked from the other pc), I get the same error Gtk-WARNING **: cannot open display:

Now I have googled numerous guides for solving this and tried a load of different tricks (and sometimes ended up reinstalling the system from scratch) but without an luck.

Could somebody give me some instructions on how to get forward from this point?
What packages do I have to install while keeping the system as minimal as possible?
Which configuration files I have to change?
What is the actual reason for this error?

I will give more information when requested but as said before I have tried so many different guides and tutorials with no luck that my mind is just full of trivia around the subject without any straight plan to getting forward.

Thank you in advance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian KVM Host, create VMs from ISO disk image with graphical UI jmc1987 Linux - Virtualization and Cloud 3 04-06-2017 11:14 PM
firewalld help: trying to forward https from kvm host to kvm guest on same port GaWdLy Linux - Networking 4 07-15-2016 03:27 PM
Kernel-based Virtual Machine (KVM): Switching from KVM guest to host (e.g. Linux Mint) & maximize guest screen fanoflq Linux - Newbie 2 07-13-2016 07:10 PM
Redirect logs from KVM guest to KVM host essential1 Linux - Virtualization and Cloud 2 10-08-2013 04:29 PM
connecting a host to internet thru another host (both running suse9.3) rcbell Linux - Networking 1 12-17-2005 06:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration