최신RedHat Red Hat Certified Specialist in OpenShift Virtualization - EX316무료샘플문제
문제1
How do you configure a watchdog timeout value inside a VM?
How do you configure a watchdog timeout value inside a VM?
정답:
See the Explanation.
Explanation:
1. Edit /etc/watchdog.conf inside the VM.
2. Set:
watchdog-device = /dev/watchdog
watchdog-timeout = 15
3. Restart watchdog
service: systemctl
restart watchdog
4. Confirms custom timeout takes effect.
5. Helps tailor recovery thresholds.
Explanation:
1. Edit /etc/watchdog.conf inside the VM.
2. Set:
watchdog-device = /dev/watchdog
watchdog-timeout = 15
3. Restart watchdog
service: systemctl
restart watchdog
4. Confirms custom timeout takes effect.
5. Helps tailor recovery thresholds.
문제2
How do you view a VM's disk source to confirm cloning capability?
How do you view a VM's disk source to confirm cloning capability?
정답:
See the Explanation.
Explanation:
1. Run:
oc get vm <vm-name> -o yaml
2. Under spec.template.spec.volumes, find dataVolume or persistentVolumeClaim.
3. Validate the referenced PVC or DV exists.
4. Check backing PVC:
oc describe pvc <name>
5. If volume source is containerDisk, cloning is not supported.
Explanation:
1. Run:
oc get vm <vm-name> -o yaml
2. Under spec.template.spec.volumes, find dataVolume or persistentVolumeClaim.
3. Validate the referenced PVC or DV exists.
4. Check backing PVC:
oc describe pvc <name>
5. If volume source is containerDisk, cloning is not supported.
문제3
How do you convert a shell script into a systemd service?
How do you convert a shell script into a systemd service?
정답:
See the Explanation.
Explanation:
1. Create unit file:
vim /etc/systemd/system/hello.service
2. Add:
[Unit]
Description=Hello Service
[Service]
ExecStart=/usr/local/bin/hello.sh
Type=simple
[Install]
WantedBy=multi-user.target
3. Enable and start:
systemctl enable --now
hello
4. Confirm with systemctl status hello
Explanation:
1. Create unit file:
vim /etc/systemd/system/hello.service
2. Add:
[Unit]
Description=Hello Service
[Service]
ExecStart=/usr/local/bin/hello.sh
Type=simple
[Install]
WantedBy=multi-user.target
3. Enable and start:
systemctl enable --now
hello
4. Confirm with systemctl status hello
문제4
How do you configure a VM's readiness probe to delay service traffic?
How do you configure a VM's readiness probe to delay service traffic?
정답:
See the Explanation.
Explanation:
1. Edit the VM:
readinessP
robe:
tcpSocket:
port: 22
initialDelaySeconds: 15
periodSeconds: 5
2. VM won't receive traffic until SSH is up.
3. Used to gate service endpoints.
4. Verify with oc describe vmi
5. Check endpoint changes with oc get endpoints.
Explanation:
1. Edit the VM:
readinessP
robe:
tcpSocket:
port: 22
initialDelaySeconds: 15
periodSeconds: 5
2. VM won't receive traffic until SSH is up.
3. Used to gate service endpoints.
4. Verify with oc describe vmi
5. Check endpoint changes with oc get endpoints.
문제5
How do you automate the Multus and NMState config for new nodes?
How do you automate the Multus and NMState config for new nodes?
정답:
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.
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.
문제6
How do you assign a static IP to an imported VM via cloud-init?
How do you assign a static IP to an imported VM via cloud-init?
정답:
See the Explanation.
Explanation:
1. Modify the VM YAML to include cloud-init:
cloudInitNoCloud:
userData: |
#cloud-config
network:
version: 2
ethernets:
eth0:
addresses:
-
192.168.122.100/24
gateway4:
192.168.122.1
nameservers:
addresses: [8.8.8.8]
2. Save and restart the VM.
3. Check connectivity from inside the VM.
4. Use ip a and ping.
Explanation:
1. Modify the VM YAML to include cloud-init:
cloudInitNoCloud:
userData: |
#cloud-config
network:
version: 2
ethernets:
eth0:
addresses:
-
192.168.122.100/24
gateway4:
192.168.122.1
nameservers:
addresses: [8.8.8.8]
2. Save and restart the VM.
3. Check connectivity from inside the VM.
4. Use ip a and ping.
문제7
How do you verify if Multus network interfaces are attached correctly to VM pods?
How do you verify if Multus network interfaces are attached correctly to VM pods?
정답:
See the Explanation.
Explanation:
1. Run: oc get pod -l kubevirt.io/domain=<vm-name>
2. Inspect pod annotations:
oc get pod <pod-name> -o json | jq '.metadata.annotations["k8s.v1.cni.cncf.io/networks-status"]' | jq .
3. Verify presence of secondary network with IP.
4. Look for bridge or macvlan type.
5. Cross-check with VM's internal NICs.
Explanation:
1. Run: oc get pod -l kubevirt.io/domain=<vm-name>
2. Inspect pod annotations:
oc get pod <pod-name> -o json | jq '.metadata.annotations["k8s.v1.cni.cncf.io/networks-status"]' | jq .
3. Verify presence of secondary network with IP.
4. Look for bridge or macvlan type.
5. Cross-check with VM's internal NICs.
문제8
How do you test access to a VM using a ClusterIP service?
How do you test access to a VM using a ClusterIP service?
정답:
See the Explanation.
Explanation:
1. Deploy a test pod:
oc run testpod --rm -it --image=alpine -- /bin/sh
2. Run: apk add curl openssh-client
3. Test: curl http://vm-service.default.svc.cluster.local
4. For SSH: ssh user@vm-service (if keys or passwords are set).
5. Exit pod with exit.
Explanation:
1. Deploy a test pod:
oc run testpod --rm -it --image=alpine -- /bin/sh
2. Run: apk add curl openssh-client
3. Test: curl http://vm-service.default.svc.cluster.local
4. For SSH: ssh user@vm-service (if keys or passwords are set).
5. Exit pod with exit.
문제9
How do you upload a .vmdk file to the OpenShift cluster as a DataVolume?
How do you upload a .vmdk file to the OpenShift cluster as a DataVolume?
정답:
See the Explanation.
Explanation:
1. Ensure virtctl is installed.
2. Run:
virtctl image-upload dv imported-disk \
--size=20Gi \
--image-path=./my-disk.vmdk \
--storage-class=standard \
--access-mode=ReadWriteOnce \
--namespace=ova-import \
--insecure
3. Monitor progress with oc get dv -n ova-import
4. Wait for the status to be Succeeded.
5. This DataVolume will serve as the VM disk.
Explanation:
1. Ensure virtctl is installed.
2. Run:
virtctl image-upload dv imported-disk \
--size=20Gi \
--image-path=./my-disk.vmdk \
--storage-class=standard \
--access-mode=ReadWriteOnce \
--namespace=ova-import \
--insecure
3. Monitor progress with oc get dv -n ova-import
4. Wait for the status to be Succeeded.
5. This DataVolume will serve as the VM disk.
문제10
How do you extract the .ova file locally to access the .ovf and .vmdk files?
How do you extract the .ova file locally to access the .ovf and .vmdk files?
정답:
See the Explanation.
Explanation:
1. Run: tar -xvf my-vm.ova
2. This extracts:
o .ovf (Open Virtualization Format metadata)
o .vmdk (disk image)
3. Ensure file names do not contain spaces.
4. Move them into a dedicated directory.
5. These files will be used in the virt-v2v import.
Explanation:
1. Run: tar -xvf my-vm.ova
2. This extracts:
o .ovf (Open Virtualization Format metadata)
o .vmdk (disk image)
3. Ensure file names do not contain spaces.
4. Move them into a dedicated directory.
5. These files will be used in the virt-v2v import.
문제11
How do you check the system boot time and uptime of the VM OS?
How do you check the system boot time and uptime of the VM OS?
정답:
See the Explanation.
Explanation:
1. From VM console or
shell: uptime
2. Or get system boot
time: who -b
3. Optional:
systemd-analyze
4. Provides time since last reboot.
5. Useful in monitoring reboot behavior.
Explanation:
1. From VM console or
shell: uptime
2. Or get system boot
time: who -b
3. Optional:
systemd-analyze
4. Provides time since last reboot.
5. Useful in monitoring reboot behavior.
문제12
How do you enable the OpenShift Virtualization Operator using OperatorHub?
How do you enable the OpenShift Virtualization Operator using OperatorHub?
정답:
See the Explanation.
Explanation:
1. Access the OpenShift Web Console.
2. Navigate to Operators > OperatorHub.
3. Search for OpenShift Virtualization.
4. Click Install Choose openshift-cnv namespace Approve default install mode.
5. Verify installation with: oc get csv -n openshift-cnv
Explanation:
1. Access the OpenShift Web Console.
2. Navigate to Operators > OperatorHub.
3. Search for OpenShift Virtualization.
4. Click Install Choose openshift-cnv namespace Approve default install mode.
5. Verify installation with: oc get csv -n openshift-cnv
문제13
How do you apply critical OS updates to a node running VMs?
How do you apply critical OS updates to a node running VMs?
정답:
See the Explanation.
Explanation:
1. Migrate VMs: virtctl migrate <vm>
2. Drain node:
oc adm drain <node> --ignore-daemonsets --force --delete-emptydir-data
3. Apply OS updates (e.g., via dnf, yum, or rpm-ostree).
4. Reboot node.
5. Uncordon: oc adm uncordon <node>
Explanation:
1. Migrate VMs: virtctl migrate <vm>
2. Drain node:
oc adm drain <node> --ignore-daemonsets --force --delete-emptydir-data
3. Apply OS updates (e.g., via dnf, yum, or rpm-ostree).
4. Reboot node.
5. Uncordon: oc adm uncordon <node>
문제14
How do you assign a static IP to a VM's Multus interface using cloud-init?
How do you assign a static IP to a VM's Multus interface using cloud-init?
정답:
See the Explanation.
Explanation:
1. Add cloud-init section to VM:
cloudInitNoCloud:
userData: |
#cloud-config
network:
version: 2
ethernets:
eth1:
dhcp4: false
addresses:
- 192.168.100.20/24
gateway4:
192.168.100.1
nameservers:
addresses: [8.8.8.8]
2. Apply and start VM.
3. Access VM console and verify static IP.
4. Test network with ping.
5. Use ip route to confirm gateway.
Explanation:
1. Add cloud-init section to VM:
cloudInitNoCloud:
userData: |
#cloud-config
network:
version: 2
ethernets:
eth1:
dhcp4: false
addresses:
- 192.168.100.20/24
gateway4:
192.168.100.1
nameservers:
addresses: [8.8.8.8]
2. Apply and start VM.
3. Access VM console and verify static IP.
4. Test network with ping.
5. Use ip route to confirm gateway.
문제15
How do you add an additional disk to a running virtual machine?
How do you add an additional disk to a running virtual machine?
정답:
See the Explanation.
Explanation:
1. Create PVC: oc create pvc extra-disk --size=5Gi --storage-class=standard -- access-mode=ReadWriteOnce
2. Attach disk (Web UI Add Disk) or patch:
oc patch vm test-vm --type='json' -p='[{"op": "add", "path": "/spec/template/spec/domain/devices/disks/-",
"value": {"name": "extra-disk", "disk": {"bus": "virtio"}}},{"op": "add", "path":
"/spec/template/spec/volumes/-", "value": {"name": "extra-disk", "persistentVolumeClaim":
{"claimName": "extra-disk"}}}]'
3. Restart VM: virtctl restart test-vm
Explanation:
1. Create PVC: oc create pvc extra-disk --size=5Gi --storage-class=standard -- access-mode=ReadWriteOnce
2. Attach disk (Web UI Add Disk) or patch:
oc patch vm test-vm --type='json' -p='[{"op": "add", "path": "/spec/template/spec/domain/devices/disks/-",
"value": {"name": "extra-disk", "disk": {"bus": "virtio"}}},{"op": "add", "path":
"/spec/template/spec/volumes/-", "value": {"name": "extra-disk", "persistentVolumeClaim":
{"claimName": "extra-disk"}}}]'
3. Restart VM: virtctl restart test-vm