The ovm_servercontrol
utility operates on a
physical Oracle VM Server. It allows the administrator to execute basic
server commands on a given Oracle VM Server, query its status and retrieve
essential information.
The ovm_servercontrol
utility has the
following command line options:
-u user name of an Oracle VM Manager admin user (required)
-p password corresponding with the admin user name (required)
-h host name of the server running Oracle VM Manager (required)
-X use SSL to connect to
Oracle VM Manager at tcps://host
:54322
-s Oracle VM Server name
-I Oracle VM Server ID
-P agent password for the Oracle VM Server to be discovered (use together with -c discover)
-r storage repository name (for NFS export)
-i ID of the NFS export
-o options for the NFS export
-C client host name for the NFS export
-A acknowledge events (use together with -c events)
use -A all
to acknowledge events for the
Oracle VM Server and the virtual machines it hosts
-c console command (required)
[commands: start,
stop, restart, kill, discover, mainton, maintoff, status,
info, events, lock, upgrade, refresh, list, listnfsexports,
createnfsexport, deletenfsexport
]
The mainton
and maintoff
commands activate or deactivate the Oracle VM Server maintenance mode.
The discover
command performs a discovery
operation on an Oracle VM Server that was not yet previously
discovered by Oracle VM Manager.
The upgrade
command initiates a yum upgrade
on the given Oracle VM Server.
The list
command does not need an Oracle VM Server
name argument. It lists every Oracle VM Server registered with the
system.
Below are examples of ovm_servercontrol
commands and their respective output.
List all registered Oracle VM Servers:
# ./ovm_servercontrol -u admin -p password
-h localhost -c list
Oracle VM Server Control utility 0.5.2.
Connected.
Command : list
Server : 'OVS_01'
ID : '00:e0:81:4d:40:16:00:e0:81:4d:40:17:ff:ff:ff:ff'
pool : 'MyServerPool1'
status : 'Running'
Server : 'OVS_02'
ID : '00:e0:81:4d:5e:82:00:e0:81:4d:5e:83:ff:ff:ff:ff'
pool : 'unassigned'
status : 'Running'
Server : 'OVS_03'
ID : '00:e0:81:4d:5e:16:00:e0:81:4d:5e:17:ff:ff:ff:ff'
pool : 'MyServerPool1'
status : 'Running'
Server : 'OVS_04'
ID : '00:e0:81:4d:40:f5:00:e0:81:4d:40:be:00:e0:81:4d'
pool : 'unassigned'
status : 'Running'
Exit...
Check the status of an Oracle VM Server:
# ./ovm_servercontrol -u admin -p password
-h localhost -s OVS_03 -c status
Oracle VM Server Control utility 0.5.2.
Connected.
Command : status
Server : 'OVS_03' status : 'Running' serverpool : 'MyServerPool1'.
Exit...
Display detailed information of an Oracle VM Server:
# ./ovm_servercontrol -u admin -p password
-h localhost -s OVS_01 -c info
Oracle VM Server Control utility 0.5.2.
Connected.
Command : info
Server : OVS_01
Status : Running
Management IP: 10.172.76.90
Hostname : OVS_01
ID : 00:e0:81:4d:40:16:00:e0:81:4d:40:17:ff:ff:ff:ff
Pool : MyServerPool1
CPU threads : 4
CPU Usage : 1.877896
Total Memory : 32767
Usable Memory: 31261
Maintenance : false
Master Server: true
Up to date : true
Virtual Machines on this server :
Name : 'MyVM01'
Status : 'Stopped'
Name : 'MyVM02'
Status : 'Running'
Exit...
Restart an Oracle VM Server:
# ./ovm_servercontrol -u admin -p password
-h localhost -s OVS_02 -c restart
Oracle VM Server Control utility 0.5.2.
Connected.
Command : restart
restartserver 'OVS_02' completed.
Exit...
Expose an OCFS2 repository using NFS:
This example shows the creation of an NFS export and then lists the existing exports. The storage repository is exposed to two different clients, but then one export is deleted via its ID. The mount command at the end shows that the remaining export is still available.
# ./ovm_servercontrol -u admin -ppassword
-h localhost -c createnfsexport -s OVS_04 \ -C NFS_02 -o rw,no_root_squash -r MyIscsiRepo Oracle VM Server Control utility 0.5.2. Connected. Command : createnfsexport Creating nfs export for repository 'MyIscsiRepo' on server. Created repository export Exit... # ./ovm_servercontrol -u admin -p Manager1 -h localhost -c listnfsexports -s OVS_04 Oracle VM Server Control utility 0.5.2. Connected. Command : listnfsexports NFS Exports : id : 0004fb0000230000978a28e2dc85e06b client : NFS_01 options : repository : MyIscsiRepo path : /OVS/Repositories/0004fb000003000031fac25b24740cca/ --- id : 0004fb00002300004b161fd1a0d106b7 client : NFS_02 options : rw,no_root_squash repository : MyIscsiRepo path : /OVS/Repositories/0004fb000003000031fac25b24740cca/ --- Exit... # ./ovm_servercontrol -u admin -ppassword
-h localhost -c deletenfsexport -s OVS_04 \ -i 0004fb0000230000978a28e2dc85e06b Oracle VM Server Control utility 0.5.2. Connected. Command : deletenfsexport Deleting nfs export with ID '0004fb0000230000978a28e2dc85e06b' Deleted repository export Exit... [root@NFS_02]# mount OVS_04:/OVS/Repositories/0004fb000003000031fac25b24740cca /mnt/repoexport [root@NFS_02]# ls /mnt/repoexport Assemblies ISOs lost+found Templates VirtualDisks VirtualMachines