Upgrade Oracle VM Server from Command Line – Part 10


It is recommended to keep both Oracle VM Manager and VM Server on same version. So here I’m going to upgrade Oracle VM Server to 3.3.5 from 3.3.3 version in command line interface.

Step 1: Create the Yum Repositories using installation media

[root@mgmtsrv ~]# cd /var/www/html/
[root@mgmtsrv html]# mount -t iso9660 /dev/sr0 /mnt/
mount: block device /dev/sr0 is write-protected, mounting read-only

[root@mgmtsrv html]# cp -rp /mnt/* ovs3.3.5/

Step 2: Login in to Oracle VM Manager as admin user

[root@mgmtsrv ~]# ssh -l admin ovm.lab.local -p 10000
admin@ovm.lab.local's password:
OVM>

Step 3: Create VM Manager Server Update Repository

OVM> create ServerUpdateRepository repositoryName=NewRepository3.3.5 url=http://mgmtsrv.lab.local/ovs3.3.5 enabled=Yes pkgSignatureType=GPG pkgSignatureKey=http://mgmtsrv.lab.local/ovs3.3.5/RPM-GPG-KEY name=MyOVSRepo on ServerUpdateGroup id=GlobalX86ServerUpdateConfiguration
Command: create ServerUpdateRepository repositoryName=NewRepository3.3.5 url=http://mgmtsrv.lab.local/ovs3.3.5 enabled=Yes pkgSignatureType=GPG pkgSignatureKey=http://mgmtsrv.lab.local/ovs3.3.5/RPM-GPG-KEY name=MyOVSRepo on ServerUpdateGroup id=GlobalX86ServerUpdateConfiguration
Status: Success
Time: 2017-12-19 06:30:05,854 EST
JobId: 1513682997560
Data:
id:0004fb000031000014f76b016ce471a4 name:MyOVSRepo

OVM> list ServerUpdateRepository
Command: list ServerUpdateRepository
Status: Success
Time: 2017-12-19 06:31:55,639 EST
Data:
id:0004fb000031000014f76b016ce471a4 name:MyOVSRepo

OVM> show ServerUpdateRepository name=MyOVSRepo
Command: show ServerUpdateRepository name=MyOVSRepo
Status: Success
Time: 2017-12-19 06:33:06,074 EST
Data:
Server Update Group = GlobalX86ServerUpdateConfiguration [GlobalX86ServerUpdateConfiguration]
Repository Name = NewRepository3.3.5
Url = http://mgmtsrv.lab.local/ovs3.3.5
Enabled = Yes
Package Signature Type = GPG
Package Signature Key = http://mgmtsrv.lab.local/ovs3.3.5/RPM-GPG-KEY
Id = 0004fb000031000014f76b016ce471a4 [MyOVSRepo]
Name = MyOVSRepo
Locked = false

Step 4: Put Oracle VM Server in to Maintenance Mode

This is step is not needed because when you execute the Step 5 command will place your Oracle VM Server into maintenance mode, checks for any updates in the server update repository, installs any updates, restarts the Oracle VM Server, then takes it out of maintenance mode and returns it to the server pool as a fully functioning member of the pool. But however it is a good practice if we manually put the server in maintenance mode before doing any server related activity.

OVM> setMaintenanceMode Server name=ovs01.lab.local mode=on
Command: setMaintenanceMode Server name=ovs01.lab.local mode=on
Status: Success
Time: 2017-12-19 06:34:22,205 EST
JobId: 1513683001804

Step 5: Upgrade Oracle VM Server

OVM> upgrade Server name=ovs01.lab.local
Command: upgrade Server name=ovs01.lab.local
Status: Success
Time: 2017-12-19 06:46:24,619 EST
JobId: 1513683310258

Step 6: Take out the server from Maintenance Mode

We need to take out the server from maintenance mode, Since we did manually in Step 4.

OVM> setMaintenanceMode Server name=ovs01.lab.local mode=off
Command: setMaintenanceMode Server name=ovs01.lab.local mode=off
Status: Success
Time: 2017-12-19 06:51:54,977 EST
JobId: 1513684314777

Step 7: Delete Server Update Repository

OVM> delete ServerUpdateRepository name=MyOVSRepo
Command: delete ServerUpdateRepository name=MyOVSRepo
Status: Success
Time: 2017-12-19 06:56:19,409 EST
JobId: 1513684574493

OVM> list ServerUpdateRepository
Command: list ServerUpdateRepository
Status: Success
Time: 2017-12-19 06:57:21,744 EST
Data:
None

That’s it. Now login to Oracle VM Server and the check the version.

How to upgrade Oracle VM Manager – Part 9


Step 1: Mount the required ISO into VM Manager.

[root@ovm ~]# mount -t iso9660 /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

Step 2: Trigger the upgrade command

[root@ovm ~]# cd /mnt

As part of precautionary action, it is recommended to take the Manual backup of Oracle VM Manager before execute the Upgrade task. In case of any failure, we can restore from backup. Please check my previous post for Oracle VM Manager Backup and Restore steps.

Before proceed to upgrade the Oracle VM Manager, please make sure you have valid MySQL database, admin and weblogic user password. If you set a system-wide password during the original installation and have not changed the user password at any stage, admin password should work for above users.

Since this is my lab purpose here I ignored the prerequisites check. But don’t use -n parameter if you are doing in Production server.

[root@ovm mnt]# ./runInstaller.sh --installtype Upgrade -n

Oracle VM Manager Release 3.3.5 Installer

Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2017-12-19-041925.log

Ignoring prerequisites check ...
Starting Upgrade ...

Reading database parameters from config ...

==========================
Typically the current Oracle VM Manager database password will be the same as the Oracle VM Manager application password.

==========================
Database Repository
==========================
Please enter the current Oracle VM Manager database password for user ovs: ##Enter OVS MySQL database password##

Oracle VM Manager application
=============================
Please enter the current Oracle VM Manager application password for user admin: ##Enter Oracle VM Manager admin password##

Oracle Weblogic Server 12c
==========================
Please enter the current password for the WebLogic domain administrator: ##Enter weblogic user password##

Please enter your fully qualified domain name, e.g. ovs123.us.oracle.com, (or IP address) of your management server for SSL certification generation 10.10.10.151 [ovm.lab.local]:

Verifying configuration ...

Upgrading from version 3.3.3.1085 to version 3.3.5.1109

Start upgrading Oracle VM Manager:
1: Continue
2: Abort

Select Number (1-2): 1

Running full database backup ...
Successfully backed up database as 3.3.3_preUpgradeBackup-20171219_042023
Running ovm_preUpgrade script, please be patient this may take a long time ...
Exporting weblogic embedded LDAP users
Stopping service on Linux: ovmcli ...
Stopping service on Linux: ovmm ...
Exporting core database, please be patient this may take a long time ...
NOTE: To monitor progress, open another terminal session and run: tail -f /var/log/ovmm/ovm-manager-3-install-2017-12-19-041925.log

Product component : Java in '/u01/app/oracle/java'
Java is installed ...

Removing Java installation ...

Installing Java ...

DB component : MySQL RPM package
MySQL RPM package installed by OVMM was found...
Removing MySQL RPM package installation ...

Installing Database Software...
Retrieving MySQL Database 5.6 ...
Unzipping MySQL RPM File ...
Installing MySQL 5.6 RPM package ...
Configuring MySQL Database 5.6 ...
Installing MySQL backup RPM package ...

Product component : Oracle VM Manager in '/u01/app/oracle/ovm-manager-3/'
Oracle VM Manager is installed ...
Removing Oracle VM Manager installation ...

Product component : Oracle WebLogic Server in '/u01/app/oracle/Middleware/'
Oracle WebLogic Server is installed

Removing Oracle WebLogic Server installation ...
Service ovmm is deleted.
Service ovmcli is deleted.

Retrieving Oracle WebLogic Server 12c and ADF ...
Installing Oracle WebLogic Server 12c and ADF ...
Applying patches to Weblogic ...
Applying patch to ADF ...

Installing Oracle VM Manager Core ...
Retrieving Oracle VM Manager Application ...
Extracting Oracle VM Manager Application ...

Retrieving Oracle VM Manager Upgrade tool ...
Extracting Oracle VM Manager Upgrade tool ...
Installing Oracle VM Manager Upgrade tool ...

Creating Oracle WebLogic Server domain ...
Starting Oracle WebLogic Server 12c ...
Importing weblogic embedded LDAP users
Upgrading core database, please be patient this may take a long time ...
NOTE: To monitor progress, open another terminal session and run: tail -f /var/log/ovmm/ovm-manager-3-install-2017-12-19-041925.log

Retrieving Oracle VM Manager CLI tool ...
Extracting Oracle VM Manager CLI tool...
Installing Oracle VM Manager CLI tool ...

Configuring Existing Https Identity and Trust...
Deploying Oracle VM Manager Core container ...
Configuring Client Cert Login...
Deploying Oracle VM Manager UI Console ...
Deploying Oracle VM Manager Help ...
Disabling HTTP access ...

Retrieving Oracle VM Manager Shell & API ...
Extracting Oracle VM Manager Shell & API ...
Installing Oracle VM Manager Shell & API ...

Retrieving Oracle VM Manager Wsh tool ...
Extracting Oracle VM Manager Wsh tool ...
Installing Oracle VM Manager Wsh tool ...

Retrieving Oracle VM Manager Tools ...
Extracting Oracle VM Manager Tools ...
Installing Oracle VM Manager Tools ...
Copying Oracle VM Manager shell to '/usr/bin/ovm_shell.sh' ...
Installing ovm_admin.sh in '/u01/app/oracle/ovm-manager-3/bin' ...
Installing ovm_upgrade.sh in '/u01/app/oracle/ovm-manager-3/bin' ...

Enabling Oracle VM Manager service ...
Shutting down Oracle VM Manager instance ...
Starting Oracle VM Manager instance ...
Waiting for the application to initialize ...
Oracle VM Manager is running ...

Please wait while WebLogic configures the applications...

Installation Summary
--------------------
Database configuration:
Database type : MySQL
Database host name : localhost
Database name : ovs
Database listener port : 49500
Database user : ovs

Weblogic Server configuration:
Administration username : weblogic

Oracle VM Manager configuration:
Username : admin
Core management port : 54321
UUID : 0004fb00000100009157557324ed168d

Passwords:
There are no default passwords for any users. The passwords to use for Oracle VM Manager, Database, and Oracle WebLogic Server have been set by you during this installation. In the case of a default install, all passwords are the same.

Oracle VM Manager UI:
https://ovm.lab.local:7002/ovm/console
Log in with the user 'admin', and the password you set during the installation.

Note that you must install the latest ovmcore-console package for your Oracle Linux distribution to gain VNC and serial console access to your Virtual Machines (VMs).
Please refer to the documentation for more information about this package.

For more information about Oracle Virtualization, please visit:
http://www.oracle.com/virtualization/

Oracle VM Manager upgrade complete.

Please remove configuration file /tmp/ovm_configTpvifE.

Backup and Restore Oracle VM Manager – Part 8


Step 1: Copy the Oracle VM Manager configuration file

[root@mgmtsrv ~]# ssh root@ovm.lab.local
root@ovm.lab.local's password:
Last login: Sun Dec 17 02:59:42 2017 from 10.10.10.1

[root@ovm ~]# mkdir /opt/OVM_Backup


[root@ovm ~]# cp /u01/app/oracle/ovm-manager-3/.config /opt/OVM_Backup/

Step 2: Backup MySQL database repository

[root@ovm ~]# /u01/app/oracle/ovm-manager-3/ovm_tools/bin/BackupDatabase -w
Enter your OVM Manager username: admin
Enter your OVM Manager password: ## Enter VM Manager admin password ##

INFO: Backup job starting with destination:
/u01/app/oracle/mysql/dbbackup/ManualBackup-20171217_053626

Job Id = 'Start Backup to: ManualBackup(1513506985746) Uri: https://localhost:7002/ovm/core/wsapi/rest/Job/1513506985746'
Job Name = 'Start Backup to: ManualBackup'

INFO: Backup job finished

[root@ovm ~]# cp -r /u01/app/oracle/mysql/dbbackup/ManualBackup-20171217_053626 /opt/OVM_Backup/

Don’t forget to take backup of Oracle VM Manager UUID is persisted in the /etc/sysconfig/ovmm file

[root@ovm ~]# cp /etc/sysconfig/ovmm /opt/OVM_Backup/

Please make sure that you have taken above necessary backup before upgrade/reinstall or migrate the Oracle VM Manager.

[root@ovm ~]# ls -a /opt/OVM_Backup/
. .. .config ManualBackup-20171217_053626 ovmm

Step 3: Uninstall the Oracle VM Manager

Make sure you have MySQL repository backup before you start the uninstallation.

[root@ovm mnt]# ls -l /u01/app/oracle/mysql/dbbackup/
drwxr-xr-x 5 oracle dba 4096 Dec 12 04:52 ManualBackup-20171217_053626

Stop VM manager related services

[root@ovm mnt]# /etc/init.d/ovmcli stop
Stopping Oracle VM Manager CLI [ OK ]
[root@ovm mnt]# /etc/init.d/ovmm_mysql stop
Shutting down OVMM MySQL.... SUCCESS!
[root@ovm mnt]# /etc/init.d/ovmm stop
Stopping Oracle VM Manager [ OK ]

Uninstall the VM Manager

[root@ovm mnt]# ./runInstaller.sh -n

Oracle VM Manager Release 3.3.3 Installer

Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2017-12-14-024725.log

Please select an installation type:
1: Install
2: Upgrade
3: Uninstall
4: Help

Select Number (1-4): 3

Begin uninstalling Oracle VM Manager:
1: Continue
2: Abort

Select Number (1-2): 1

Uninstall Oracle VM Manager

DB component : MySQL RPM package
MySQL RPM package installed by OVMM was found...
Removing MySQL RPM package installation ...

Product component : Java in '/u01/app/oracle/java/'
Java is installed ...

Removing Java installation ...

Product component : Oracle VM Manager in '/u01/app/oracle/ovm-manager-3/'
Oracle VM Manager is installed ...
Removing Oracle VM Manager installation ...

Product component : Oracle WebLogic Server in '/u01/app/oracle/Middleware/'
Oracle WebLogic Server is installed

Removing Oracle WebLogic Server installation ...
Service ovmm is deleted.
Service ovmcli is deleted.

Uninstall completed ...

Step 4: Re-Install the Oracle VM Manager

Note down the old VM Manager UUID value

[root@ovm ~]# cat /etc/sysconfig/ovmm
RUN_OVMM=YES
USETLS1=YES
DBBACKUP_CMD=/opt/mysql/meb-3.12/bin/mysqlbackup
JVM_MAX_PERM=512m
JVM_MEMORY_MAX=4096m
DBBACKUP=/u01/app/oracle/mysql/dbbackup
UUID=0004fb000001000060c2c1d955c85575

Reuse the same usernames and password for the database schema, Oracle WebLogic Server and Oracle VM Manager administration user.

[root@ovm mnt]# ./runInstaller.sh -n --uuid 0004fb000001000060c2c1d955c85575

Oracle VM Manager Release 3.3.3 Installer

Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2017-12-14-025058.log

Please select an installation type:
1: Install
2: Upgrade
3: Uninstall
4: Help

Select Number (1-4): 1

Starting production with local database installation ...

Ignoring prerequisites check ...

One password is used for all users created and used during the installation.
Enter a password for all logins used during the installation: ##Enter Oracle VM Manager admin password##
Enter a password for all logins used during the installation (confirm): ##Re-enter Oracle VM Manager admin password##

Please enter your fully qualified domain name, e.g. ovs123.us.oracle.com, (or IP address) of your management server for SSL certification generation 10.10.10.151 [ovm.lab.local]:

Verifying configuration ...

Start installing Oracle VM Manager:
1: Continue
2: Abort

Select Number (1-2): 1

Step 1 of 9 : Database Software...
......
......

Please wait while WebLogic configures the applications...
Oracle VM Manager installed.

Installation Summary
--------------------
Database configuration:
Database type : MySQL
Database host name : localhost
Database name : ovs
Database listener port : 49500
Database user : ovs

Weblogic Server configuration:
Administration username : weblogic

Oracle VM Manager configuration:
Username : admin
Core management port : 54321
UUID : 0004fb000001000060c2c1d955c85575

Passwords:
There are no default passwords for any users. The passwords to use for Oracle VM Manager, Database, and Oracle WebLogic Server have been set by you during this installation. In the case of a default install, all passwords are the same.

Oracle VM Manager UI:
https://ovm.lab.local:7002/ovm/console
Log in with the user 'admin', and the password you set during the installation.

Note that you must install the latest ovmcore-console package for your Oracle Linux distribution to gain VNC and serial console access to your Virtual Machines (VMs).
Please refer to the documentation for more information about this package.

For more information about Oracle Virtualization, please visit:
http://www.oracle.com/virtualization/

Oracle VM Manager installation complete.

Step 5: Restore Oracle VM Manager from backup

Before restoring the backup, First we need to stop Oracle VM Manager related services.

[root@ovm ~]# /etc/init.d/ovmcli stop
Stopping Oracle VM Manager CLI [ OK ]
[root@ovm ~]# /etc/init.d/ovmm_mysql stop
Shutting down OVMM MySQL.... SUCCESS!
[root@ovm ~]# /etc/init.d/ovmm stop
Stopping Oracle VM Manager [ OK ]

Before restore the database, we need to make sure that no database files already exist on the Oracle VM Manager host.

[root@ovm ~]# cd /u01/app/oracle/mysql/data/
[root@ovm data]# rm -rf appfw ibdata1 ib_logfile0 ib_logfile1 mysql ovs performance_schema


[root@ovm data]# ls -a
. .. auto.cnf my.cnf .mysqlconfig mysqld.err

Switch to oracle user to start the restore process.

[root@ovm ~]# su - oracle
[oracle@ovm ~]$ bash /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh ManualBackup-20171217_053626
INFO: Restore area already exist... Cleaning up...
INFO: Expanding the backup image...
INFO: Applying logs to the backup snapshot...
INFO: Restoring the backup...
INFO: Restoring OVM keystores and certificates
INFO: Success - Done!
INFO: Log of operations performed is available at: /u01/app/oracle/mysql/dbbackup/ManualBackup-20171217_053626/Restore.log

IMPORTANT:

As 'root', please start the OVM Manager database and application using:
service ovmm_mysql start; service ovmm start; service ovmcli start

[oracle@ovm ~]$ exit
logout

Start the Oracle VM Manager related services

[root@ovm ~]# /etc/init.d/ovmm_mysql start
Starting OVMM MySQL..... SUCCESS!
[root@ovm ~]# /etc/init.d/ovmm start
Starting Oracle VM Manager [ OK ]
[root@ovm ~]# /etc/init.d/ovmcli start
Starting Oracle VM Manager CLI [ OK ]

Regenerate the Certificate to authenticate the Oracle VM Manager Web Interface and Oracle VM Manager Command Line Interface.

[root@ovm ~]# export MW_HOME=/u01/app/oracle/Middleware
[root@ovm ~]# /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovmkeytool.sh setupWebLogic
libdir is /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/../lib
Updating keystore information in WebLogic
Oracle MiddleWare Home (MW_HOME): [/u01/app/oracle/Middleware]
WebLogic domain directory: [/u01/app/oracle/ovm-manager-3/domains/ovm_domain]
WebLogic server name: [AdminServer]
WebLogic username: [weblogic]
WebLogic password: [********] ## Enter VM Manager admin password ##
WLST session logged at: /tmp/wlst-session5880304361437212296.log

[root@ovm ~]# /etc/init.d/ovmm restart
Stopping Oracle VM Manager [ OK ]
Starting Oracle VM Manager [ OK ]

Execute client certificate configuration script and restart OVMM daemon

[root@ovm ~]# /u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh

Please enter the OVM Manager username: admin
Please enter the OVM Manager password: ## Enter VM Manager admin password ##

CLASSPATH=/u01/app/oracle/java/lib/tools.jar:/u01/app/oracle/Middleware/wlserver/server/lib/weblogic_sp.jar:/u01/app/oracle/Middleware/wlserver/server/lib/weblogic.jar:/u01/app/oracle/Middleware/wlserver/server/lib/webservices.jar:/u01/app/oracle/Middleware/oracle_common/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/u01/app/oracle/Middleware/oracle_common/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/u01/app/oracle/Middleware/wlserver/modules/features/oracle.wls.common.nodemanager_1.0.0.0.jar:

PATH=/u01/app/oracle/Middleware/wlserver/server/bin:/u01/app/oracle/Middleware/oracle_common/modules/org.apache.ant_1.7.1/bin:/u01/app/oracle/java/jre/bin:/u01/app/oracle/java/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/u01/app/oracle/Middleware/oracle_common/modules/org.apache.maven_3.0.4/bin

.....
.....

BUILD SUCCESSFUL
Total time: 25 seconds

Client certificate login configuration complete

[root@ovm ~]# /etc/init.d/ovmm restart
Stopping Oracle VM Manager [ OK ]
Starting Oracle VM Manager [ OK ]

How to configure VNC in Oracle Virtual Server – Part 7


In my last post, new VM has been built and started, now how can we install the operating system and other application on that host from Command Line Interface.
This can be achieved by enable the VNC (Virtual Network Computing) settings in Virtual Machine configuration to access from remote host.

Step 1: Login to Oracle Virtual Server.

[root@mgmtsrv ~]# ssh ovs01.lab.local
root@ovs01.lab.local's password:
Last login: Sat Dec 23 05:24:55 2017 from 10.10.10.1
Warning: making manual modifications in the management domain
might cause inconsistencies between Oracle VM Manager and the server.

Step 2: Check the VM console port number.

[root@ovs01 ~]# xm list
Name ID Mem VCPUs State Time(s)
0004fb0000060000524f9d3e43fd71f3 1 515 1 ------ 1.5
Domain-0 0 814 4 r----- 89.9

[root@ovs01 ~]# xm list -l | grep location
(location 5)
(location 127.0.0.1:5900)

[root@ovs01 ~]# netstat -antulp | grep 5900
tcp 0 0 127.0.0.1:5900 0.0.0.0:* LISTEN 2537/qemu-dm

If you see above netstat output, the console port 5900 mapped to localhost. Which means that VM can be accessible only from local Oracle VM Server, we can’t connect the VM host from remote machine. But in next step we are going to define the vnclisten address to overcome this problem.

Go to Virtual Machine configuration path.

[root@ovs01 ~]# cd /OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3

Add the below vfb parameter to enable the VNC to access from anywhere.

[root@ovs01 0004fb0000060000524f9d3e43fd71f3]# echo "vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=hello123']" >> vm.cfg

[root@ovs01 0004fb0000060000524f9d3e43fd71f3]# cat vm.cfg | grep vfb
vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=hello123']

vnc = 1 # vnc=1 enabled, 0=disabled
vncconsole = 1 # vncconsole=1 enables spawning VNC viewer for domain’s console. Default=0
vnclisten = 0.0.0.0 # sets VNC to allow access to any computer
vncpasswd = ‘hello123’ # VNC password
vncunused = 1 # vncunused=1 – find an unused port for the VNC server to listen on. Default=1

Step 3: Access VM host from Oracle VM Manager.

Install Required Packages in Oracle VM Manager

[root@ovm ~]# yum install -y xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps

Enable X11 SSH Forwarding in the /etc/ssh/ssh_config file.

Uncomment or add the below lines.

X11Forwarding yes

Restart SSH Service

[root@ovm ~]# /etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]

Download and install Xming

Once you installed Xming, Select Xming and click XLaunch and proceed with default parameters.

Configure Putty

1. Open Putty and Enter the OVM server hostname or ipaddress
2. Go to Connection -> SSH -> X11 -> Enable X11 forwarding checkbox
3. Set the X display location as localhost:10.0
4. Finally click Open button
5. Login as root user

[root@ovm ~]# echo $DISPLAY
localhost:10.0

By executing below command we can make sure X11 options enabled on this machine.

[root@ovm ~]# xclock
[root@ovm ~]# xeyes

Connect to the guest on the host computer with the command

[root@ovm ~]# vncviewer -Shared ovs01.lab.local:5900

TigerVNC Viewer for X version 1.1.0 - built Sep 22 2014 07:14:05
Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.

Sun Dec 17 06:21:36 2017
CConn: connected to host ovs01.lab.local port 5900
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8

Sun Dec 17 06:21:39 2017
TXImage: Using default colormap and visual, TrueColor, depth 24.
CConn: Using pixel format depth 24 (32bpp) little-endian rgb888
CConn: Using Tight encoding

That’s it. Now you can able to access the VM host and start installing the Operating System.

Creating a Virtual Machine in Oracle VM using CLI – Part 6


Step 1: Login to Oracle VM Manger as admin

[root@mgmtsrv ~]# ssh -l admin ovm.lab.local -p 10000
admin@ovm.lab.local's password: ##Enter Oracle VM Manager admin password##
OVM>

Step 2: Creating a Virtual Machine

OVM> create Vm memory=512 cpuCount=2 name=FirstVM repository=OraRepo domainType=XEN_HVM server=ovs01.lab.local startPolicy=BEST_SERVER on ServerPool name=Pool_01
Command: create Vm memory=512 cpuCount=2 name=FirstVM repository=OraRepo domainType=XEN_HVM server=ovs01.lab.local startPolicy=BEST_SERVER on ServerPool name=Pool_01
Status: Success
Time: 2017-12-12 06:32:48,297 EST
JobId: 1513078367383
Data:
id:0004fb0000060000524f9d3e43fd71f3 name:FirstVM

Step 3: Create a Virtual Disk for above created Vm

OVM> create VirtualDisk name=VDisk1 size=5 sparse=Yes shareable=No on Repository name=OraRepo
Command: create VirtualDisk name=VDisk1 size=5 sparse=Yes shareable=No on Repository name=OraRepo
Status: Success
Time: 2017-12-12 06:34:05,945 EST
JobId: 1513078443647
Data:
id:0004fb0000120000590b281ac02ac9b2.img name:VDisk1

Step 4: Map the Virtual Disk to the Virtual machine

OVM> create VmDiskMapping slot=0 virtualDisk=VDisk1 name="Boot Disk" on Vm name=FirstVM
Command: create VmDiskMapping slot=0 virtualDisk=VDisk1 name="Boot Disk" on Vm name=FirstVM
Status: Success
Time: 2017-12-12 06:35:03,937 EST
JobId: 1513078503491
Data:
id:0004fb000013000059c4335123266b7f name:Boot Disk

Step 5: Map an ISO file to the Virtual Machine

OVM> create VmDiskMapping slot=1 virtualCd=CentOS6.iso name="CDROM Drive" on Vm name=FirstVM
Command: create VmDiskMapping slot=1 virtualCd=CentOS6.iso name="CDROM Drive" on Vm name=FirstVM
Status: Success
Time: 2017-12-12 06:36:07,474 EST
JobId: 1513078567043
Data:
id:0004fb0000130000b9f224ad542a08da name:CDROM Drive

Step 6: Define the Virtual Machine Boot Order

OVM> edit Vm name=FirstVM bootOrder='CDROM,DISK' startPolicy=BEST_SERVER
Command: edit Vm name=FirstVM bootOrder='CDROM,DISK' startPolicy=BEST_SERVER
Status: Success
Time: 2017-12-12 06:36:50,248 EST
JobId: 1513078609838

Step 7: Create a Virtual NIC card to the Virutal Machine

OVM> create Vnic name=00:21:f6:00:00:01 network=VMNet on Vm name=FirstVM
Command: create Vnic name=00:21:f6:00:00:01 network=VMNet on Vm name=FirstVM
Status: Success
Time: 2017-12-12 06:37:58,694 EST
JobId: 1513078678213
Data:
id:0004fb0000070000b982f46ce2e91ee7 name:00:21:f6:00:00:01

Step 8: Start the VM host

OVM> start Vm name=FirstVM
Command: start Vm name=FirstVM
Status: Success
Time: 2017-12-12 06:39:33,704 EST
JobId: 1513078765316
OVM>