You can check the earlier post regarding cluster setup and ODF setup

Login to OpenShift, Software catalog, search virtualization operator

Click on Install

Click on Install

Click on Create HyperConverged option.

Click on Create.

Once Operator installation is configured. You can see Virtualization option in UI.

Under NetworkAttachmentDefinition, currently, you can see only two network which are related to ODF.

Note: You can deploy VMs using the default pod network; however, it is not accessible externally. For VMs, we may utilize a different VLAN. To configure and use a different VLAN, a dedicated secondary network must be set up.

You can create a traditional Linux bridge or OVN using unused NICs.

I am using an OVN. BOND created using two unused IPs.

You can download yaml file using below link

https://github.com/Dineshk1205/ocp4.20/blob/main/vovn.yaml

Note: – Updated Yaml file based on you infra.

Network successfully applied to all nodes.

The OVA bridge has been configured. You can now set up multiple networks according to your requirements.

Networks > NetworkAttachmentDefinitions > CreateNetworkAttachmentDefiniton

Enter network name, Select Network type as OVN secondary network.

Enter VLAN ID and click on create.

The network creation was successful. Similarly, you have the option to create multiple networks and associate them with a VM..

By default, OpenShift comes with Linux templates. You can use the default template to create a VM, or alternatively, you can create your own ISO to set up a VM.

I am using a default template to create a VM.

Virtualization > Catalog > select Rhel 9 os /any other os

Select RHEL 9

Enter Name and select resource (CPU and Memory)

Click on Customize Virtual Machine option

Click on network. By default, VM uses pod network. Click on edit option and select network.

Choose the network we created in the previous step

Click on init run option and Select add network data option and enter ethernet name, IP, gateway and apply. (Optional – you can also configure IP manually after VM deployment)

Click on Create VirtualMachine option.

VM is running and you can see the IP address – 10.10.20.28

You are able to ping the VM IP from externally/outside.

You can login to VM and ping gateway to check network accessibility.

By default, VM migration utilizes the default network. However, we can also set up a dedicated network.

Create a Network for VM Migration .

Note : Create a network in openshift-cnv project ,otherwise migration will not work .

You can download yaml file using below link

https://github.com/Dineshk1205/ocp4.20/blob/main/VMLiveMig.yaml

Virtualization > Overview > live migration network > select migration network .

Select VM > Migration > Compute (migrate virtualization to different node)

You select specific node or select automatically selected node option.

Click on Migrate VirtualMachine

Virtualization > overview > Migration

You can check migration status

VM Migration completed successfully