Site icon UnixArena

How to take console of Oracle VM guest ?

To install a guest operating system , you have to take the oracle VM guest console from OVM manager web-portal. This console is also required for each guest operating system troubleshooting the booting failure or administration purpose. Unlike VMware’s vm console , oracle VM console , required some per-configuration to access from other network. oracle VM console also requires Java and VNC-Viewer to get the guest console.(Tightvnc or Tigervnc). Here we will see the various methods to accessing the OVM guest console from windows and Linux systems.

Method:1 Launching Guest OS console from windows systems

1.Login to Oracle VM web-portal.Select the guest and click on the console icon to launch the guest console.

oracle VM Guest console

2. After clicking the guest console, it will download file like below one.

oracle VM Guest console – JNLP File

3.Click on the file and it will open in Java.

Oracle VM Java opens

4.If you get an java exception error,Make sure your java settings are like below and OVS & OVM servers IP’s are added in exception. (Control-Pannel – > Java)

Java Security exception

5.If you get a below error , then you have to install tightvnc or tigervnc on your system.

Failed to connect VNC viewer

Once you have installed tightvnc on your system, you need to give the VNCviewer path to java. You may have one small java window after launching the console. Even though console failed, you may still have that window. Just provide the vncviwer executable path to that like below. (Note: vncviewer path may vary for you)

Provide the VNCviewer path to Java

6.Again try to launch the console.

Oracle VM guest console failed

Again failed.

7.I tried to install tigervnc-java rpm on oracle VM manager  as per oracle document. But didn’t help to launch the console.

[root@UA-OVM Desktop]# rpm -ivh tightvnc-java-1.3.9-3.noarch.rpm 
warning: tightvnc-java-1.3.9-3.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 1e5e0159: NOKEY
Preparing...                ########################################### [100%]
	package tightvnc-java-1.3.9-3.noarch is already installed
[root@UA-OVM Desktop]#

8.So finally i have tried with https connection and that worked . open the browser and enter “https://oraclevm_manager:7002” .Login to the oracle VM manager and select the guest to launch the console. (Refer step1) . It will download the JNLP file and just open it.(Step 2)

Console of OVM Guest

OVM guest console has been launched successfully from the windows systems.

Click on page 2 see that how we can access the guest console from oracle Linux (OVM Manager)

 Method:2 Launching Guest OS console from Oracle VM Manager .(Oracle Linux-OS)

1.Login to oracle VM manager system and mount the oracle linux DVD. Go to the packages directory and find the “tigervnc” rpm and install it .

[root@UA-OVM Desktop]# mount -o loop oraclelinux.iso /media
[root@UA-OVM Desktop]# df -h /media/
Filesystem            Size  Used Avail Use% Mounted on
/root/Desktop/oraclelinux.iso
                      2.4G  2.4G     0 100% /media
[root@UA-OVM Desktop]# cd /media
[root@UA-OVM media]# ls -lrt
total 898
drwxr-xr-x 2 root root 657408 Jun 27  2012 Packages
-rw-r--r-- 1 root root    108 Jun 27  2012 supportinfo
-rw-r--r-- 1 root root   1011 Jun 27  2012 RPM-GPG-KEY-oracle
-rw-r--r-- 1 root root   1011 Jun 27  2012 RPM-GPG-KEY
-rw-r--r-- 1 root root  32428 Jun 27  2012 RELEASE-NOTES-x86-en.html
-rw-r--r-- 1 root root  29531 Jun 27  2012 RELEASE-NOTES-x86-en
-rw-r--r-- 1 root root  32428 Jun 27  2012 RELEASE-NOTES-x86_64-en.html
-rw-r--r-- 1 root root  29531 Jun 27  2012 RELEASE-NOTES-x86_64-en
-rw-r--r-- 1 root root  32428 Jun 27  2012 RELEASE-NOTES-en.html
-rw-r--r-- 1 root root  29531 Jun 27  2012 RELEASE-NOTES-en
-rw-r--r-- 1 root root   7054 Jun 27  2012 README-en.html
-rw-r--r-- 1 root root   2619 Jun 27  2012 README-en
-rw-r--r-- 1 root root  18390 Jun 27  2012 GPL
-rw-r--r-- 1 root root   3334 Jun 27  2012 eula.py
-rw-r--r-- 1 root root   7041 Jun 27  2012 eula.en_US
-rw-r--r-- 1 root root   7041 Jun 27  2012 EULA
drwxr-xr-x 4 root root   2048 Jun 27  2012 Server
lrwxrwxrwx 1 root root     15 Jun 27  2012 repodata -> Server/repodata
drwxr-xr-x 3 root root   2048 Jun 27  2012 UEK2
drwxr-xr-x 3 root root   2048 Jun 27  2012 ResilientStorage
drwxr-xr-x 3 root root   2048 Jun 27  2012 HighAvailability
drwxr-xr-x 3 root root   2048 Jun 27  2012 LoadBalancer
drwxr-xr-x 3 root root   2048 Jun 27  2012 ScalableFileSystem
drwxr-xr-x 3 root root   2048 Jun 27  2012 EFI
-rw-r--r-- 1 root root    196 Jun 27  2012 media.repo
drwxr-xr-x 2 root root   2048 Jun 27  2012 isolinux
drwxr-xr-x 3 root root   2048 Jun 27  2012 images
-r--r--r-- 1 root root   6517 Jun 27  2012 TRANS.TBL
[root@UA-OVM media]# cd Packages/
[root@UA-OVM Packages]# ls -lrt |grep -i tigervnc
-rw-r--r-- 1 root root   265712 Dec  8  2011 tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm
-rw-r--r-- 1 root root  1111984 Dec  8  2011 tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm
[root@UA-OVM Packages]# rpm -ivh tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm

2.Once the installation is completed , open a browser(Mozilla) and login to oracle VM manager webpage.Try to launch the guest OS console.

3.You will get a below pop-up .

Mozilla JNLP

4.Click on the browse and navigate to javaws like below and open it .By default oracle VM manage installs java which is compatible with OVM console(/u01/app/oracle/java).  Open JDK will not work.

Select javaws to open a jnlp file

5.If the system is not able find the vncviewer , please provide the path like below.

Provide the VNCviewer path to Java-Linux

6.You will get a console if there is no other sessions are active.

Guest Console from Oracle LInux (OVM Manager)

We have successfully launched the Guest OS console from Oracle Linux.

Click on Page 3 to see how we can access the guest OS console without help of oracle VM manager from windows and Linux .

Method:3 Launching the Guest OS console directly from VNC viewer.

In method 1 and method 2 , we have launched the Guest OS console with the help of Oracle VM manager. Now we will see how we can launch the console directly without help of oracle VM.

1.Login in to oracle VM server .xm list command will shows the running guest OS.

[root@UAOVS1 ~]# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
0004fb0000060000ea3e4badcd310f2c             1   800     1     -b----     41.7
Domain-0                                     0   519     1     r-----     98.5
[root@UAOVS1 ~]#

2.Get guest VM console port number .Since i have only one guest, let me just grep the location.So the guest can be accessable on 5900 port.

[root@UAOVS1 ~]# xm list -l |grep location
            (location 127.0.0.1:5900)
            (location 3)
[root@UAOVS1 ~]# netstat -an |grep 5900
tcp        0      0 127.0.0.1:5900              0.0.0.0:*                   LISTEN
[root@UAOVS1 ~]#

As per the above “netstat” command output, port 5900 just listens on localhost. This settings deny the access from outside network.

3.Edit the xen configuration file /etc/xen/xend-config.sxp like below or edit the VM file (step 4) . This required Oracle VM server reboot.So better to go with step:4

Before:

# The interface for VNC servers to listen on. Defaults
# to 127.0.0.1  To restore old 'listen everywhere' behavior
# set this to 0.0.0.0
#(vnc-listen '127.0.0.1')

 After:

# The interface for VNC servers to listen on. Defaults
# to 127.0.0.1  To restore old 'listen everywhere' behavior
# set this to 0.0.0.0
(vnc-listen '0.0.0.0')

4.Edit the virtual machine configuration file and make sure “vnclisten=0.0.0.0”.

[root@UAOVS2 ~]# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
0004fb0000060000ea3e4badcd310f2c             1   800     1     -b----    370.9
Domain-0                                     0   519     1     r-----   1160.3
[root@UAOVS2 ~]# echo $TERM
xterm
[root@UAOVS2 ~]# cd /OVS/Repositories/0004fb00000300007f732989dcd4cad9/VirtualMachines/0004fb0000060000ea3e4badcd310f2c/
[root@UAOVS2 0004fb0000060000ea3e4badcd310f2c]# ls -lrt
total 0
-rw------- 1 root root 740 May 27 21:32 vm.cfg
[root@UAOVS2 0004fb0000060000ea3e4badcd310f2c]# vi vm.cfg
[root@UAOVS2 0004fb0000060000ea3e4badcd310f2c]# cat  vm.cfg  |grep listen
vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0']
[root@UAOVS2 0004fb0000060000ea3e4badcd310f2c]#

5.In windows system, just open a vncviewer and enter the oracle VM server IP and guest OS port number.Click connect to get the console of the guest.

Direct OVM guest console from windows system

6. In step 4 & 5 , we are directly accessing the guest console without giving any password. This will create a security problem. Anyone can access the guest without entering any password. But we can restrict the access by adding “vncpassword” on configuration like below.

[root@UAOVS2 0004fb0000060000ea3e4badcd310f2c]# cat  vm.cfg  |grep vfb
vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=password']
[root@UAOVS2 0004fb0000060000ea3e4badcd310f2c]#

7.When you try to connect the guest console, it will prompt for password .Just enter the password and you can see the guest OS console.

vnc password for oracleVM

Note:You can’t have multiple guest console on Oracle VM.Only only session allowed.

If you want to access the guest console from linux system without oracle VM manager, you can use the above method.you can also launch from command line.This command will pop-up VNC console session for the guest .

[root@UA-OVM ~]# /usr/bin/vncviewer -shared 192.168.2.12:5900

TigerVNC Viewer for X version 1.0.90 - built Dec  7 2011 20:50:42
Copyright (C) 2002-2005 RealVNC Ltd.
Copyright (C) 2000-2006 TightVNC Group
Copyright (C) 2004-2009 Peter Astrand for Cendio AB
See http://www.tigervnc.org for information on TigerVNC.

Thu May 29 17:07:10 2014
 CConn:       connected to host 192.168.2.12 port 5900
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8

Thu May 29 17:07:15 2014
 TXImage:     Using default colormap and visual, TrueColor, depth 24.
 CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
 CConn:       Using Tight encoding

I have almost took three days to find the various method of accessing the oracle VM guest console.

Hope these article is informative to you .

Share it ! Comment it !! Be Sociable !!!

Exit mobile version