4.9 How are Virtual Disks Managed?

A virtual machine needs at least one disk – that is, a disk from which to boot and run the operating system. Virtual disks can be part of a template, assembly, can be created as part of the virtual machine creation process, or can be created independently inside the storage repository. Virtual disks can be shared across virtual machines, or dedicated to one virtual machine. All virtual disks available in the storage repository appear in Virtual Disks in the navigation tree when you select a storage repository, regardless of how they are created.

To create a virtual disk, see Create Virtual Disk in the Oracle VM Manager User's Guide. To import an virtual disk, see Import Virtual Disk in the Oracle VM Manager User's Guide. When you create a virtual machine from scratch, you are given the opportunity to either create a new virtual disk, or use an existing one. For more information about creating a virtual machine from scratch, see Create Virtual Machine in the Oracle VM Manager User's Guide.

While virtual disks may prove easy to manage and migrate, there is a performance cost associated, since file systems are nested within each other. It is possible to create a virtual machine that does not use a virtual disk, but uses virtual storage from a raw physical disk in the form of a LUN accessed directly by the virtual machine. Therefore, for virtual machine disks Oracle VM provides two options:

  • Virtual disks:: Disk image files on a file system, usually stored in a storage repository.

  • Raw physical disks: LUNs accessed directly by the virtual machine.

The design decision of virtual versus physical storage access depends on your server virtualization use cases as well as the existing storage hardware at your disposal. Virtual storage enables quick and easy on-the-fly configuration, but introduces a higher level of abstraction, since multiple file systems are nested within each other. Therefore, when using virtual storage it is important to balance ease of use against the lower performance compared to physical storage. Physical storage access implies that virtual machine disk storage is mapped directly onto the LUNs configured in the physical storage hardware, which is exactly like the way physical servers access their storage. The advantage here is that existing procedures and storage management practices can be maintained.

Virtual disks can be detected as different device types within a virtual machine. Older templates and virtual machines tend to detect these disks as hdx devices, while newer virtual machines and templates detect virtual disks as xvdx devices. Oracle VM does not support virtual machines that use mixed device types for virtual disks. If you are are working with an older template or virtual machine, it is recommended that you remove all current disk mappings and then recreate them so that they use the new xvdx device types. Alternately, if your virtual machine does not support xvdx device types at all, you should edit the vm.cfg file for the virtual machine by hand to ensure that any storage devices, such as a virtual cdrom device, are changed from xvdx devices to hdx devices. For instance, you might change the following entry in the vm.cfg file:

disk = [
file:/OVS/Repositories/0004fb00000300000eaa1a4a8e297e7c/VirtualDisks\ 
        /0004fb0000120000ce3f55b28a87d068.img,xvda,w,
file:/OVS/Repositories/0004fb00000300000eaa1a4a8e297e7c/ISOs\
       /0004fb000015000040ba0ea64887c0d0.iso,xvdb:cdrom,r]

to:

disk = [
file:/OVS/Repositories/0004fb00000300000eaa1a4a8e297e7c/VirtualDisks\
        /0004fb0000120000ce3f55b28a87d068.img,hda,w,
file:/OVS/Repositories/0004fb00000300000eaa1a4a8e297e7c/ISOs\
       /0004fb000015000040ba0ea64887c0d0.iso,hdb:cdrom,r]
Note

Oracle supports the provisioning of a virtual machine with Oracle Cluster File System version 2 (OCFS2) on a virtual disk image, regardless of the underlying shared file system. That is to say, Oracle supports OCFS2 on virtual machines in an Oracle VM environment even if the underlying repository is NFS based. However, the subnet that is used for the private interconnect inside the virtual machine must not conflict with the subnet used on dom0.