2.4. Using Oracle VM Retrieve Disk

2.4.1. Command Line Options and Parameters of ovm_vmdisk
2.4.2. Examples of ovm_vmdisk Usage

The ovm_vmdisks utility is designed to help the administrator make backups of virtual machines, particularly when the VM's virtual disks are files in a storage repository on a remote NFS storage server.

2.4.1. Command Line Options and Parameters of ovm_vmdisk

The ovm_vmdisks utility takes a virtual machine name or UUID and lists out every virtual disk file for that VM, 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.

The ovm_vmdisks 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

  • -v virtual machine name

  • -U virtual machine UUID

If the virtual disks are actual physical devices directly attached to the VM, the utility lists the device mapper entry on the Oracle VM Server to which the VM 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.

2.4.2. Examples of ovm_vmdisk Usage

Below is an example of ovm_vmdisk usage. It shows a virtual machine with three disks, each attached in a different way:

# ./ovm_vmdisks -u admin -p password -h localhost -v MyVM01 
Oracle VM Retrieve Disk utility 0.5.2.
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, VM 'MyVM01' is currently running. Note that backing up a running VM would be inconsistent, therefore it is highly recommended that you shut down the VM prior to making any backups. 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 was created 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