13.6. Virtual Disk Tasks

13.6.1. Creating Floating Virtual Disks

Summary
You can create a virtual disk that does not belong to any virtual machines. You can then attach this disk to a single virtual machine, or to multiple virtual machines if the disk is shareable.

Procedure 13.2. Creating Floating Virtual Disks

  1. Select the Disks resource tab.
  2. Click Add.
    Add Virtual Disk Window

    Figure 13.1. Add Virtual Disk Window

  3. Use the radio buttons to specify whether the virtual disk will be an Internal or External (Direct Lun) disk.
  4. Enter the Size(GB) of the virtual disk.
  5. Enter a name for the virtual disk in the Alias field.
  6. Enter a Description for the virtual disk.
  7. Select the virtual interface that the virtual disk will present to virtual machines from the Interface list.
  8. Select the provisioning policy for the virtual disk from the Allocation Policy list.
  9. Select the data center in which the virtual disk will be available from the Data Center list.
  10. Select the storage domain in which the virtual disk will be stored from the Storage Domain list.
  11. Select the disk profile to apply to the virtual disk from the Disk Profile list.
  12. Select the Wipe After Delete check box if you require the disk to be initialized after it is deleted. This increases security but is a more intensive operation and may prolong delete times.
  13. Select the Bootable check box to enable the bootable flag on the virtual disk.
  14. Select the Shareable check box to allow the virtual disk to be attached to more than one virtual machine at a time.
  15. Click OK.

13.6.2. Explanation of Settings in the Add Virtual Disk Window

Table 13.2. Add Virtual Disk Settings: Internal

Field Name
Description
Size(GB)
The size of the new virtual disk in GB.
Alias
The name of the virtual disk, limited to 40 characters.
Description
A description of the virtual disk. This field is recommended but not mandatory.
Interface
The virtual interface the disk presents to virtual machines. VirtIO is faster, but requires drivers. Red Hat Enterprise Linux 5 and higher include these drivers. Windows does not include these drivers, but they can be installed from the guest tools ISO or virtual floppy disk. IDE devices do not require special drivers.
Allocation Policy
The provisioning policy for the new virtual disk.
  • Preallocated allocates the entire size of the disk on the storage domain at the time the virtual disk is created. The virtual size and the actual size of a preallocated disk are the same. Preallocated virtual disks take more time to create than thinly provisioned virtual disks, but have better read and write performance. Preallocated virtual disks are recommended for servers and other I/O intensive virtual machines. If a virtual machine is able to write more than 1 GB every four seconds, use preallocated disks where possible.
  • Thin Provision allocates 1 GB at the time the virtual disk is created and sets a maximum limit on the size to which the disk can grow. The virtual size of the disk is the maximum limit; the actual size of the disk is the space that has been allocated so far. Thinly provisioned disks are faster to create than preallocated disks and allow for storage over-commitment. Thinly provisioned virtual disks are recommended for desktops.
Data Center
The data center in which the virtual disk will be available.
Storage Domain
The storage domain in which the virtual disk will be stored. The drop-down list shows all storage domains available in the given cluster, and also shows the total space and currently available space in the storage domain.
Disk Profile
The disk profile assigned to the virtual disk. Disk profiles define the maximum amount of throughput and the maximum level of input and output operations for a virtual disk in a storage domain. Disk profiles are defined on the storage domain level based on storage quality of service entries created for data centers.
Wipe After Delete
Allows you to enable enhanced security for deletion of sensitive material when the virtual disk is deleted.
Bootable
Allows you to enable the bootable flag on the virtual disk.
Shareable
Allows you to attach the virtual disk to more than one virtual machine at a time.
Read Only
Allows you to set the disk as read-only. The same disk can be attached as read-only to one virtual machine, and as rewritable to another.
The External (Direct Lun) settings can be displayed in either Targets > LUNs or LUNs > Targets. Targets > LUNs sorts available LUNs according to the host on which they are discovered, whereas LUNs > Targets displays a single list of LUNs.

Table 13.3. Add Virtual Disk Settings: External (Direct Lun)

Field Name
Description
Alias
The name of the virtual disk, limited to 40 characters.
Description
A description of the virtual disk. This field is recommended but not mandatory.
Interface
The virtual interface the disk presents to virtual machines. VirtIO is faster, but requires drivers. Red Hat Enterprise Linux 5 and higher include these drivers. Windows does not include these drivers, but they can be installed from the guest tools ISO or virtual floppy disk. IDE devices do not require special drivers.
Data Center
The data center in which the virtual disk will be available.
Use Host
The host on which the LUN will be mounted. You can select any host in the data center.
Storage Type
The type of external LUN to add. You can select from either iSCSI or Fibre Channel.
Discover Targets
This section can be expanded when you are using iSCSI external LUNs and Targets > LUNs is selected.
Address - The host name or IP address of the target server.
Port - The port by which to attempt a connection to the target server. The default port is 3260.
User Authentication - The iSCSI server requires User Authentication. The User Authentication field is visible when you are using iSCSI external LUNs.
CHAP user name - The user name of a user with permission to log in to LUNs. This field is accessible when the User Authentication check box is selected.
CHAP password - The password of a user with permission to log in to LUNs. This field is accessible when the User Authentication check box is selected.
Bootable
Allows you to enable the bootable flag on the virtual disk.
Shareable
Allows you to attach the virtual disk to more than one virtual machine at a time.
Read Only
Allows you to set the disk as read-only. The same disk can be attached as read-only to one virtual machine, and as rewritable to another.
Fill in the fields in the Discover Targets section and click the Discover button to discover the target server. You can then click the Login All button to list the available LUNs on the target server and, using the radio buttons next to each LUN, select the LUN to add.
Using LUNs directly as virtual machine hard disk images removes a layer of abstraction between your virtual machines and their data.
The following considerations must be made when using a direct LUN as a virtual machine hard disk image:
  • Live storage migration of direct LUN hard disk images is not supported.
  • Direct LUN disks are not included in virtual machine exports.
  • Direct LUN disks are not included in virtual machine snapshots.

Important

Mounting a journaled file system requires read-write access. Using the Read Only option is not appropriate for virtual machine disks that contain such file systems (e.g. EXT3, EXT4, or XFS).

13.6.3. Overview of Live Storage Migration

Virtual machine disks can be migrated from one storage domain to another while the virtual machine to which they are attached is running. This is referred to as live storage migration. When a disk attached to a running virtual machine is migrated, a snapshot of that disk's image chain is created in the source storage domain, and the entire image chain is replicated in the destination storage domain. As such, ensure that you have sufficient storage space in both the source storage domain and the destination storage domain to host both the disk image chain and the snapshot. A new snapshot is created on each live storage migration attempt, even when the migration fails.

Important

Live deletion of snapshots is not supported in data centers with a compatibility version below 3.5 and hosts that run on operating systems below Red Hat Enterprise Linux 7.1 and Red Hat Enterprise Virtualization Hypervisor 7.1. To remove the live storage migration snapshot in other data center and host configurations, you must manually delete it while the virtual machine is shut down. For detailed information on snapshot deletion, see the Snapshot Deletion section of the Red Hat Enterprise Virtualization Technical Guide.
Consider the following when using live storage migration:
  • Live storage migration creates a snapshot.
  • You can live migrate multiple disks at one time.
  • Multiple disks for the same virtual machine can reside across more than one storage domain, but the image chain for each disk must reside on a single storage domain.
  • You can live migrate disks only between two file-based domains (NFS, POSIX, and GlusterFS) or between two block-based domains (FCP and iSCSI).
  • You cannot live migrate direct LUN hard disk images or disks marked as shareable.

13.6.4. Moving a Virtual Disk

Move a virtual disk that is attached to a virtual machine or acts as a floating virtual disk from one storage domain to another. You can move a virtual disk that is attached to a running virtual machine; this is referred to as live storage migration. Alternatively, shut down the virtual machine before continuing. For more information on live storage migration, see Section 13.6.3, “Overview of Live Storage Migration”.
Consider the following when moving a disk:
  • You can move multiple disks at the same time.
  • If the virtual machine is shut down, you can move disks between any two storage domains in the same data center. If the virtual machine is running, you can move disks only between two file-based domains (NFS, POSIX, and GlusterFS) or between two block-based domains (FCP and iSCSI).
  • If the virtual disk is attached to a virtual machine that was created based on a template and used the thin provisioning storage allocation option, you must copy the disks for the template on which the virtual machine was based to the same storage domain as the virtual disk.

Procedure 13.3. Moving a Virtual Disk

  1. Select the Disks tab.
  2. Select one or more virtual disks to move.
  3. Click Move to open the Move Disk(s) window.
  4. From the Target list, select the storage domain to which the virtual disk(s) will be moved.
  5. From the Disk Profile list, select a profile for the disk(s), if applicable.
  6. Click OK.
The virtual disks are moved to the target storage domain, and have a status of Locked while being moved. If you moved a disk that is connected to a running virtual machine, a snapshot of that disk is created automatically, and is visible in the Snapshots tab of the details pane for that virtual machine. For information on removing the snapshot, see Section 10.12.4, “Deleting a Snapshot”.

13.6.5. Copying a Virtual Disk

Summary
You can copy a virtual disk attached to a template from one storage domain to another.

Procedure 13.4. Copying a Virtual Disk

  1. Select the Disks tab.
  2. Select the virtual disks to copy.
  3. Click the Copy button to open the Copy Disk(s) window.
  4. Use the Target drop-down menus to select the storage domain to which the virtual disk will be copied.
  5. Click OK.
Result
The virtual disks are copied to the target storage domain, and have a status of Locked while being copied.

13.6.6. Importing a Virtual Disk Image from an OpenStack Image Service

Summary
Virtual disk images managed by an OpenStack Image Service can be imported into the Red Hat Enterprise Virtualization Manager if that OpenStack Image Service has been added to the Manager as an external provider.
  1. Click the Storage resource tab and select the OpenStack Image Service domain from the results list.
  2. Select the image to import in the Images tab of the details pane.
  3. Click Import to open the Import Image(s) window.
  4. From the Data Center drop-down menu, select the data center into which the virtual disk image will be imported.
  5. From the Domain Name drop-down menu, select the storage domain in which the virtual disk image will be stored.
  6. Optionally, select a quota from the Quota drop-down menu to apply a quota to the virtual disk image.
  7. Click OK to import the image.
Result
The image is imported as a floating disk and is displayed in the results list of the Disks resource tab. It can now be attached to a virtual machine.

13.6.7. Exporting a Virtual Machine Disk to an OpenStack Image Service

Summary
Virtual machine disks can be exported to an OpenStack Image Service that has been added to the Manager as an external provider.
  1. Click the Disks resource tab.
  2. Select the disks to export.
  3. Click the Export button to open the Export Image(s) window.
  4. From the Domain Name drop-down list, select the OpenStack Image Service to which the disks will be exported.
  5. From the Quota drop-down list, select a quota for the disks if a quota is to be applied.
  6. Click OK.
Result
The virtual machine disks are exported to the specified OpenStack Image Service where they are managed as virtual machine disk images.

Important

Virtual machine disks can only be exported if they do not have multiple volumes, are not thinly provisioned, and do not have any snapshots.