RedHat Red Hat Certified Specialist in OpenShift Virtualization - EX316 Exam Practice Test

How can you test that the virtualization API is responding?
Correct Answer:
See the Explanation.
Explanation:
1. Run: oc get apiservices v1.kubevirt.io
2. Check conditions: Available=True
3. Access API with:
oc proxy &
curl http://localhost:8001/apis/kubevirt.io/v1/namespaces/openshift-cnv/virtualmachines
4. Validate JSON response.
5. Kill the proxy process.
How do you verify the CDI (Containerized Data Importer) component status?
Correct Answer:
See the Explanation.
Explanation:
1. Run: oc get cdi -n openshift-cnv
2. Check pod status: oc get pods -n openshift-cnv | grep cdi
3. Inspect CR status: oc describe cdi cdi -n openshift-cnv
4. Validate controller logs: oc logs deployment/cdi-deployment -n openshift-cnv
5. Confirm data import is successful via PVC annotations.
How do you view parameters required by a template?
Correct Answer:
See the Explanation.
Explanation:
1. Run:
oc describe template <template-name> -n openshift
2. Scroll to Parameters section.
3. Note NAME, MEMORY, CPU, PVC, etc.
4. Use these parameters when processing the template.
5. Optional parameters have Required: false.
How do you ensure a virtual machine is in a state that allows cloning?
Correct Answer:
See the Explanation.
Explanation:
1. Confirm the VM is powered
off: virtctl stop <vm-name>
2. Ensure all VM disks are backed by DataVolumes or PVCs.
3. Verify the VM is not using ephemeral container disks.
4. Check disk volumeMode is Filesystem or Block if using CSI cloning.
5. Snapshot or backup before proceeding (optional safety).
How do you create a backup for a virtual machine using Velero CLI?
Correct Answer:
See the Explanation.
Explanation:
1. Run:
velero backup create vm-backup --include-namespaces <vm-namespace> --wait
2. Add --snapshot-volumes if CSI snapshots are supported.
3. Confirm backup: velero backup get
4. View logs: velero backup logs vm-backup
5. Backup stored in S3 or compatible storage.
How do you verify that snapshot was created using CSI and not manually?
Correct Answer:
See the Explanation.
Explanation:
1. Run:
oc get volumesnapshot <name> -o yaml
2. Check driver field in snapshotHandle.
3. CSI-backed snapshots show CSI driver (e.g., csi-ceph).
4. Ensure readyToUse: true.
5. Confirm automated snapshot integration.
How do you verify the performance of a VM disk (I/O benchmarking)?
Correct Answer:
See the Explanation.
Explanation:
1. Access the VM console: virtctl console <vm>
2. Run:
yum install -y fio
fio --name=test --size=1G --rw=randread --bs=4k --iodepth=64 --numjobs=4 --runtime=60
3. Evaluate read/write throughput and IOPS.
4. Test multiple storage classes if needed.
5. Tune disk type for better performance.
How do you monitor service endpoints for a VM-based service?
Correct Answer:
See the Explanation.
Explanation:
1. Run:
oc get endpoints <service-name>
2. It shows the pod IPs backing the service.
3. These IPs should match the VM pod IPs.
4. Validate with:
oc get pod -o wide | grep virt-launcher
How do you view VM migration history for audit purposes?
Correct Answer:
See the Explanation.
Explanation:
1. List past migration
objects: oc get vmim --all-
namespaces
2. Describe each:
oc describe vmim <name>
3. View status.phase, source and target nodes.
4. Use oc get events for time-specific logs.
5. Useful for debugging or reporting.
How do you automate the Multus and NMState config for new nodes?
Correct Answer:
See the Explanation.
Explanation:
1. Use MachineConfigPools or Ansible automation.
2. Apply NMState policies with nodeSelectors.
3. Label new nodes to match policies.
4. NADs are namespace-scoped and reusable.
5. Confirm bridge creation and VM compatibility.
How do you script the cloning of multiple VMs?
Correct Answer:
See the Explanation.
Explanation:
1. Use oc get vm -o name to list VMs.
2. For each, export YAML, rename metadata, and update disk refs.
3. Use Bash or Python to automate sed and oc apply.
4. Optionally, inject new cloud-init for each clone.
5. Validate each clone starts and is uniquely identified.
How do you simulate load balancing across VMs using an internal pod?
Correct Answer:
See the Explanation.
Explanation:
1. Deploy a test pod:
oc run tester --rm -it --image=alpine -- /bin/sh
2. Inside pod: apk add curl
3. Run: curl web-vm-svc multiple times
4. Confirm responses come from different VMs.
5. Load balancing is working.
How do you automate snapshot + Velero backup for VMs?
Correct Answer:
See the Explanation.
Explanation:
1. Use vmsnapshot to trigger snapshot.
2. Wait for snapshot to complete (readyToUse: true).
3. Use velero backup create with --include-resources volumesnapshots
4. Schedule this workflow via Jenkins or CronJob.
5. Store backups in object storage.