Storage
Oracle Linux Virtualization Manager uses a centralized storage system for virtual machine disk images, ISO files, and snapshots. You can use Network File System (NFS), Internet Small Computer System Interface (iSCSI), or Fibre Channel Protocol (FCP) storage. You can also configure local storage attached directly to hosts.
This following administration tasks cover preparing and adding local, NFS, iSCSI, and FCP storage.
Using Local Storage on a KVM Host
Before you begin, ensure the following prerequisites have been met:
-
You have allocated disk space for local storage. You can allocate an entire physical disk on the host or you can use a portion of the disk.
-
You have created a filesystem on the block device path to be used for local storage. Local storage should always be defined on a file system that is separate from the root directory (
/root)
.
Preparing Local Storage for a KVM Host
To prepare local storage for a KVM host:
-
Create the directory to be used for the local storage on the host.
Copy# mkdir -p /data/images
-
Ensure that the directory has permissions that allows read-write access to the
vdsm
user (UID 36) andkvm
group (GID 36).Copy# chown 36:36 /data /data/images # chmod 0755 /data /data/images
The local storage can now be added to your virtualization environment.
Configuring a KVM Host to Use Local Storage
When you configure a KVM host to use local storage, it is automatically added to a new data center and cluster that can contain no other hosts. With local storage, features, such as live migration, fencing, and scheduling, are not available.
To configure a KVM host to use local storage:
-
Go to Compute, and then click Hosts.
The Hosts pane opens.
-
Highlight the host on which to add the local storage domain.
-
Click Management and then select Maintenance from the drop-down list.
The Status column for the host displays
Maintenance
when the host has successfully entered into Maintenance mode. -
After the host is in
Maintenance
mode, click Management and then select Configure Local Storage from the drop-down list.The Configure Local Storage pane opens with the General tab selected.
-
Click Edit next to the Data Center, Cluster, and Storage fields to configure and name the local storage domain.
-
In the Set the path to your local storage text input field, specify the path to your local storage domain.
For more information, refer to Preparing Local Storage for a KVM Host.
-
Click OK to add the local storage domain.
When the virtualization environment is finished adding the local storage, the new data center, cluster, and storage created for the local storage appears on the Data Center, Clusters, and Storage panes, respectively.
You can click Tasks to monitor the various processing steps that are completed to add the local storage to the host.
You can also verify the successful addition of the local storage domain by viewing the
/var/log/ovirt-engine/engine.log
file.
Using NFS Storage
Before preparing the NFS share, ensure your environment meets the following conditions:
-
Ensure that the Manager and KVM host installation are running the Oracle Linux 8.8 or later in an environment with two or more servers where one acts as the Manager host and the other servers act as KVM hosts.
The installation creates a
vdsm:kvm
(36:36
) user and group in the/etc/passwd
and/etc/group
directories, respectively.# grep vdsm /etc/passwd vdsm:x:36:36:Node Virtualization Manager:/:/sbin/nologin
# grep kvm /etc/group kvm:x:36:qemu,sanlock
-
An Oracle Linux NFS File server that is reachable by your virtualization environment.
Preparing NFS Storage
To prepare NFS storage:
-
On a Linux fileserver that has access to the virtualization environment, create a directory that is to be used for the data domain.
# mkdir -p /nfs/olv_ovirt/data
-
Set the required permissions on the new directory to allow read-write access to the
vdsm
user (UID 36) andkvm
group (GID 36).# chown -R 36:36 /nfs/olv_ovirt # chmod -R 0755 /nfs/olv_ovirt
-
Add an entry for the newly created NFS share in the
/etc/exports
directory on the NFS file server that uses the following format: full-path-of-share-created*(rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)
.For example:
# vi /etc/exports # added the following entry /nfs/olv_ovirt/data *(rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)
Verify that the entry has been added.
# grep "/nfs/olv_ovirt/data" /etc/exports /nfs/ol_ovirt/data *(rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)
If you do not want to export the domain share to all servers on the network (denoted by the
*
before the left parenthesis), you can specify each individual host in your virtualization environment by using the following format:/nfs/ol_ovirt/data
hostname-or-ip-address(rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)
.For example:
/nfs/olv_ovirt/data hostname (rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)
-
Export the NFS share.
# exportfs -rv
-
Confirm that the added export is available to Oracle Linux Virtualization Manager hosts by using the following
showmount
commands on the NFS File Server.# showmount -e | grep pathname-to-domain-share-added # showmount -e | grep ip-address-of-host
Attaching an NFS Data Domain
To attach an NFS data domain:
-
Go to Storage and then click Domains.
The Storage Domains pane opens.
-
Click New Domain.
The New Domain dialog box opens.
-
From the Data Center drop-down list, select the Data Center for which to attach the data domain.
-
From the Domain Function drop-down list, select Data. By default, the Data option is selected in the drop-down list.
-
From the Storage Type drop-down list, select NFS. By default, the NFS option is selected in the drop-down list.
When NFS is selected for the Storage Type, the options that are applicable to this storage types (such as the required Export Path option) are displayed in the New Domain dialog box.
-
For the Host to Use drop-down list, select the host for which to attach the data domain.
-
For the Export Path option, enter the remote path to the NFS export to be used as the storage data domain in the text input field.
The Export Path option must be entered in one of the following formats: IP:/pathname or FQDN:/pathname (for example,
server.example.com:/nfs/olv_ovirt/data
).The /pathname that you enter must be the same as the path that you created on the NFS file server for the data domain in Preparing NFS Storage.
-
Click OK to attach the NFS storage data domain.
For information about uploading images to the data domain, see Uploading Images to the Data Domain.
Using iSCSI Storage
For iSCSI storage, a storage domain is created from a volume group that is composed of pre-existing LUNs. Neither volume groups nor LUNs can be attached to more than one storage domain at a time.
Multiple network paths between hosts and iSCSI storage prevent host downtime caused by network path failure. iSCSI multipathing enables you to create and manage groups of logical networks and iSCSI storage connections. Once configured, the Manager connects each host in a data center to each storage target using the NICs or VLANs that are assigned to the logical networks in the iSCSI bond.
You can create an iSCSI bond with multiple targets and logical networks for redundancy.
Attaching an iSCSI Data Domain
For iSCSI storage, a storage domain is created from a volume group that is composed of pre-existing LUNs.
To attach an iSCSI data domain to your virtualization environment:
-
Go to Storage and then click Domains.
The Storage Domains pane opens.
-
Click New Domain.
The New Domain dialog box opens.
-
From the Data Center drop-down list, select the data center for which to attach the data domain.
The Default data center is pre-selected in the drop-down list.
For the procedures to create new data centers or a new clusters, refer to Data Centers or Clusters tasks.
-
For the Name field, enter a name for the data domain.
-
From the Domain Function drop-down list, select the domain function. By default, the Data option is selected in the drop-down list.
For this step, leave Data as the domain function because you are creating a data domain in this procedure.
-
From the Storage Type drop-down list, select iSCSI.
-
From the Host drop-down list, select the host for which to attach the data domain.
-
When iSCSI is selected for the Storage Type, the Discover Targets dialog box opens and the New Domain dialog box automatically displays the known targets with unused LUNs under the Target Name column.
If the target from which you are adding storage is not listed, complete the following fields in the Discover Targets dialog box:
-
For the Address field, enter fully-qualified domain name or IP address of the iSCSI host on the storage array.
-
For the Port field, enter the port to connect to on the host when browsing for targets. By default, this field is automatically populated with the default iSCSI Port, 3260.
After completing these fields, click Discover.
The Target Name column updates to list all the available targets discovered on the storage array.
-
-
Under the Target Name column, select the desired target and select the black right-directional arrow to log in to the target.
The Storage Domains pane refreshes to list only the targets for which you logged in.
-
Click + to expand the desired target.
The target expands to display all the unused LUNS.
-
Click Add for each LUN ID that is to connect to the target.
-
(Optional) Configure the advanced parameters.
If you are using ZFS storage, you must uncheck the Discard after Delete option.
-
Click OK.
You can click Tasks to monitor the various processing steps that are completed to attach the iSCSI data domain to the data center.
After the iSCSI data domain has been added to your virtualization environment, you can then upload the ISO images that are used for creating virtual machines.
Configuring iSCSI Multipathing
Before you can configure iSCSI multipathing, ensure you have the following:
-
One or more iSCSI targets. For more information, see Attaching an iSCSI Data Domain.
-
One or more logical networks that are:
-
Not defined as Required or VM Network. For more information, see Migrating a Logical Network to an iSCSI Bond.
-
Assigned to a host interface.
-
Assigned a static IP address in the same VLAN and subnet as the other logical networks in the iSCSI bond.
For more information, see Creating a Logical Network.
-
To configure iSCSI multipathing:
-
Click Compute Data Centers.
-
Click the data center name.
-
In the iSCSI Multipathing tab, click Add.
-
In the Add iSCSI Bond window, enter a Name and optionally add a Description.
-
Select a logical network from Logical Networks and a storage domain from Storage Targets. You must select all paths to the same target.
-
Click OK.
The hosts in the data center are connected to the iSCSI targets through the logical networks in the iSCSI bond.
Migrating a Logical Network to an iSCSI Bond
If you have a logical network that you created for iSCSI traffic and configured on top of an existing network bond, you can migrate the logical network to an iSCSI bond on the same subnet without disruption or downtime.
To migrate a logical network to an iSCSI bond:
-
Modify the current logical network so that it is not required.
-
Click Compute and then click Clusters.
-
Click the cluster name.
-
In the Logical Networks tab of the cluster detail page, select a current logical network and click Manage Networks.
As an example,
net-1
is the name of the current logical network. -
Clear the Require check box and click OK.
-
-
Create a new logical network that is not Required and not VM network.
-
Click Add Network. This opens the New Logical Network window.
-
In the General tab, enter a Name (for example,
net-2
) and clear the VM network check box.As an example,
net-2
is the name of the new logical network. -
In the Cluster tab, clear the Require check box and click OK.
-
-
Remove the current network bond and reassign the logical networks.
-
Click Compute and then click Hosts.
-
Click the host name.
-
In the Network Interfaces tab of the host detail page, click Setup Host Networks.
-
Drag the old logical network (for example,
net-1
) to the right to unassign it. -
Drag the current bond to the right to remove it.
-
Drag the old logical network (for example,
net-1
) and the new logical network (for example,net-2
) to the left to assign them to physical interfaces. -
To edit the new logical network (for example,
net-2
), click its pencil icon. -
In the IPV4 tab of the Edit Network window, select Static.
-
Enter the IP and Netmask/Routing Prefix of the subnet and click OK.
-
-
Create the iSCSI bond.
-
Click Compute and then click Data Centers.
-
Click the data center name.
-
In the iSCSI Multipathing tab of the data center details page, click Add.
-
In the Add iSCSI Bond window, enter a Name, select the the old and new networks (for example,
net-1
andnet-2
) and click OK.
-
Your data center has an iSCSI bond containing the old and new logical networks.
Adding an FC Data Domain
To add an FC data domain:
-
Go to Storage and then click Domains.
The Storage Domains pane opens.
-
On the Storage Domains pane, click the New Domain button.
The New Domain dialog box opens.
-
For the Name field, enter a name for the data domain.
-
From the Data Center drop-down list, select the Data Center for which to attach the data domain. By default, the Default option is selected in the drop-down list.
-
From the Domain Function drop-down list, select the domain function. By default, the Data option is selected in the drop-down list.
For this step, leave Data as the domain function because you are creating a data domain in this example.
-
From the Storage Type drop-down list, select Fibre Channel.
-
For the Host to Use drop-down list, select the host for which to attach the data domain.
-
When Fibre Channel is selected for the Storage Type, the New Domain dialog box automatically displays the known targets with unused LUNs.
-
Click Add next to the LUN ID that is connect to the target.
-
(Optional) Configure the advanced parameters.
-
Click OK.
You can click Tasks to monitor the various processing steps that are completed to attach the FC data domain to the data center.
Uploading Images to the Data Domain
Before using the Manager to upload images to the data domain, you must perform the following steps to ensure that the prerequisites for uploading images have been met on the Manager and KVM hosts.
Before You Begin
To ensure that the prerequisites for uploading images to the data domain have been met:
-
On the engine host, verify that the
ovirt-imageio
service has been configured and is running.# systemctl status ovirt-imageio.service
When the service is running, the output displays as follows.
# systemctl status ovirt-imageio.service ovirt-imageio.service - oVirt ImageIO Loaded: loaded (/usr/lib/systemd/system/ovirt-imageio.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2019-03-25 13:12:29 PDT; 2 weeks 0 days ago Main PID: 28708 (ovirt-imageio-p) CGroup: /system.slice/ovirt-imageio.service └─28708 /usr/bin/python2 /usr/bin/ovirt-imageio ...
This service is automatically configured and is started when you run the engine-setup command during the installation of the Manager.
-
On the KVM host, verify that the
ovirt-imageio
service has been configured and is running. For example:# systemctl status ovirt-imageio-daemon ovirt-imageio-daemon.service - oVirt ImageIO Daemon Loaded: loaded (/usr/lib/systemd/system/ovirt-imageio-daemon.service; disabled; vendor preset: disabled) Active: active (running) since Wed 2019-03-27 18:38:36 EDT; 3 weeks 4 days ago Main PID: 366 (ovirt-imageio-d) Tasks: 4 CGroup: /system.slice/ovirt-imageio-daemon.service └─366 /usr/bin/python /usr/bin/ovirt-imageio-daemon Mar 27 18:38:36 myserver systemd[1]: Starting oVirt ImageIO Daemon... Mar 27 18:38:36 myserver systemd[1]: Started oVirt ImageIO Daemon.
-
Verify that the certificate authority has been imported into the web browser used to access the Manager by browsing to the following URL and enabling the trust settings:
https://engine_address/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA
-
Verify that you are using a browser that meets the browser requirement to access the Administration Portal.
For more information, refer to Logging into the Administration Portal in the Oracle Linux Virtualization Manager: Getting Started Guide.
Uploading an ISO Image to the Data Domain
To upload an ISO image to data domain using the Manager:
-
Download or copy an ISO image file that you want to upload into your environment to a location on your desktop, laptop, or a system where the Manager is accessible from a Web browser.
-
Go to Storage and then click Disks.
The Disks pane opens.
-
Click Upload and then select Start from the drop-down list.
The Upload Image dialog box opens.
-
Click Choose File and navigate to the location where you saved the ISO image.
-
Complete the Disk Options section of the dialog box.
-
Ensure that the prerequisites have been met by clicking Test Connection.
If the test returns a warning or error message, refer to Before You Begin to review the prerequisites.
-
Click OK to start uploading the ISO image.
The status field on the Disks pane tracks the progress of the upload.
After the ISO image upload is completed successfully, you can attach the image to virtual machines as CDROMs or use the image to boot virtual machines.
Note:
For information on uploading ISO images to data domains from the command line, see the My Oracle Support article Sample Script to Upload Disk/ISO To Storage Domain From Remote Linux Server (Doc ID 2830534.1).Detaching a Storage Domain from a Data Center
A storage domain must be in maintenance mode before it can be detached and removed. This is required to redesignate another data domain as the master data domain.
You cannot move a storage domain into maintenance mode if a virtual machine has a lease on the storage domain. The virtual machine needs to be shut down, or the lease needs to be to removed or moved to a different storage domain first.
To detach a storage domain from one data center to migrate it to another data center:
-
Shut down all the virtual machines running on the storage domain.
-
Go to Storage and then click Domains.
The Storage Domains pane opens.
-
Click the storage domain’s name.
The details view of the storage domain opens.
-
Click the Data Center tab.
-
Click Maintenance.
The
Ignore OVF update failure
check box allows the storage domain to go into maintenance mode even if the OVF update fails.Note:
The OVF_STORE disks are images that contain the metadata of virtual machines and disks that reside on the storage data domain.
-
Click OK.
The storage domain is deactivated and has an
Inactive
status in the results list. You can now detach the inactive storage domain from the data center. -
Click Detach.
-
Click OK to detach the storage domain.
Now that the storage domain is detached from the data center, it can be attached to another data center.