Deploying an oVirt Cluster
After installing and deploying oVirt-host, you need to deploy the oVirt cluster to manage VMs. Deploying the oVirt cluster includes creating hosts, creating data domains and ISO domains, and creating and configuring VMs.
- On the management node, modify the /usr/share/ovirt-engine/ansible-runner-service-project/project/roles/ovirt-host-deploy-facts/tasks/host-os.yml file.
1vi /usr/share/ovirt-engine/ansible-runner-service-project/project/roles/ovirt-host-deploy-facts/tasks/host-os.ymlModify the following content:1 2 3 4 5
- name: Check if system is OpenEuler set_fact: ansible_python_interpreter: "{{ 'usr/bin/python3' }}" when: ansible_distribution == 'openEuler'
Into:
1 2 3 4 5
- name: Check if system is OpenEuler set_fact: ansible_python_interpreter: "{{ '/usr/bin/python3' }}" when: ansible_distribution == 'openEuler'

- On the management node, modify the permission group of /var/lib/ovirt-engine/external_truststore.
If the /var/lib/ovirt-engine/external_truststore file does not exist, skip this step.
1chown ovirt:ovirt /var/lib/ovirt-engine/external_truststore
- Install necessary software packages on the management node.
1yum install -y python3-flask python3-flask-restful python3-ansible-runner
- On the management node, modify the /usr/share/ovirt-engine/ansible-runner-service-project/project/roles/ovirt-host-deploy-vdsm/tasks/restart_services.yml file.
1vi /usr/share/ovirt-engine/ansible-runner-service-project/project/roles/ovirt-host-deploy-vdsm/tasks/restart_services.ymlAdd the following content before name: Start and enable services:1 2 3
- name: Reconfigure vdsm tool command: vdsm-tool configure --force changed_when: True

- Go to the oVirt management page and create a host.
- Go to the management page. In the navigation tree on the left, choose Compute > Hosts. The host page is displayed.
- On the host page, click New Host. On the page shown in Figure 1, enter the name, host name, IP address, and password. Retain the default values of other parameters.
- In Hostname/IP: Enter the host name or IP address of the host node.
- In Password: Enter the password for logging in to the host.
- Click OK to save the configuration. You can configure the power management as required.
- After the host is created, oVirt is automatically installed and configured. Wait until the host status changes to Up.
Figure 2 Host status
- Create a data domain.
- Create a path on the storage node.
1 2
mkdir -p /home/domain/data chown vdsm:kvm /home/domain/data
- Add an NFS share rule.
1echo "/home/domain/data *(rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)" >> /etc/exports
- Start the NFS service.
1 2
systemctl enable nfs systemctl start nfs
- Create a domain.
- In the navigation tree on the left, choose . The storage domain page is displayed.
- Click New Domain. The page shown in Figure 3 is displayed. Select the host name, enter a domain name, and set the export path. Retain the default values of other parameters.
- Host: In Figure 3, compute indicates the host name of the compute node. Replace it with the actual host name or IP address of the host.
- Name: Set this parameter as required.
- Export Path: Set this parameter as required.
- Click OK to save the configuration.
- After the data domain is created, oVirt is automatically installed and configured. Wait until Cross Data Center Status changes to Active.

- Create a path on the storage node.
- Create an ISO domain.
- Create a path on the storage node.
1 2
mkdir -p /home/domain/iso chown vdsm:kvm /home/domain/iso
- Add an NFS share rule.
1echo "/home/domain/iso *(rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)" >> /etc/exports
- Restart the NFS service.
1systemctl restart nfs
- Create an ISO domain.
- In the navigation tree on the left, choose . The storage domain page is displayed.
- Click New Domain. The page shown in Figure 4 is displayed. Select the host name, enter a domain name, and set the export path. Retain the default values of other parameters.
- Domain Function: Select ISO.
- In Figure 4, compute indicates the host name of the compute node. Replace it with the actual host name or IP address of the host.
- Name: Set this parameter as required.
- Export Path: Set this parameter as required.
- After the ISO domain is created, oVirt is automatically installed and configured. Wait until Cross Data Center Status changes to Active.

- Upload the image to the /home/domain/iso/${iso_domain_id}/images/11111111-1111-1111-1111-111111111111/ directory.
In the directory, ${iso_domain_id} is the ID automatically created by the ISO domain, and images/11111111-1111-1111-1111-111111111111/ is automatically created after step 6.d and cannot be changed.
- Modify the permission group of the image.
1 2 3
cd /home/domain/iso/${iso_domain_id}/images/11111111-1111-1111-1111-111111111111/ chown 36:36 ${iso_name} chmod 644 ${iso_name}
- Create a path on the storage node.
- In the navigation tree on the left, choose . On the cluster page that is displayed, check the data center status.

- Create a VM.
In the navigation tree on the left, choose . The VM page is displayed. Click New Virtual Machine. The page for creating a VM is displayed. Click Show Advanced Options to display more configuration items.
- Set VM parameters.
- On the VM creation page, click the General tab. The page shown in Figure 5 is displayed. Enter a VM name (for example, vm1) in the Name text box.
- In the Instance Images area, select Attach or Create. Select Bootable for the system drive.
Figure 6 Creating a virtual drive
Click OK to save the configuration.
- The virtual drive size cannot exceed the actual available space of the host. Set the size based on your requirements.
- Do not add three or more drives.
- Configure VM specifications.
- On the VM creation page, click the System tab and configure the memory and number of vCPUs.
Figure 7 System
- On the VM creation page, click the System tab and configure the memory and number of vCPUs.
- Configure console options.
- On the VM creation page, click the Console tab. The page shown in Figure 8 is displayed. Select VNC from the Graphics protocol drop-down list and retain the default values of other parameters.
- Click OK to save the configuration.
- Configure boot options as required.
- On the VM creation page, click the Boot Options tab. The page shown in Figure 9 is displayed.
- Optional: Select CD-ROM from the Second Device drop-down list.
- Select Attach CD.
- Select Enable menu to select boot device.
- After the configuration is complete, click OK. Click Run in the upper right corner to start the VM and install the OS.
Figure 10 Running the VM
To install the OS in GUI mode, you need to open the console. Click Console for the system to download the console.vv file automatically. Use Remote Viewer or VNC client to open the file.
- Set VM parameters.





