Useful Oracle VM Server Hypervisor XM Commands – Part 15


Basic information about the Oracle VM Server

[root@ovs01 ~]# xm info
host : ovs01.lab.local
release : 3.8.13-118.15.1.el6uek.x86_64
version : #2 SMP Fri Dec 2 09:07:34 PST 2016
machine : x86_64
nr_cpus : 4
nr_nodes : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 2591
hw_caps : 1fabfbff:2c100800:00000000:00003f00:f6fa3223:00000000:00000101:00000281
virt_caps : hvm
total_memory : 2047
free_memory : 685
free_cpus : 0
xen_major : 4
xen_minor : 3
xen_extra : .1OVM
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset :
xen_commandline : console=com1,vga com1=57600,8n1 dom0_mem=max:816M allowsuperpage
cc_compiler : gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
cc_compile_by : mockbuild
cc_compile_domain : us.oracle.com
cc_compile_date : Sun Dec 25 21:46:52 PST 2016
xend_config_format : 4

List all running domain details

[root@ovs01 ~]# xm list
Name ID Mem VCPUs State Time(s)
0004fb0000060000524f9d3e43fd71f3 2 515 2 -b---- 140.8
Domain-0 0 814 4 r----- 1032.5

To list details for particular VM

[root@ovs01 ~]# xm list 0004fb0000060000524f9d3e43fd71f3
Name ID Mem VCPUs State Time(s)
0004fb0000060000524f9d3e43fd71f3 2 515 2 -b---- 150.1

Detail information about the VM

[root@ovs01 ~]# xm list 0004fb0000060000524f9d3e43fd71f3 -l

VM Grace Shutdown

[root@ovs01 ~]# xm shutdown 0004fb0000060000524f9d3e43fd71f3

To start the VM

[root@ovs01 ~]# xm create /OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3/vm.cfg
Using config file "/OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3/vm.cfg".
Started domain 0004fb0000060000524f9d3e43fd71f3 (id=3)

VM Kill/PowerOff and Reboot

[root@ovs01 ~]# xm destroy 0004fb0000060000524f9d3e43fd71f3
[root@ovs01 ~]# xm reboot 0004fb0000060000524f9d3e43fd71f3

To get the VM MAC details

[root@ovs01 ~]# xm network-list 0004fb0000060000524f9d3e43fd71f3
Idx BE MAC Addr. handle state evt-ch tx-/rx-ring-ref BE-path
0 0 00:21:f6:96:bf:12 0 1 -1 -1 /-1 /local/domain/0/backend/vif/4/0

To monitor the Xen Domain

[root@ovs01 ~]# xm top

VM current state

[root@ovs01 ~]# xm domstate 0004fb0000060000524f9d3e43fd71f3
idle

To list all domain CPU details

[root@ovs01 ~]# xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
0004fb0000060000524f9d3e43fd71f3 4 0 1 -b- 70.9 0-1
0004fb0000060000524f9d3e43fd71f3 4 1 0 -b- 22.5 0-1
Domain-0 0 0 1 -b- 255.5 any cpu
Domain-0 0 1 3 -b- 385.1 any cpu
Domain-0 0 2 2 -b- 237.5 any cpu
Domain-0 0 3 0 r-- 335.8 any cpu

To see Domain uptime

[root@ovs01 ~]# xm uptime
Name ID Uptime
0004fb0000060000524f9d3e43fd71f3 4 0:05:21
Domain-0 0 1:31:59

DRY-RUN command to check whether domain is able to access the resources

[root@ovs01 ~]# xm dry-run /OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3/vm.cfg
Using config file "/OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3/vm.cfg".
Checking domain:
0004fb0000060000524f9d3e43fd71f3: PERMITTED
Checking resources:
file:/OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualDisks/0004fb0000120000590b281ac02ac9b2.img: PERMITTED
file:/OVS/Repositories/0004fb000003000082b0d717e2f9871d/ISOs/0004fb0000150000006463c3fe40be43.iso: PERMITTED
Dry Run: PASSED

VM Live migration to other Oracle VM Server

[root@ovs01 ~]# xm migrate -l 0004fb0000060000524f9d3e43fd71f3 ovs02.lab.local

How to install Oracle VM Manager – Part 1


OVS Server Details:

Hostname: ovs01.lab.local
IPADDRESS: 10.10.10.150
Oracle VM Server: 3.3.3

Oracle VM Manager Details:

Hostname: ovm.lab.local
IPADDRESS: 10.10.10.151
OS: Oracle Enterprise Linux 6.7
VM Manager: 3.3.3

NFS Server Details:

Hostname: mgmtsrv.lab.local
IPADDRESS: 10.10.10.11

Step 1: Install Prerequisites package

[root@ovm ~]# yum install ntp unzip zip perl libaio -y

Step 2: NTP configuration

[root@ovm ~]# cat > /etc/ntp.conf << EOF
driftfile /var/lib/ntp/drift

restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1
restrict -6 ::1

server mgmtsrv.lab.local iburst

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys
EOF

Step 3: Download and mount Oracle VM Manager

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

[root@ovm ~]# ls /mnt
components EULA oracle-validated.params ovmcore-console-1.0-42.el6.noarch.rpm OvmSDK_3.3.3.1085.zip TRANS.TBL
createOracle.sh LICENSE ovmcore-console-1.0-42.el5.noarch.rpm ovmm-installer.bsx runInstaller.sh

Step 4: Create Prerequisites for VM Manager

[root@ovm ~]# cd /mnt/
[root@ovm mnt]# ./createOracle.sh
Adding group 'oinstall' with gid '54321' ...
Adding group 'dba'
Adding user 'oracle' with user id '54321', initial login group 'dba', supplementary group 'oinstall' and home directory '/home/oracle' ...
Changing ownership of '/home/oracle' to oracle:dba
Creating user 'oracle' succeeded ...
For security reasons, no default password was set for user 'oracle'. If you wish to login as the 'oracle' user, you will need to set a password for this account.
Verifying user 'oracle' OS prerequisites for Oracle VM Manager ...
oracle soft nofile 8192
oracle hard nofile 65536
oracle soft nproc 2048
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft core unlimited
oracle hard core unlimited
Setting user 'oracle' OS limits for Oracle VM Manager ...
Altered file /etc/security/limits.conf
Original file backed up at /etc/security/limits.conf.orabackup
Verifying & setting of user limits succeeded ...
Creating mountpoint '/u01' ...
Modifying iptables for OVM
Adding rules to enable access to:
7002 : Oracle VM Manager https
54322 : Oracle VM Manager core via SSL
123 : NTP
10000 : Oracle VM Manager CLI Tool
service iptables status: stop
iptables: No config file. [WARNING]
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
Rules added.

Step 5: Install Oracle 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-12-025558.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 VM Manager admin password ##
Enter a password for all logins used during the installation (confirm): ## Re-Enter 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...
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 ...

Step 2 of 9 : Java ...
Installing Java ...

Step 3 of 9 : Database schema ...
Creating database 'ovs' ...
Creating database 'appfw'
Creating user 'ovs' for database 'ovs'...
Creating user 'appfw' for database 'appfw'

Step 4 of 9 : WebLogic and ADF...
Retrieving Oracle WebLogic Server 12c and ADF ...
Installing Oracle WebLogic Server 12c and ADF ...
Applying patches to Weblogic ...

Step 5 of 9 : Oracle VM ...
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 ...

Step 6 of 9 : Domain creation ...
Creating Oracle WebLogic Server domain ...
Starting Oracle WebLogic Server 12c ...
Creating Oracle VM Manager user 'admin' ...

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

Step 7 of 9 : Deploy ...
Configuring 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 ...

Step 8 of 9 : Oracle VM Tools ...

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' ...

Step 9 of 9 : Start OVM Manager ...
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...
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 : 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 installation complete.

Please remove configuration file /tmp/ovm_configls3iVa.