RedHat Red Hat Certified Specialist in OpenShift Virtualization - EX316무료 덤프문제 풀어보기
How do you create a VolumeSnapshotLocation for CSI-based snapshots in OADP?
정답:
See the Explanation.
Explanation:
1. Create the VolumeSnapshotLocation resource:
apiVersion: velero.io/v1
kind: VolumeSnapshotLocation
metadata:
name: default
namespace: oadp-operator
spec:
provider: aws
config:
region: us-east-1
2. Apply it: oc apply -f vsl.yaml
3. Confirm with: oc get volumesnapshotlocation -n oadp-operator
Explanation:
1. Create the VolumeSnapshotLocation resource:
apiVersion: velero.io/v1
kind: VolumeSnapshotLocation
metadata:
name: default
namespace: oadp-operator
spec:
provider: aws
config:
region: us-east-1
2. Apply it: oc apply -f vsl.yaml
3. Confirm with: oc get volumesnapshotlocation -n oadp-operator
How do you create a PersistentVolumeClaim (PVC) for a virtual machine root disk?
정답:
See the Explanation.
Explanation:
1. Define the PVC YAML:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vm-root-disk
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage:
10Gi
storageClassName: standard
2. Apply with: oc apply -f pvc.yaml
3. Verify with: oc get pvc vm-root-disk
4. Use this PVC in your VM definition.
Explanation:
1. Define the PVC YAML:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vm-root-disk
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage:
10Gi
storageClassName: standard
2. Apply with: oc apply -f pvc.yaml
3. Verify with: oc get pvc vm-root-disk
4. Use this PVC in your VM definition.
How do you configure MTU size for a Multus bridge interface via NMState?
정답:
See the Explanation.
Explanation:
1. Extend NMState policy:
interfaces:
- name: br-ext
type: linux-bridge
mtu: 1400
2. Apply to target node.
3. Confirm on node: ip link show br-ext
4. Validate from VM using ip link inside console.
5. Tune if needed based on physical infra.
Explanation:
1. Extend NMState policy:
interfaces:
- name: br-ext
type: linux-bridge
mtu: 1400
2. Apply to target node.
3. Confirm on node: ip link show br-ext
4. Validate from VM using ip link inside console.
5. Tune if needed based on physical infra.
How do you ensure VM uses Multus interface as default route?
정답:
See the Explanation.
Explanation:
1. Use cloud-init to override
routing: gateway4:
192.168.100.1
2. Make sure eth1 (Multus) gets default route.
3. Delete route from eth0 (pod) if needed.
4. Run ip route in VM to confirm.
5. Internet traffic will now use Multus.
Explanation:
1. Use cloud-init to override
routing: gateway4:
192.168.100.1
2. Make sure eth1 (Multus) gets default route.
3. Delete route from eth0 (pod) if needed.
4. Run ip route in VM to confirm.
5. Internet traffic will now use Multus.
How do you set up health checks for a VM service exposed via Route?
정답:
See the Explanation.
Explanation:
1. Add readinessProbe and livenessProbe to the VM (via custom sidecar or script).
2. Expose the endpoint on port 8080 or similar.
3. Create a service and Route to this port.
4. Monitor status from the Route interface.
5. Helps in load balancing and availability checks.
Explanation:
1. Add readinessProbe and livenessProbe to the VM (via custom sidecar or script).
2. Expose the endpoint on port 8080 or similar.
3. Create a service and Route to this port.
4. Monitor status from the Route interface.
5. Helps in load balancing and availability checks.
How do you expose a VM using a ClusterIP service for internal-only access?
정답:
See the Explanation.
Explanation:
1. Ensure the VM is running and listening on the desired port (e.g., 80).
2. Label the VM:
oc label vm <vm-name> app=web-vm
3. Create a service:
apiVersion: v1
kind: Service
metadata:
name: web-vm-svc
spec:
selector:
kubevirt.io/domain: <vm-name>
ports:
- port: 80
targetPort: 80
4. Apply with oc apply -f svc.yaml
5. Test with curl web-vm-svc.default.svc.cluster.local
Explanation:
1. Ensure the VM is running and listening on the desired port (e.g., 80).
2. Label the VM:
oc label vm <vm-name> app=web-vm
3. Create a service:
apiVersion: v1
kind: Service
metadata:
name: web-vm-svc
spec:
selector:
kubevirt.io/domain: <vm-name>
ports:
- port: 80
targetPort: 80
4. Apply with oc apply -f svc.yaml
5. Test with curl web-vm-svc.default.svc.cluster.local
How do you ensure a node has no residual VM pods before rebooting?
정답:
See the Explanation.
Explanation:
1. List pods on node:
oc get pods --all-namespaces -o wide | grep <node-name>
2. Filter pods with prefix: virt-launcher-
3. No VM pods should be present.
4. If found, verify status and reschedule.
5. Safe reboot can proceed once clear.
Explanation:
1. List pods on node:
oc get pods --all-namespaces -o wide | grep <node-name>
2. Filter pods with prefix: virt-launcher-
3. No VM pods should be present.
4. If found, verify status and reschedule.
5. Safe reboot can proceed once clear.
How do you verify a VM uses shared storage needed for live migration?
정답:
See the Explanation.
Explanation:
1. Check the disk volume
source: oc get vm <name> -o
yaml
2. Ensure persistentVolumeClaim or dataVolume is used.
3. Avoid containerDisk or local hostPath.
4. Validate that the PVC's storage class supports shared access.
5. Use oc describe pvc <name>.
Explanation:
1. Check the disk volume
source: oc get vm <name> -o
yaml
2. Ensure persistentVolumeClaim or dataVolume is used.
3. Avoid containerDisk or local hostPath.
4. Validate that the PVC's storage class supports shared access.
5. Use oc describe pvc <name>.
How do you configure a watchdog device for a VM?
정답:
See the Explanation.
Explanation:
1. Edit VM YAML and add:
domain:
devices:
watchdog:
i6300esb: {}
2. Start the VM and verify
with: ls /dev/watchdog*
3. Install watchdog inside the VM.
4. Start it: systemctl start watchdog
5. Protects against internal guest hangs.
Explanation:
1. Edit VM YAML and add:
domain:
devices:
watchdog:
i6300esb: {}
2. Start the VM and verify
with: ls /dev/watchdog*
3. Install watchdog inside the VM.
4. Start it: systemctl start watchdog
5. Protects against internal guest hangs.
How can you test that the virtualization API is responding?
정답:
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.
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 make cloud-init fields dynamic using template parameters?
정답:
See the Explanation.
Explanation:
1. Use substitution:
userData: |
#cloud-config
hostname: ${HOSTNAME}
ssh_authorized_keys:
- ${SSH_KEY}
2. Define HOSTNAME and SSH_KEY in template parameters.
3. Use oc process -p to override values.
4. Allows per-VM customization.
5. Great for templated automation.
Explanation:
1. Use substitution:
userData: |
#cloud-config
hostname: ${HOSTNAME}
ssh_authorized_keys:
- ${SSH_KEY}
2. Define HOSTNAME and SSH_KEY in template parameters.
3. Use oc process -p to override values.
4. Allows per-VM customization.
5. Great for templated automation.
How do you attach a secondary network to a running VM (live migration-safe)?
정답:
See the Explanation.
Explanation:
1. Shut down the VM (if needed for config update).
2. Edit VM to add Multus network (see Q4).
3. Restart VM: virtctl restart <vm>
4. Confirm both interfaces are present inside VM.
5. Ensure proper IP and route setup.
Explanation:
1. Shut down the VM (if needed for config update).
2. Edit VM to add Multus network (see Q4).
3. Restart VM: virtctl restart <vm>
4. Confirm both interfaces are present inside VM.
5. Ensure proper IP and route setup.