2.4.2 Oracle VM Retrieve Disk (ovm_vmdisks)

The ovm_vmdisks utility is designed to help the administrator make back ups of virtual machines, particularly when the virtual machine's virtual disks are files in a storage repository on a remote NFS storage server. The ovm_vmdisks utility takes a virtual machine name and lists out every virtual disk file for that virtual machine, as well as the virtual machine configuration (vm.cfg) file. This allows you to take the file listings from the output of the utility and back them up to a server or tape. If the virtual disks are actual physical devices directly attached to the virtual machine, the utility lists the device mapper entry on the Oracle VM Server to which the virtual machine is assigned. In case the virtual disks are files on an NFS server, the utility lists the NFS server name, mount point, and file name/location.


ovm_vmdisks { -u username } { -p password | -E } { -h hostname } [ -v vm_name ]


The following table shows the available options for this command.



-u username

The username of an Oracle VM Manager admin user. This option is required.

{ -p password | -E }

The -p option is the password corresponding with the admin username. Alternatively, you can use the -E option to set the password in an environment variable named OVMUTIL_PASS, and securely submit the password. To set this variable for a single session on Oracle Linux, use:

# export OVMUTIL_PASS=password

This option is required.

-h hostname

The hostname of the server running Oracle VM Manager. This option is required.

-v vm_name

The virtual machine name.


Example 2.4 Listing virtual disks for a virtual machine

This example shows a virtual machine with three disks, each attached in a different way.

# ./ovm_vmdisks -u admin -E -h localhost -v MyVM01 
Oracle VM Retrieve Disk Control utility version.
Virtual Machine : 'MyVM01' status : 'Running'.
Assigned Server : OVS_01
Virtual Disk : 'MyVM01_bootdisk' size : 20GB 
   file=/OVS/Repositories/0004fb0000030000b0272c74e714ab12/VirtualDisks/ \
   mountpoint=/dev/mapper/3300000006160a212/VirtualDisks/ \
Virtual Disk : 'MyVM01_datadisk' size : 250GB
   file=/OVS/Repositories/0004fb00000300005b06362f2d866a98/VirtualDisks/ \
   mountpoint=nfs01:/mnt/vol2/repo03/VirtualDisks/ \
Physical Disk : 'pd003'
Config File :
   file=/OVS/Repositories/0004fb00000300005b06362f2d866a98/ \
   mountpoint=nfs01:/mnt/vol2/repo03/VirtualMachines/ \

As you can see in the console output, the virtual machine MyVM01 is currently running. Backing up a running virtual machine would be inconsistent, therefore it is highly recommended that you shut down the virtual machine prior to making any back ups. The console output shows that the virtual machine contains three disks, two virtual and one physical, and also provides the location of the virtual machine configuration file:

  • MyVM01_bootdisk: A virtual disk on an OCFS2 storage repository. The OCFS2 repository is on the device /dev/mapper/3300000006160a212.

  • MyVM01_datadisk: A virtual disk on an NFS storage server named nfs01. The full path to the virtual disk file on the NFS server is /mnt/vol2/repo03/VirtualDisks/0004fb0000120000f217eb8c0fa70eef.img.

  • pd003: A raw disk device at /dev/mapper/3300000009b7b2cc4.

  • vm.cfg: The virtual machine configuration file on NFS server nfs01. The full path to the configuration file is nfs01:/mnt/vol2/repo03/VirtualMachines/0004fb00000600008757e38248a544e6/vm.cfg.