Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I am trying to create a VM using KVM (on CentOS 6.3) and the command I use is as follows:

virt-install  --connect qemu:///system  --virt-type kvm  --name ffVM32  --ram 1024 --disk path=/home/datastore/images/ffVM32.img,size=10  --vnc  --cdrom  /home/datastore/backups/CentOS-6.4-i386-minimal.iso   --bridge bridge0

The output I get is:

Starting install...
Allocating 'ffVM32.img'                                             |  10 GB     00:00     
Creating domain...                                                  |    0 B     00:00     
Cannot open display: 
Run 'virt-viewer --help' to see a full list of available command line options
Domain installation still in progress. You can reconnect to 
the console to complete the installation process.

I have done a group install of "X Windows System" but it doesn't help. I am trying to access this via my laptop which runs Ubuntu 13..04. The curious thing is that when I tried the same from another machine that has PCLinuxOS, virt-viewer opens and I can continue with the installation.

While listing all the VMs, I find the VM running

[root@ts3 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 8     ffVM32                         running

What am I missing out on?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You probably haven't logged into your hardware node using -X switch of ssh.

[root@yourmachine]# ssh -X root@<your-hardware-node-ip>

From the man page:

         Enables X11 forwarding.  This can also be specified on a per-host 
         basis in a configuration file.

         X11 forwarding should be enabled with caution.  Users with the
         ability to bypass file permissions on the remote host (for the
         user's X authorization database) can access the local X11 display
         through the forwarded connection.  An attacker may then be able
         to perform activities such as keystroke monitoring.

         For this reason, X11 forwarding is subjected to X11 SECURITY
         extension restrictions by default.  Please refer to the ssh -Y
         option and the ForwardX11Trusted directive in ssh_config(5) for
         more information.

To disable X11 forwarding you can use the -x switch.

To enable X11 forwarding, edit the conf file located at /etc/ssh/sshd_config and uncomment the following line:

X11Forwarding Yes

and restart the service using service sshd restart

Hope this helps.

share|improve this answer

Connect with -X switch (ssh -X [host]) from your Ubuntu laptop.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.