Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Wed Aug 23, 2017 8:56 am


Software and Hardware virtualization, Linux Kernel Virtualization Module, FreeBSD jails, Vmware, Virtualbox, Xen

Author Message
mandrei99
Post  Post subject: CentOS and KVM: Setup VNC server on the hypervisor  |  Posted: Tue Feb 04, 2014 9:05 am

Joined: Tue Aug 04, 2009 9:16 am
Posts: 245

Offline
 

CentOS and KVM: Setup VNC server on the hypervisor

After a complete installation of the KVM hypervisor, libvirt and the rest of utilities, VNC server can be used to remotely access the graphical console (aka Video output) of the VMs via the Virtual Machine Manager.

But by default VNC will not run:
Code:
# chkconfig --list | grep vnc
vncserver       0:off   1:off   2:off   3:off   4:off   5:off    6:off
# chkconfig --levels 5 vncserver on
# chkconfig --list | grep vnc
vncserver       0:off   1:off   2:off   3:off   4:off   5:on    6:off


Also it needs minimal configuration to run:
Code:
# service vncserver start
Starting VNC server: no displays configured [FAILED]
# vim /etc/sysconfig/vncservers
...
VNCSERVERS="2:admin"
VNCSERVERARGS[2]="-geometry 1024x768"

Uncomment the last two lines to be similar to above two. The first one tells to connect as "admin" user on port 2 (it was the default) and start with a resolution of 1024x768.
Next, "vncpasswd" utility needs to be used as "admin" user to generate login passwords before the "vncserver" service is started:
Code:
# su - admin
$
$ vncpasswd
Password:
Verify:
$ pwd
/home/admin
$ ls .vnc/
passwd
$ logout
# service vncserver start
Starting VNC server: 2:admin
New 'KVM4vSRX:2 (admin)' desktop is KVM4vSRX:2

Starting applications specified in /home/admin/.vnc/xstartup
Log file is /home/admin/.vnc/KVM4vSRX:2.log

[  OK  ]
# lsof -Pni :5902
COMMAND   PID  USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
Xvnc    21540 admin    6u  IPv4 10386371      0t0  TCP *:5902 (LISTEN)





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "CentOS and KVM: Setup VNC server on the hypervisor"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. KVM Nested in Vmware ESXi 5.5 - enable guest hypervisor vmx/svm flags without vsphere web client

admin

0

17004

Sat Feb 21, 2015 8:21 pm

admin View the latest post

There are no new unread posts for this topic. Juniper vSRX (Virtual SRX) under KVM on Centos 6.5

mandrei99

1

5914

Wed Jan 29, 2014 8:12 am

mandrei99 View the latest post

There are no new unread posts for this topic. FreeBSD virsh console hangs in "Escape character is ^]" \w KVM hypervisor any text console provider

mandrei99

0

1413

Fri Jan 31, 2014 5:35 am

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO