By James Taylor on May 14, 2013
When working on the ODA patch 2.5 there maybe occasions where you need to VNC into the virtual machine to try and diagnose issues because the standard oakcli doesn't provide enough information. I believe in 2.6 a new function has been a introduced to make this easier (oakcli show vmconsole) but in 2.5 it doesn't exist.
In this example I have deployed WLS on the ODA but one of the managed server machines is not coming up correctly although the command oakcli show vm is saying all is OK.
To get a VNC console to the managed server VM I performed the following.
- You need to go the the VM repository. This is on either of the ODA_BASE machines. To find where this is, on the node 0 db vm run the following command:
oakcli show vm
NAME MEMORY VCPU STATE REPOSITORY
OTD_ofm_domain_AdminNode_1 4096 2 ONLINE odarepo2
OTD_ofm_domain_AdminNode_2 4096 2 ONLINE odarepo1
OTD_ofm_domain_AdminServer 1024 2 ONLINE odarepo2
WLS_ofm_domain_AdminServer 2048 2 ONLINE odarepo1
WLS_ofm_domain_ManagedServer_1 6144 2 ONLINE odarepo2
WLS_ofm_domain_ManagedServer_2 6144 2 ONLINE odarepo1
The server I'm interested in is WLS_ofm_domain_ManagedServer_1, which is found on odarepo2. This tells me I need to go to the repository on ODA_BASE Node 1 (I'm counting from 0). In my case this is called nlab-oda-pub2.
- Login as root to the ODA_BASE server that has the required repository. change directory to the following
Please note that yours may differ, I'm connecting to the odarepo2 and vm WLS_ofm_domain_ManagedServer_1
- In this directory there should be a file vm.cfg. Open this up and add the following line at the top
vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0']
- Bounce the VM with the oakcli commands:
oakcli stop vm WLS_ofm_domain_ManagedServer_1
oakcli start vm WLS_ofm_domain_ManagedServer_1
- Start a VNC session and point to the correct node. In my case I need to connect to the head machine on the second node (machine you install the ODA_BASE into). The port you need to connect to is 5901 as 5900 is taken by the ODA_BASE machine.
This should op up the console. In this instance I can see that may network was already taken, that is why it didn't start correctly.