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's 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.
mkdir -p /data/images -
Ensure that the directory has permissions that provides read/write access to the
vdsmuser (UID 36) andkvmgroup (GID 36).chown 36:36 /data /data/imageschmod 0755 /data /data/imagesThe local storage can now be added to the virtualization environment.
Configuring a KVM Host to Use Local Storage
When you configure a KVM host to use local storage, it's 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 select Hosts.
The Hosts pane opens.
-
Highlight the host on which to add the local storage domain.
-
Select Management and then select Maintenance from the dropdown list.
The Status column for the host displays
Maintenancewhen the host has successfully entered into Maintenance mode. -
After the host is in
Maintenancemode, select Management and then select Configure Local Storage from the dropdown list.The Configure Local Storage pane opens with the General tab selected.
-
Select Edit next to the Data Center, Cluster, and Storage fields to configure and name the local storage domain.
-
In the Set the path to the local storage text input field, specify the path to the local storage domain.
For more information, see Preparing Local Storage for a KVM Host.
-
Select 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 select 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.logfile.
Using NFS Storage
Before preparing the NFS share, ensure the 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/passwdand/etc/groupdirectories, respectively.grep vdsm /etc/passwdvdsm:x:36:36:Node Virtualization Manager:/:/sbin/nologingrep kvm /etc/groupkvm:x:36:qemu,sanlock -
An Oracle Linux NFS File server that's reachable by the virtualization environment.
Preparing NFS Storage
To prepare NFS storage:
-
On a Linux fileserver that has access to the virtualization environment, create a directory to be used for the data domain.
mkdir -p /nfs/olv_ovirt/data -
Set the required permissions on the new directory to provide read/write access to the
vdsmuser (UID 36) andkvmgroup (GID 36).chown -R 36:36 /nfs/olv_ovirtchmod -R 0755 /nfs/olv_ovirt -
Add an entry for the newly created NFS share in the
/etc/exportsdirectory 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 don't 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 the virtualization environment by using the following format:/nfs/ol_ovirt/datahostname-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
showmountcommands on the NFS File Server.showmount -e | grep pathname-to-domain-share-addedshowmount -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's composed of preexisting 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 lets you create and manage groups of logical networks and iSCSI storage connections. After configuration, 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's composed of preexisting LUNs.
To attach an iSCSI data domain to the virtualization environment:
-
Go to Storage and then select Domains.
The Storage Domains pane opens.
-
Select New Domain.
The New Domain dialog box opens.
-
From the Data Center dropdown list, select the data center for which to attach the data domain.
The Default data center is preselected in the dropdown list.
For the procedures to create new data centers or a new clusters, see Data Centers or Clusters tasks.
-
For the Name field, enter a name for the data domain.
-
From the Domain Function dropdown list, select the domain function. By default, the Data option is selected in the dropdown list.
For this step, leave Data as the domain function because you're creating a data domain in this procedure.
-
From the Storage Type dropdown list, select iSCSI.
-
From the Host dropdown 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're adding storage isn't listed, complete the following fields in the Discover Targets dialog box:
-
For the Address field, enter the 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, select Discover.
The Target Name column updates to list all the available targets discovered on the storage array.
-
-
Under the Target Name column, select the required target and select the black right-directional arrow to sign in to the target.
The Storage Domains pane refreshes to list only the targets for which you signed in.
-
Select + to expand the required target.
The target expands to display all the unused LUNS.
-
Select Add for each LUN ID that's to connect to the target.
-
(Optional) Configure the advanced parameters.
If you're using ZFS storage, you must clear the Discard after Delete option.
-
Select OK.
You can select 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 the 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:
-
Select Compute Data Centers.
-
Select the data center name.
-
In the iSCSI Multipathing tab, select 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.
-
Select 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:
-
Change the current logical network so that it's not required.
-
Select Compute and then select Clusters.
-
Select the cluster name.
-
In the Logical Networks tab of the cluster detail page, select a current logical network and select Manage Networks.
As an example,
net-1is the name of the current logical network. -
Clear the Require checkbox and select OK.
-
-
Create a logical network that's not Required and not a VM network.
-
Select 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 checkbox.As an example,
net-2is the name of the new logical network. -
In the Cluster tab, clear the Require checkbox and select OK.
-
-
Remove the current network bond and reassign the logical networks.
-
Select Compute and then select Hosts.
-
Select the host name.
-
In the Network Interfaces tab of the host detail page, select 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), select 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 select OK.
-
-
Create the iSCSI bond.
-
Select Compute and then select Data Centers.
-
Select the data center name.
-
In the iSCSI Multipathing tab of the data center details page, select Add.
-
In the Add iSCSI Bond window, enter a Name, select the the old and new networks (for example,
net-1andnet-2) and select OK.
-
The data center now 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 select Domains.
The Storage Domains pane opens.
-
On the Storage Domains pane, select 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 dropdown list, select the Data Center for which to attach the data domain. By default, the Default option is selected in the dropdown list.
-
From the Domain Function dropdown list, select the domain function. By default, the Data option is selected in the dropdown list.
For this step, leave Data as the domain function because you're creating a data domain in this example.
-
From the Storage Type dropdown list, select Fibre Channel.
-
For the Host to Use dropdown 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.
-
Select Add next to the LUN ID that's connect to the target.
-
(Optional) Configure the advanced parameters.
-
Select OK.
You can select 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-imageioservice has been configured and is running.systemctl status ovirt-imageio.serviceWhen the service is running, the output displays as follows.
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-imageioservice has been configured and is running, for example:systemctl status ovirt-imageio-daemonovirt-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're using a browser that meets the browser requirement to access the Administration Portal.
For more information, see 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 the environment to a location on the desktop, laptop, or a system where the Manager is accessible from a Web browser.
-
Go to Storage and then select Disks.
The Disks pane opens.
-
Select Upload and then select Start from the dropdown list.
The Upload Image dialog box opens.
-
Select 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 selecting Test Connection.
If the test returns a warning or error message, see Before You Begin to review the prerequisites.
-
Select 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 can't move a storage domain into maintenance mode if a virtual machine has a lease on the storage domain. The virtual machine must be shut down, or the lease must be 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 select Domains.
The Storage Domains pane opens.
-
Select the storage domain’s name.
The details view of the storage domain opens.
-
Select the Data Center tab.
-
Select Maintenance.
The
Ignore OVF update failurecheckbox lets the storage domain 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.
-
Select OK.
The storage domain is deactivated and has an
Inactivestatus in the results list. You can now detach the inactive storage domain from the data center. -
Select 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.