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