4.1 Topic 351: Full Virtualization – Simulado Flashcards

Linux Sem Fronteiras

1
Q

Which file can be verified to identify if the system’s CPU has virtualization features enabled?

(Specify the full path to the file)

A

Resposta: /proc/cpuinfo

Sub-Topic: 351.1 – Virtualization Concepts and Theory

Justification: The /proc/cpuinfo files contains detailed information about the system’s CPUs, including the features related to virtualization. For AMD CPUs, the virtualization feature is identified as “svm” (Secure Virtual Machine), while for Intel CPUs, it is identified as “vmx” (Virtual Machine Extensions).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the term used to describe VM migrations between hosts?

  • P2V
  • P2P
  • V2V
  • Full Migration
  • Dynamic Migration
A

Resposta: V2V

Sub-Topic: 351.1 – Virtualization Concepts and Theory

Justification: V2V stands for “Virtual-to-Virtual Migration”. It refers to the process of migrating virtual machines (VMs) from one virtualization platform or host to another. This migration involves transferring the entire VM configuration, including its virtual disks, memory, and settings, from the source environment to the target environment. P2V would be related to the process of converting a physical server or computer into a virtual machine (VM) that can run on a virtualization platform.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following statements are true about Full Virtualization? (Choose THREE correct answers.)

  • Full Virtualization allows guest operating systems to run unmodified.
  • Full Virtualization requires hardware support from the host CPU.
  • Full Virtualizaton requires the installation of specific guest drivers.
  • Full Virtualization is faster than Paravirtualization.
  • VM Guests running under Full Virtualization are not aware of virtualization.
A

Resposta:

  • Full Virtualization allows guest operating systems to run unmodified.
  • Full Virtualization requires hardware support from the host CPU.
  • VM Guests running under Full Virtualization are not aware of virtualization.

Sub-Topic: 351.1 – Virtualization Concepts and Theory

Justification: Full Virtualiation/HVM enables running guest operating systems without requiring modifications to their code, making it suitable for various operating systems, that are not specifically designed or aware of the virtualization environment. Full Virtualization relies on hardware-assisted virtualization features (smv/vmx) provided by the CPU to efficiently virtualize hardware resources. Paravirtualization, a different virtualization technique, involves modifying the guest operating system to be aware of the virtualized environment. This awareness allows for more efficient communication between the guest and the hypervisor, resulting in potentially better performance compared to Full Virtualization. In Full Virtualization, the guest operating system is not modified, leading to overhead in handling privileged instructions and other operations, which can impact performance. However, advancements in hardware-assisted virtualization technologies have minimized this performance gap between Full Virtualization and paravirtualization in recent years.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the true characteristics of Emulation?
(Choose TWO correct answers.)

  • Emulation requires modification of guest operating systems.
  • Emulation can be slower than native execution.
  • Emulation needs hardware-assisted virtualization to be used.
  • Emulation is always faster than virtualization.
  • Emulation is primarily used for running replicas of another system.
A

Resposta:

  • Emulation can be slower than native execution.
  • Emulation is primarily used for running replicas of another system.

Sub-Topic: 351.1 – Virtualization Concepts and Theory

Justification: Emulation involves simulating the behavior of hardware or software on a different platform than originally intended. This process allows software designed for one system to run on another system that may have different architecture or operating environment. While emulation provides versatility by enabling the execution of unmodified guest operating systems or applications, it often comes with performance overhead. This overhead arises because the emulated system needs to interpret and translate instructions meant for the original system into instructions compatible with the host system. As a result, emulation can be slower than native execution, making it less efficient for resource-intensive tasks. Despite this drawback, emulation remains valuable for running legacy software, testing applications across different platforms, and facilitating cross-platform development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which software is an open-source virtualization management platform?

  • VMware ESXi
  • oVirt
  • LXC
  • KVM
  • Open vSwitch
A

Resposta: oVirt

Sub-Topic: 351.1 – Virtualization Concepts and Theory

Justification: oVirt is an open-source virtualization management platform that provides a comprehensive virtualization solution. It allows organizations to manage virtualized infrastructures, including virtual machines, storage, and networking, through a centralized web-based interface. With features like live migration, high availability, and resource management, oVirt is suitable for deploying and managing virtualized environments in data centers and cloud deployments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In which type of virtualization does the guest operating system need to be modified to enhance its integration with the hypervisor?

  • Paravirtualization
  • Full Virtualization
  • Containerization
  • Hardware-Assisted Virtualization
  • Emulation
A

Resposta: Paravirtualization

Sub-Topic: 351.1 – Virtualization Concepts and Theory

Justification: Paravirtualization is a virtualization technique where the guest operating system is modified to be aware of the virtualized environment, including the hypervisor. This modification allows for more efficient communication between the guest and the hypervisor, leading to improved performance compared to full virtualization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What systemd service is specifically designed for managing virtual machines and containers?

  • systemd-machined
  • systemd-virtualized
  • systemd-vm-manager
  • systemd-machinectl
  • systemd-nspawn
A

Resposta: systemd-machined

Sub-Topic: 351.1 – Virtualization Concepts and Theory

Justification: The systemd-machined service is dedicated to managing virtual machines and containers within the systemd ecosystem. It provides essential functionalities for controlling, monitoring, and maintaining virtual instances, offering robust integration and efficiency within Linux environments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the primary configuration file for XL?

  • /etc/xen/xl.conf
  • /var/lib/xl/xl.conf
  • /etc/xl/xen.conf
  • /usr/lib/xen/xl.cfg
A

Resposta: /etc/xen/xl.conf

Sub-Topic: 351.2 – Xen

Justification: The XL toolstack is a user-friendly interface used for managing virtual machines (VMs) in Xen-based virtualization environments. The main configuration file is typically located at “/etc/xen/xl.conf”. This file stores various global settings and configurations that apply to all virtual machines managed by xl, making it an essential component for customizing and optimizing the Xen virtualization environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which command is used for interfacing with XAPI?

  • xl
  • xm
  • xenstore
  • xapi
  • xe
A

Resposta: xe

Sub-Topic: 351.2 – Xen

Justification: XAPI, or XenAPI, is a management interface for Xen virtualization environments. The “xe” command-line tool provides a comprehensive set of commands for managing Xen hosts, virtual machines, storage, and networking using XAPI. It allows administrators to perform various administrative tasks, such as creating VMs, configuring networks, and monitoring system performance in Xen-based virtualization environments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What directive specifies the network interface for a domain in Xen?

  • network-interface
  • interface
  • net
  • vif
  • eth0
A

Resposta: vif

Sub-Topic: 351.2 – Xen

Justification: In Xen, “vif” stands for Virtual Interface and is used to configure networking for virtual machines (domains). By specifying “vif” directives in the domain configuration files, administrators can define network interfaces, assign IP addresses, set up VLANs, and configure other networking parameters for virtual machines running on Xen hosts. For example: vif = [‘bridge=xenbr0’], in this case, it connects the VM’s network interface to the Xen bridge named “xenbr0”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which xl sub-command displays the storage devices connected to the domain?

  • disk-list
  • storage-list
  • attach-list
  • device-list
  • block-list
A

Resposta: block-list

Sub-Topic: 351.2 – Xen

Justification: The “xl block-list” command provides information about the block devices, such as disks or partitions, that are connected to the specified domain in Xen. It is useful for administrators to check the storage configuration of virtual machines and troubleshoot storage-related issues in Xen environments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What QEMU Monitor command creates a new snapshot?

(Specify ONLY the command without any path or parameters.)

A

Resposta: savevm

Sub-Topic: 351.3 – QEMU

Justification: The correct QEMU Monitor command to create a new snapshot is “savevm.” This command is used to save the current state of the virtual machine as a snapshot, allowing users to revert to this state later if needed, using “loadvm”. It is an essential feature for managing virtual machine configurations and system states in QEMU-based virtualization environments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the methods that QEMU can use to have a direct access to storage devices?
(Choose THREE correct answers.)

  • iSCSI
  • SSH (Secure Shell)
  • Disk Image Files
  • NFS
  • CIFS
A

Resposta:

  • iSCSI
  • SSH (Secure Shell)
  • Disk Image Files

Sub-Topic: 351.3 – QEMU

Justification: In addition to using normal file images for the emulated storage devices, QEMU can also use net-worked resources. The direct alternatives are: iSCSI, NBD, SSH, GlusterFS, HTTP/HTTPS/FTP/FTPS. QEMU itself does not directly use NFS or CIFS to access devices, for these cases, it relies on the host operating system’s file system capabilities. Some examples:

qemu-system-x86_64 –drive file=iscsi://…
qemu-system-x86_64 –drive file=nbd:…
qemu-system-x86_64 –drive file=ssh://…
qemu-system-x86_64 –drive file=gluster://…
qemu-system-x86_64 –drive file=https://…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When starting an instance with QEMU/KVM, which option should be used to provide parameters to the kernel?

  • kernel
  • append
  • drive
  • initrd
  • params
A

Resposta: -append

Sub-Topic: 351.3 – QEMU

Justification: The “-append” option allows users to append additional parameters to the kernel command line. Parameters specified with “-append” are passed directly to the kernel during boot, enabling customization of kernel behavior and initialization. This is commonly used to specify parameters such as root device, kernel options, and other boot-time configurations required by the operating system running within the virtual machine. For example: qemu-system-x86_64 -append “console=ttyS0 quiet” -kernel bzImage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which module needs to be loaded for KVM to utilize the virtualization features of an Intel CPU?

  • kvm_intel
  • vmx
  • svm
  • intel_hvm
  • cpuinfo
A

Resposta: kvm_intel

Sub-Topic: 351.3 – QEMU

Justification: The kvm_intel kernel module (kvm-intel.ko) provides support for Intel’s hardware-assisted virtualization technology, enabling KVM to efficiently utilize virtualization extensions present in Intel CPUs. Without loading this module, KVM will not be able to access and utilize the full capabilities of Intel CPU virtualization, leading to degraded virtual machine performance and functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Where are the configuration files of virtual machines managed by libvirt typically located?

  • /var/lib/libvirt
  • /usr/libvirt/qemu
  • /etc/libvirt/qemu
  • /etc/qemu
  • /usr/lib/qemu/libvirt
A

Resposta: /etc/libvirt/qemu

Sub-Topic: 351.4 – Libvirt Virtual Machine Management

Justification: The configuration files for virtual machines managed by libvirt are typically stored in the directory “/etc/libvirt/qemu/”. These XML-formatted configuration files contain settings such as virtual hardware configuration, disk and network device settings, and other parameters necessary for defining and managing virtual machines using libvirt. Placing the configuration files in this directory allows libvirt to easily access and manage virtual machines on the host system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which option of the “virsh” command is used to restore a snapshot on a VM?

  • snapshot-revert
  • snapshot-restore
  • load-snapshot
  • recover-snapshot
  • undo-snapshot
A

Resposta: snapshot-revert

Sub-Topic: 351.4 – Libvirt Virtual Machine Management

Justification: The “snapshot-revert” option allows you to revert the VM’s state to the state captured in a specific snapshot. By executing the “snapshot-revert” command along with the name or ID of the snapshot and the name of the VM, you can effectively restore the VM to a previous state, undoing any changes made after the snapshot was taken. This functionality is essential for managing VMs and reverting to known-good states in case of issues or changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which statements are true about the network environment managed by libvirt?
(Choose THREE correct answers.)

  • Libvirt can manage both NAT and bridged networking configurations.
  • Libvirt supports only NAT-based networking.
  • Linux bridges are commonly utilized in virtualization environments managed by libvirt.
  • The default network mode for a VM created with Libvirt is NAT.
  • User Networking is the default network mode for VMs created with Libvirt.
A

Resposta:

  • Libvirt can manage both NAT and bridged networking configurations.
  • Linux bridges are commonly utilized in virtualization environments managed by libvirt.
  • The default network mode for a VM created with Libvirt is NAT.

Sub-Topic: 351.4 – Libvirt Virtual Machine Management

Justification: Libvirt can create and manage various types of virtual networks, including NAT, bridged, and also VLAN configurations, offering comprehensive network management capabilities for virtualization environments. Linux bridges are, by default, used in virtualization setups that are managed by libvirt. NAT serves as the default network mode in Libvirt to ensure seamless network connectivity and ease of use for virtual machines without requiring complex network configurations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the process responsible for assigning IPs to instances managed by libvirt?

  • dhcpd
  • systemd-resolved
  • dnsmasq
  • acpid
  • NetworkManager
A

Resposta: - dnsmasq

Sub-Topic: 351.4 – Libvirt Virtual Machine Management

Justification: dnsmasq is a lightweight DHCP and DNS server commonly used in virtualization environments to manage IP address assignments for virtual machines. It provides DHCP services, allocating IP addresses to instances upon request. Additionally, dnsmasq integrates DNS functionality, allowing virtual machines to resolve domain names to IP addresses within the local network. As such, dnsmasq serves as a key component for managing networking in libvirt environments, enabling seamless IP address assignment and DNS resolution for virtual machines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which option of the “virsh” command displays information about the CPUs of a domain?

  • cpustatus
  • vcpuinfo
  • info
  • inspect
  • domaincpu
A

Resposta: - vcpuinfo

Sub-Topic: 351.4 – Libvirt Virtual Machine Management

Justification: The option of “virsh” command to display information about the CPUs of a domain is “vcpuinfo”. This option retrieves detailed information about the virtual CPUs (vCPUs) assigned to the specified domain, including number of vCPUs, running time and affinity to physical processors. Other valid commands would be vcpucount, vcpupin and cpu-stats, for running domains.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What virsh command is used to change the XML configuration of a storage pool?

(Specify ONLY the command without any path or parameters)

A

Resposta: pool-edit

Sub-Topic: 351.4 – Libvirt Virtual Machine Management

Justification: The “pool-edit” command opens the XML configuration file of the specified storage pool in a text editor, allowing administrators to make necessary changes to the configuration parameters. By using “pool-edit,” users can adjust settings such as storage volume paths, storage type, allocation policies, and other parameters defined in the XML configuration. This flexibility enables administrators to customize storage pool configurations according to their specific requirements and preferences.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Which image format in Linux environments is capable of supporting snapshots?

  • RAW
  • VDI
  • VMDK
  • QCOW2
  • IMG
A

Resposta: QCOW2

Sub-Topic: 351.5 – Virtual Machine Disk Image Management

Justification: QCOW2 (QEMU Copy-On-Write version 2) is a versatile disk image format commonly used in virtualization environments, including those managed by libvirt and QEMU. QCOW2 supports advanced features such as snapshots, which allow users to capture the state of a virtual disk at a specific point in time. This snapshot functionality enables administrators to create backups, roll back to previous states, and perform other operations without modifying the original disk image. Therefore, QCOW2 is a preferred choice for virtual disk images in Linux environments where snapshot capabilities are required.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What command in qemu-img is used to change an image from VDI to QCOW2 format?

(Specify ONLY the command without any path or parameters.)

A

Resposta: convert

Sub-Topic: 351.5 – Virtual Machine Disk Image Management

Justification: The “convert” command in qemu-img allows for the conversion of disk images between different formats. In this case, specifying “-f vdi” indicates the input image format as VDI, and “-O qcow2” specifies the output image format as QCOW2. The syntax is: “qemu-img convert -f vdi -O qcow2 input_image.vdi output_image.qcow2”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which command can be used to directly transfer a local file to an image of a virtual machine?

  • virt-scp
  • dd
  • qemu-ssh
  • qemu-img
  • virt-copy-in
A

Respota: virt-copy-in

Sub-Topic: 351.5 – Virtual Machine Disk Image Management

Justification: The correct command that can be used to send a local file directly to an image of a virtual machine is “virt-copy-in.” This command is part of the libguestfs tools suite, specifically designed for interacting with virtual machine disk images. With “virt-copy-in,” users can copy files or directories from the local filesystem into the guest filesystem of a virtual machine image. This method enables efficient and straightforward file transfer operations, allowing administrators to quickly inject files into virtual machine images without needing to boot the virtual machine or set up additional network services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Which commands can be used to restore the snapshot named “Environment1” in the image “production.qcow2”?

(Choose TWO correct answers.)

  • virsh snapshot-revert production.qcow2 Environment1
  • qemu-img snapshot -a Environment1 production.qcow2
  • virt-restore Environment1 production.qcow2
  • virsh snapshot-recover production.qcow2 Environment1
  • virsh snapshot -r Environment1 production.qcow2
A

Resposta:
- virsh snapshot-revert production.qcow2 Environment1

  • qemu-img snapshot -a Environment1 production.qcow2

Sub-Topic: 351.5 – Virtual Machine Disk Image Management

Justification: The “virsh snapshot-revert” command revert the given domain to the snapshot specified or the current snapshot. qemu-img also have the “snapshot” command with the -a option will apply a snapshot to the image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Identificação da Virtualização em um Sistema Linux

Pergunta:
Qual comando pode ser usado para verificar se a CPU suporta virtualização por hardware no Linux?

A

Resposta esperada:
egrep -o ‘vmx|svm’ /proc/cpuinfo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Módulos do Kernel para Virtualização

Pergunta:
Quais são os módulos do kernel que devem estar carregados para suportar virtualização com KVM em processadores Intel e AMD?

A

Resposta esperada:
Intel: kvm_intel
AMD: kvm_amd

Para verificar se os módulos estão carregados:
lsmod | grep kvm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Configuração de Virtualização no BIOS/UEFI

Pergunta:
Qual configuração deve ser habilitada no BIOS/UEFI para ativar suporte a virtualização por hardware em processadores modernos?

A

Resposta esperada:
Intel: VT-x (Intel Virtualization Technology)
AMD: AMD-V (AMD Virtualization Technology)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Verificação de Virtualização Usando virt-what

Pergunta:
Qual comando pode ser usado para identificar se um sistema está rodando dentro de um ambiente virtualizado e qual hipervisor está sendo utilizado?

A

Resposta esperada:
virt-what

Esse comando retorna o hipervisor detectado, como kvm, vmware, xen, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Verificação de Suporte a Virtualização no Kernel Linux

Pergunta:
Qual arquivo no /sys pode ser verificado para confirmar se o KVM está ativado e funcional no sistema? (Especifique o caminho completo).

A

Resposta esperada:
cat /sys/module/kvm/parameters/enabled

Se retornar Y, o KVM está ativado.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Migração de VMs - Tipos de Conversão

Pergunta:
Qual termo descreve a conversão de um sistema físico em uma máquina virtual?

Opções:
(A) P2V
(B) V2P
(C) P2P
(D) Live Migration
(E) Snapshot Migration

A

Resposta correta: (A) P2V (Physical to Virtual)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Migração de VMs - Live vs. Cold

Pergunta:
Qual é a principal diferença entre Live Migration e Cold Migration de VMs?

Opções:
(A) Live Migration exige desligamento da VM, Cold Migration não.
(B) Live Migration ocorre com a VM em execução, enquanto Cold Migration requer que a VM seja desligada.
(C) Live Migration só funciona com KVM, enquanto Cold Migration é genérica.
(D) Live Migration ocorre entre servidores de diferentes arquiteturas de CPU, enquanto Cold Migration requer a mesma arquitetura.
(E) Cold Migration só pode ser feita entre hypervisores diferentes.

A

Resposta correta: (B) (Live Migration ocorre com a VM em execução, enquanto Cold Migration requer que a VM seja desligada.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Hypervisores e Migração
Pergunta:

Qual dos seguintes hypervisores suporta Live Migration nativamente?

Opções:
(A) VirtualBox
(B) VMware ESXi
(C) QEMU/KVM
(D) Microsoft Hyper-V
(E) Todas as anteriores, exceto (A)

A

Resposta correta: (E) Todas as anteriores, exceto (A) (VirtualBox não suporta Live Migration nativamente.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Migração entre Hypervisores

Pergunta:
O que significa o termo V2V (Virtual to Virtual) no contexto de migração de máquinas virtuais?

Opções:
(A) Migração entre servidores físicos diferentes.
(B) Conversão de uma VM em um hypervisor para outra VM em um hypervisor diferente.
(C) Cópia de arquivos de uma VM para outra.
(D) Migração de uma VM para a nuvem.
(E) Restauração de uma VM após um snapshot.

A

Resposta correta: (B) Conversão de uma VM em um hypervisor para outra VM em um hypervisor diferente.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Pré-requisitos para Live Migration

Pergunta:
Qual das seguintes configurações não é obrigatória para uma migração ao vivo de VMs (Live Migration)?

Opções:
(A) Armazenamento compartilhado entre os hosts de origem e destino.
(B) CPUs idênticas no host de origem e destino.
(C) Hypervisores compatíveis em ambos os hosts.
(D) Rede de baixa latência entre os servidores.
(E) Memória RAM suficiente no host de destino.

A

Resposta correta: (B) CPUs idênticas no host de origem e destino. (Nem todos os hypervisores exigem CPUs idênticas, desde que haja suporte a recursos como CPU masking ou CPU compatibility mode.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Guest OS Behavior in Full Virtualization

Which of the following statements are true about guest operating systems in Full Virtualization? (Choose THREE correct answers.)

☐ Guest operating systems can run without modification.
☐ Guest operating systems require special drivers to function.
☐ Guest operating systems run in user mode while the hypervisor operates in kernel mode.
☐ The hypervisor provides an abstraction layer to simulate hardware for the guest OS.
☐ Guest operating systems must be specifically designed for virtualization.

A

Correct answers:
✅ Guest operating systems can run without modification.
✅ The hypervisor provides an abstraction layer to simulate hardware for the guest OS.
✅ Guest operating systems run in user mode while the hypervisor operates in kernel mode.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Role of the Hypervisor in Full Virtualization

Which of the following are characteristics of a hypervisor in Full Virtualization? (Choose THREE correct answers.)

☐ The hypervisor manages CPU, memory, and device access for virtual machines.
☐ The hypervisor requires direct support from the guest OS to function.
☐ The hypervisor can perform hardware emulation to allow unmodified guest OS execution.
☐ The hypervisor must be installed inside each virtual machine.
☐ The hypervisor can either be Type-1 (bare-metal) or Type-2 (hosted).

A

Correct answers:
✅ The hypervisor manages CPU, memory, and device access for virtual machines.
✅ The hypervisor can perform hardware emulation to allow unmodified guest OS execution.
✅ The hypervisor can either be Type-1 (bare-metal) or Type-2 (hosted).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Hardware Requirements for Full Virtualization

Which of the following statements about hardware requirements for Full Virtualization are true? (Choose THREE correct answers.)

☐ Full Virtualization requires CPU support for virtualization extensions such as Intel VT-x or AMD-V.
☐ Full Virtualization does not depend on any specific hardware capabilities.
☐ Full Virtualization can use hardware-assisted memory management features like Extended Page Tables (EPT).
☐ Full Virtualization requires all guest operating systems to use the same CPU architecture as the host.
☐ Full Virtualization benefits from I/O virtualization technologies like VT-d.

A

Correct answers:
✅ Full Virtualization requires CPU support for virtualization extensions such as Intel VT-x or AMD-V.
✅ Full Virtualization can use hardware-assisted memory management features like Extended Page Tables (EPT).
✅ Full Virtualization benefits from I/O virtualization technologies like VT-d.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Performance Considerations in Full Virtualization

Which of the following statements about performance in Full Virtualization are correct? (Choose THREE correct answers.)

☐ Full Virtualization introduces some overhead due to hardware emulation.
☐ Full Virtualization is always faster than Paravirtualization.
☐ Full Virtualization benefits from hardware-assisted virtualization to reduce performance overhead.
☐ Full Virtualization can experience degraded I/O performance without specialized drivers.
☐ Full Virtualization does not require any additional optimization techniques.

A

Correct answers:
✅ Full Virtualization introduces some overhead due to hardware emulation.
✅ Full Virtualization benefits from hardware-assisted virtualization to reduce performance overhead.
✅ Full Virtualization can experience degraded I/O performance without specialized drivers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Security Aspects of Full Virtualization

Which of the following statements are true regarding security in Full Virtualization? (Choose THREE correct answers.)

☐ Full Virtualization provides strong isolation between guest VMs.
☐ Security vulnerabilities in the hypervisor can impact all guest VMs.
☐ A compromised guest VM can directly access the host system without restrictions.
☐ Full Virtualization benefits from hardware security features like Trusted Execution Technology (TXT).
☐ Each VM in Full Virtualization has direct access to the host kernel.

A

Correct answers:
✅ Full Virtualization provides strong isolation between guest VMs.
✅ Security vulnerabilities in the hypervisor can impact all guest VMs.
✅ Full Virtualization benefits from hardware security features like Trusted Execution Technology (TXT).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

Characteristics of Virtualization vs. Emulation

What are the key differences between Virtualization and Emulation? (Choose TWO correct answers.)

☐ Virtualization allows guest operating systems to run directly on the host CPU, while emulation translates instructions.
☐ Emulation provides better performance than virtualization in most cases.
☐ Virtualization requires hardware support, while emulation does not.
☐ Emulation can only be used for running legacy software.
☐ Virtualization always requires modifying the guest operating system.

A

Correct answers:
✅ Virtualization allows guest operating systems to run directly on the host CPU, while emulation translates instructions.
✅ Virtualization requires hardware support, while emulation does not.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Use Cases for Emulation

In which scenarios is emulation typically preferred over virtualization? (Choose TWO correct answers.)

☐ Running software designed for a different CPU architecture.
☐ Improving performance by bypassing the host system’s limitations.
☐ Testing applications across multiple platforms.
☐ Running unmodified guest operating systems with near-native performance.
☐ Reducing overhead by using direct hardware access.

A

Correct answers:
✅ Running software designed for a different CPU architecture.
✅ Testing applications across multiple platforms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Performance Considerations in Emulation

Which of the following statements about emulation performance are true? (Choose TWO correct answers.)

☐ Emulation generally introduces more overhead compared to virtualization.
☐ Emulation is usually faster than native execution.
☐ The performance of an emulated system depends on the efficiency of the translation process.
☐ Emulation always requires hardware virtualization support to reduce overhead.
☐ Emulation provides the best performance when used on the same CPU architecture.

A

Correct answers:
✅ Emulation generally introduces more overhead compared to virtualization.
✅ The performance of an emulated system depends on the efficiency of the translation process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Hardware Support for Virtualization and Emulation

Which of the following statements regarding hardware support for virtualization and emulation are correct? (Choose TWO correct answers.)

☐ Virtualization benefits from CPU extensions like Intel VT-x and AMD-V.
☐ Emulation requires specialized hardware to function.
☐ Emulation can run without dedicated virtualization extensions.
☐ Virtualization can work without hardware support, but it introduces significant overhead.
☐ Both virtualization and emulation provide the same level of hardware performance.

A

Correct answers:
✅ Virtualization benefits from CPU extensions like Intel VT-x and AMD-V.
✅ Emulation can run without dedicated virtualization extensions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

Security Implications of Emulation

Which of the following are potential security concerns when using emulation? (Choose TWO correct answers.)

☐ Emulated environments may introduce vulnerabilities due to imperfect hardware replication.
☐ Emulation improves security by preventing guest systems from interacting with the host.
☐ Malicious software can exploit vulnerabilities in the emulator to escape into the host system.
☐ Emulated environments always provide the same level of isolation as full virtualization.
☐ Emulation inherently prevents all types of security threats.

A

Correct answers:
✅ Emulated environments may introduce vulnerabilities due to imperfect hardware replication.
✅ Malicious software can exploit vulnerabilities in the emulator to escape into the host system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

irtualization Management Platforms

Which of the following tools is an open-source alternative to VMware vSphere for managing virtualized environments?

☐ Proxmox VE
☐ VirtualBox
☐ OpenStack
☐ Docker
☐ XenServer

A

Correct answer:
✅ Proxmox VE

Justification:
Proxmox VE is an open-source virtualization management platform that integrates KVM and LXC for managing virtual machines and containers. It provides a web-based interface and supports features like live migration, clustering, and high availability, making it a strong alternative to proprietary solutions like VMware vSphere.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

Hypervisors in Full Virtualization

Which of the following are examples of Type-1 hypervisors? (Choose TWO correct answers.)

☐ VMware Workstation
☐ Microsoft Hyper-V
☐ KVM
☐ VirtualBox
☐ Xen

A

Correct answers:
✅ Microsoft Hyper-V
✅ Xen

Justification:
Type-1 hypervisors, also known as bare-metal hypervisors, run directly on the hardware without requiring a host operating system. Microsoft Hyper-V and Xen are both Type-1 hypervisors. In contrast, VMware Workstation and VirtualBox are Type-2 hypervisors, which run on top of a host OS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

Features of Virtualization Management Platforms

Which of the following features are commonly found in virtualization management platforms like oVirt and Proxmox? (Choose THREE correct answers.)

☐ Centralized web-based management
☐ Native container orchestration for Kubernetes workloads
☐ High availability for virtual machines
☐ Support for live migration
☐ Direct integration with Windows Hyper-V

A

Correct answers:
✅ Centralized web-based management
✅ High availability for virtual machines
✅ Support for live migration

Justification:
Virtualization management platforms like oVirt and Proxmox provide a centralized web-based interface for managing virtual machines. They also offer high availability and live migration, ensuring minimal downtime in virtualized environments. However, Kubernetes orchestration and direct integration with Hyper-V are not core features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

Comparison of Virtualization and Containerization

What are the primary differences between virtualization and containerization? (Choose TWO correct answers.)

☐ Virtualization uses hypervisors, while containerization uses the host OS kernel.
☐ Containers provide stronger security isolation than virtual machines.
☐ Virtual machines include a full guest operating system, while containers share the host OS.
☐ Virtualization is only used for cloud computing, whereas containerization is used for on-premises deployments.
☐ Virtualization always requires hardware-assisted acceleration, while containerization does not.

A

Correct answers:
✅ Virtualization uses hypervisors, while containerization uses the host OS kernel.
✅ Virtual machines include a full guest operating system, while containers share the host OS.

Justification:
Virtualization relies on hypervisors like KVM or VMware ESXi to run full guest operating systems, while containers (e.g., Docker, LXC) share the host OS kernel, making them lighter and faster. Containers, however, do not provide the same level of isolation as virtual machines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Networking in Virtualized Environments

Which of the following networking solutions is commonly used for managing virtualized network infrastructure?

☐ Open vSwitch
☐ iptables
☐ QEMU
☐ cgroups
☐ SELinux

A

Correct answer:
✅ Open vSwitch

Justification:
Open vSwitch (OVS) is a virtual switch designed for virtualized environments, providing advanced networking features such as VXLAN tunneling, VLAN tagging, and SDN (Software-Defined Networking) integration. It is commonly used with KVM, Xen, and OpenStack to manage network traffic between virtual machines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

Key Differences Between Full Virtualization and Paravirtualization

Which of the following are key differences between Full Virtualization and Paravirtualization? (Choose TWO correct answers.)

☐ Paravirtualization requires modifications to the guest OS, while Full Virtualization does not.
☐ Full Virtualization provides better performance than Paravirtualization.
☐ Paravirtualization does not require any hypervisor support.
☐ Full Virtualization allows unmodified guest OS to run, while Paravirtualization requires guest OS modifications.
☐ Paravirtualization eliminates the need for a hypervisor.

A

Correct answers:
✅ Paravirtualization requires modifications to the guest OS, while Full Virtualization does not.
✅ Full Virtualization allows unmodified guest OS to run, while Paravirtualization requires guest OS modifications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

Paravirtualization and Hypervisors

Which of the following hypervisors support Paravirtualization? (Choose TWO correct answers.)

☐ VMware ESXi
☐ Xen
☐ KVM
☐ Microsoft Hyper-V
☐ VirtualBox

A

Correct answers:
✅ Xen
✅ KVM

Justification:
Xen and KVM both support Paravirtualization (PV), allowing guest operating systems to interact more efficiently with the hypervisor. VMware ESXi and Hyper-V primarily focus on Full Virtualization, and VirtualBox does not provide true Paravirtualization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

Paravirtualization Performance Benefits

Which of the following are benefits of Paravirtualization over Full Virtualization? (Choose TWO correct answers.)

☐ Reduced CPU overhead due to direct communication with the hypervisor.
☐ Ability to run unmodified guest operating systems without changes.
☐ Improved I/O performance compared to Full Virtualization.
☐ Eliminates the need for hypervisors entirely.
☐ Requires specialized hardware to function.

A

Correct answers:
✅ Reduced CPU overhead due to direct communication with the hypervisor.
✅ Improved I/O performance compared to Full Virtualization.

Justification:
Paravirtualization improves performance by reducing the need for binary translation and direct emulation. It allows the guest OS to communicate with the hypervisor efficiently, reducing CPU overhead and improving I/O performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

Paravirtualization vs. Hardware-Assisted Virtualization

How does Paravirtualization compare to Hardware-Assisted Virtualization? (Choose TWO correct answers.)

☐ Hardware-Assisted Virtualization relies on CPU extensions like Intel VT-x and AMD-V.
☐ Paravirtualization requires CPU support for virtualization extensions.
☐ Hardware-Assisted Virtualization allows guest OS to run without modification.
☐ Paravirtualization is always slower than Hardware-Assisted Virtualization.
☐ Both techniques completely eliminate virtualization overhead.

A

Correct answers:
✅ Hardware-Assisted Virtualization relies on CPU extensions like Intel VT-x and AMD-V.
✅ Hardware-Assisted Virtualization allows guest OS to run without modification.

Justification:
Hardware-Assisted Virtualization uses CPU extensions like Intel VT-x and AMD-V, allowing guest operating systems to run without requiring modifications. In contrast, Paravirtualization requires guest OS modifications but can reduce overhead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

Use Cases for Paravirtualization

In which scenarios is Paravirtualization preferred over Full Virtualization? (Choose TWO correct answers.)

☐ When running legacy operating systems that cannot be modified.
☐ When optimizing performance in virtualized workloads that require high efficiency.
☐ When using a hypervisor that does not support hardware-assisted virtualization.
☐ When the guest operating system must remain unaware of the hypervisor.
☐ When avoiding all virtualization overhead.

A

Correct answers:
✅ When optimizing performance in virtualized workloads that require high efficiency.
✅ When using a hypervisor that does not support hardware-assisted virtualization.

Justification:
Paravirtualization is useful when hardware-assisted virtualization is not available or when performance needs to be optimized. Since it requires modifications to the guest OS, it is not suitable for running unmodified legacy systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Systemd and Virtualization Management

Which systemd component is responsible for managing lightweight containers in a way similar to chroot?

☐ systemd-machined
☐ systemd-virtualized
☐ systemd-vm-manager
☐ systemd-nspawn
☐ systemd-machinectl

A

Correct answer:
✅ systemd-nspawn

Justification:
systemd-nspawn is used to create and manage lightweight containers in a manner similar to chroot, but with additional isolation features. Unlike systemd-machined, which manages both virtual machines and containers, systemd-nspawn is specifically focused on containerized environments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

Controlling Virtual Machines with Systemd

Which command is used to list and interact with virtual machines and containers managed by systemd-machined?

☐ machinectl
☐ systemctl list-machines
☐ systemd-machinedctl
☐ vmctl
☐ virtctl

A

Correct answer:
✅ machinectl

Justification:
The machinectl command is used to list, start, stop, and manage virtual machines and containers handled by systemd-machined. It integrates tightly with systemd, providing efficient control over virtualized instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

systemd-machined Functionalities

Which of the following are functions provided by systemd-machined? (Choose TWO correct answers.)

☐ Managing and tracking virtual machines and containers.
☐ Creating Docker containers.
☐ Providing a unified API for querying and interacting with VM instances.
☐ Running unprivileged LXC containers.
☐ Installing guest operating systems automatically.

A

Correct answers:
✅ Managing and tracking virtual machines and containers.
✅ Providing a unified API for querying and interacting with VM instances.

Justification:
systemd-machined is responsible for managing virtual instances and providing an API for querying and interacting with them. However, it does not directly create Docker containers or install guest operating systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

Integration of systemd-machined with Other Virtualization Tools

Which virtualization technologies integrate well with systemd-machined? (Choose TWO correct answers.)

☐ QEMU/KVM
☐ Docker
☐ VMware ESXi
☐ VirtualBox
☐ LXC

A

Correct answers:
✅ QEMU/KVM
✅ LXC

Justification:
systemd-machined integrates well with QEMU/KVM for managing virtual machines and LXC for handling lightweight containers. It does not directly support Docker, as Docker has its own management tools.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

Differences Between systemd-machined and Other Tools

What are the differences between systemd-machined and traditional hypervisors like KVM or VMware? (Choose TWO correct answers.)

☐ systemd-machined is a service that tracks virtual machines and containers rather than directly running them.
☐ systemd-machined replaces hypervisors like KVM for running virtual machines.
☐ systemd-machined relies on external tools like QEMU/KVM to create and execute virtual machines.
☐ systemd-machined includes a built-in hypervisor for virtualization.
☐ systemd-machined is only used for managing containerized workloads.

A

Correct answers:
✅ systemd-machined is a service that tracks virtual machines and containers rather than directly running them.
✅ systemd-machined relies on external tools like QEMU/KVM to create and execute virtual machines.

Justification:
Unlike traditional hypervisors like KVM or VMware, systemd-machined does not directly run virtual machines. Instead, it provides management and tracking functionalities while relying on external tools such as QEMU/KVM for actual virtualization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

Xen Hypervisor Components

Which component is responsible for managing virtual machines in a Xen environment?

☐ QEMU
☐ Dom0
☐ KVM
☐ Libvirt
☐ GRUB

A

Correct answer:
✅ Dom0

Justification:
In a Xen-based environment, Dom0 (Domain 0) is the privileged domain that manages virtual machines (DomUs). It has direct access to hardware and controls VM creation, scheduling, and resource allocation.

62
Q

Xen Configuration and Management

Which command is used to list all running virtual machines in a Xen environment using the XL toolstack?

☐ xl list
☐ xenctl show
☐ xenstat
☐ xm vm-status
☐ virsh list

A

Correct answer:
✅ xl list

Justification:
The xl list command displays all active virtual machines in a Xen environment when using the XL toolstack. It provides details like domain ID, memory usage, and state.

63
Q

Xen Virtual Machine Configuration

Which file format is typically used for defining virtual machine configurations in Xen?

☐ JSON
☐ XML
☐ YAML
☐ Plain-text configuration files
☐ INI

A

Correct answer:
✅ Plain-text configuration files

Justification:
Xen virtual machine configurations are typically stored as plain-text files with key-value pairs. These files define parameters such as CPU, memory, network interfaces, and disk configurations.

64
Q

Xen Networking Modes

Which of the following are common networking modes used in Xen virtualization? (Choose TWO correct answers.)

☐ Bridged networking
☐ NAT networking
☐ Isolated networking
☐ PCI passthrough
☐ Routed networking

A

Correct answers:
✅ Bridged networking
✅ Routed networking

Justification:
Xen supports bridged networking, which connects virtual machines to the host’s physical network, and routed networking, where traffic is forwarded through the host. NAT is more common in KVM or VirtualBox environments.

65
Q

Xen Storage Options

Which storage backends are supported by Xen for virtual machine disk images? (Choose TWO correct answers.)

☐ QCOW2
☐ LVM volumes
☐ VMDK
☐ Raw disk images
☐ EXT4 filesystem

A

Correct answers:
✅ LVM volumes
✅ Raw disk images

Justification:
Xen supports Logical Volume Manager (LVM) volumes and raw disk images for virtual machine storage. QCOW2 is more commonly associated with KVM/QEMU, and VMDK is native to VMware.

66
Q

XAPI and Xen Management
Which of the following are features of XAPI (XenAPI)? (Choose TWO correct answers.)

☐ Provides a programmatic API for managing Xen environments.
☐ Requires all virtual machines to be manually configured using raw XML files.
☐ Allows administrators to manage virtual machines, storage, and networking.
☐ Is only available for use with the xm toolstack.
☐ Replaces the need for a hypervisor in Xen environments.
administration.

A

Correct answers:
✅ Provides a programmatic API for managing Xen environments.
✅ Allows administrators to manage virtual machines, storage, and networking.

Justification:
XAPI (XenAPI) is a management interface that enables automation and remote management of virtual machines, storage, and networking in Xen environments. It provides a structured API for scripting and

67
Q

Command-line Tools for Xen Management
Which command-line tool is used for managing Xen virtual machines with the XL toolstack?

☐ xm
☐ xe
☐ xl
☐ virsh
☐ xenstore

A

Correct answer:
✅ xl

Justification:
The xl command-line tool is used to manage virtual machines in Xen environments that use the XL toolstack. It replaces the older xm command and offers improved performance and compatibility.

68
Q

XenAPI vs. Traditional Tools
How does XAPI (XenAPI) differ from traditional Xen management tools? (Choose TWO correct answers.)

☐ XAPI provides a higher-level management API compared to direct command-line utilities.
☐ XAPI replaces the Xen hypervisor entirely.
☐ XAPI enables centralized management of multiple Xen hosts.
☐ Traditional tools like xl and xm offer more extensive remote management features than XAPI.
☐ XAPI only works with KVM-based virtualization, not Xen.

A

Correct answers:
✅ XAPI provides a higher-level management API compared to direct command-line utilities.
✅ XAPI enables centralized management of multiple Xen hosts.

Justification:
XAPI allows for centralized management and automation of Xen environments, making it more scalable than local tools like xl. It does not replace the Xen hypervisor but extends its management capabilities.

69
Q

Storage Management in XAPI
Which storage backends are supported by XAPI for managing virtual disks? (Choose TWO correct answers.)

☐ LVM
☐ NFS
☐ NTFS
☐ FAT32
☐ ext4 directly as a VM disk backend
Correct answers:
✅ LVM
✅ NFS

Justification:
XAPI supports LVM and NFS as backend storage options for managing virtual machine disks. It does not natively support NTFS or FAT32 as disk backends, and while ext4 can be used in a filesystem, it is not directly used as a VM disk backend.

A

Correct answers:
✅ LVM
✅ NFS

Justification:
XAPI supports LVM and NFS as backend storage options for managing virtual machine disks. It does not natively support NTFS or FAT32 as disk backends, and while ext4 can be used in a filesystem, it is not directly used as a VM disk backend.

70
Q

Networking in XAPI-Managed Xen Environments
Which networking models are commonly used in Xen environments managed by XAPI? (Choose TWO correct answers.)

☐ Bridged networking
☐ Host-only networking
☐ NAT networking
☐ Open vSwitch (OVS)
☐ Bluetooth-based networking

A

Correct answers:
✅ Bridged networking
✅ Open vSwitch (OVS)

Justification:
XAPI supports bridged networking to allow virtual machines to be exposed to the physical network. It also integrates well with Open vSwitch (OVS) for advanced SDN (Software-Defined Networking) capabilities.

71
Q

Xen Networking Configuration
Which directive is used to specify a network bridge for a Xen virtual machine’s network interface?

☐ net-bridge
☐ vif-bridge
☐ bridge
☐ eth0
☐ xenbr0
Correct answer:
✅ bridge

Justification:
In Xen, the bridge directive within the vif configuration is used to connect a virtual machine’s network interface to a network bridge. Example:

bash
Copiar
Editar
vif = [‘bridge=xenbr0’]
This connects the VM’s virtual network interface to the xenbr0 bridge on the host.

72
Q

Xen Virtual Network Interfaces
What does the vif directive configure in a Xen virtual machine configuration file? (Choose TWO correct answers.)

☐ Assigns a network interface to a VM.
☐ Defines the virtual disk image for a VM.
☐ Specifies the bridge or VLAN to connect the VM to.
☐ Manages CPU pinning for a VM.
☐ Controls the maximum memory allocation for a VM.
Correct answers:
✅ Assigns a network interface to a VM.
✅ Specifies the bridge or VLAN to connect the VM to.

Justification:
The vif directive in a Xen domain configuration file is used to define virtual network interfaces for a VM. It allows setting parameters like network bridges, VLANs, and IP configurations.

73
Q

Networking Modes in Xen
Which of the following networking modes are commonly used in Xen for virtual machines? (Choose TWO correct answers.)

☐ Bridged networking
☐ NAT networking
☐ Serial networking
☐ Host-only networking
☐ PCI Passthrough networking
Correct answers:
✅ Bridged networking
✅ NAT networking

Justification:
Xen supports bridged networking, where VMs share the same network as the host, and NAT networking, where VMs have private IPs that are translated by the host. Host-only networking is common in VirtualBox but not a primary Xen feature.

74
Q

Configuring a Static IP in Xen Networking
Which option is commonly used within the vif directive to assign a static IP address to a Xen virtual machine?

☐ ip=
☐ mac=
☐ netmask=
☐ gateway=
☐ static=
Correct answer:
✅ ip=

Justification:
To assign a static IP address to a Xen VM, the ip= option is used inside the vif configuration. Example:

bash
Copiar
Editar
vif = [‘bridge=xenbr0, ip=192.168.1.100’]
This sets the VM’s IP to 192.168.1.100.

75
Q

Xen Virtual Interface MAC Address Assignment
What parameter should be used in the vif directive to define a specific MAC address for a Xen virtual machine?

☐ vif-mac
☐ mac
☐ hwaddr
☐ eth-mac
☐ xen-mac
Correct answer:
✅ mac

Justification:
To assign a static MAC address to a Xen VM, the mac= parameter is used in the vif directive. Example:

bash
Copiar
Editar
vif = [‘bridge=xenbr0, mac=00:16:3E:5D:9A:2C’]
This ensures that the VM always has the same MAC address, useful for network security policies and DHCP reservations.

76
Q

Managing Block Devices in Xen
Which xl sub-command is used to attach a new block device to a running Xen domain?

☐ xl block-add
☐ xl device-attach
☐ xl disk-attach
☐ xl attach-storage
☐ xl block-attach
Correct answer:
✅ xl block-attach

Justification:
The xl block-attach command allows administrators to dynamically attach block devices (such as disks or partitions) to a running Xen domain, enabling storage expansion or troubleshooting.

77
Q

Detaching Storage from a Xen Virtual Machine
Which xl sub-command is used to remove a block device from a running Xen virtual machine?

☐ xl detach-disk
☐ xl block-remove
☐ xl block-detach
☐ xl device-remove
☐ xl storage-delete
Correct answer:
✅ xl block-detach

Justification:
The xl block-detach command is used to detach a block device from a running Xen virtual machine. This is useful when removing storage dynamically without restarting the VM.

78
Q

Listing Available Virtual Machine Storage Devices
Which command provides a complete list of all block devices attached to a running Xen domain?

☐ xl list-disks
☐ xl block-info
☐ xl block-list
☐ xl storage-show
☐ xl device-list
Correct answer:
✅ xl block-list

Justification:
The xl block-list command displays all block devices (e.g., disks, partitions, volumes) connected to a Xen virtual machine, helping administrators manage and troubleshoot VM storage.

79
Q

Configuring Block Storage in Xen Configuration Files
Which directive is used in a Xen VM configuration file to specify a block storage device?

☐ disk=
☐ vif=
☐ blkdev=
☐ storage=
☐ device=
Correct answer:
✅ disk=

Justification:
In Xen domain configuration files, the disk= directive is used to define virtual disks. Example configuration:

bash
Copiar
Editar
disk = [‘phy:/dev/vg0/xen-disk,xvda,w’]
This maps a physical volume (/dev/vg0/xen-disk) to the xvda device inside the VM.

80
Q

Storage Formats Supported by Xen
Which of the following storage formats can be used for Xen virtual machines? (Choose TWO correct answers.)

☐ RAW disk images
☐ QCOW2 disk images
☐ EXT4 partitions
☐ ISO files as writable block devices
☐ NFS shares as direct block devices
Correct answers:
✅ RAW disk images
✅ QCOW2 disk images

Justification:
Xen supports RAW disk images for direct storage access and QCOW2 for efficient disk space allocation. Although EXT4 partitions and NFS shares can store disk images, they are not used as direct block devices.

81
Q

Restoring a Snapshot in QEMU Monitor
What QEMU Monitor command is used to restore a previously saved snapshot? (Specify ONLY the command without any path or parameters.)

Answer:
✅ loadvm

Justification:
The loadvm command in the QEMU Monitor restores a previously saved snapshot, allowing users to revert a virtual machine to an earlier state.

82
Q

Listing Available Snapshots in QEMU
What QEMU Monitor command displays a list of all available snapshots for a virtual machine? (Specify ONLY the command without any path or parameters.)

Answer:
✅ info snapshots

Justification:
The info snapshots command provides a list of all saved snapshots for a running virtual machine, helping administrators manage and revert states.

83
Q

Deleting a Snapshot in QEMU Monitor
What QEMU Monitor command deletes a specific snapshot from a virtual machine? (Specify ONLY the command without any path or parameters.)

Answer:
✅ delvm

Justification:
The delvm command removes a previously created snapshot from a QEMU/KVM virtual machine, freeing up disk space and reducing snapshot complexity.

84
Q

Pausing a Running QEMU Virtual Machine
What QEMU Monitor command temporarily suspends a virtual machine’s execution without shutting it down? (Specify ONLY the command without any path or parameters.)

Answer:
✅ stop

Justification:
The stop command pauses a running virtual machine in QEMU Monitor, allowing users to resume it later using the cont command.

85
Q

Checking Virtual Machine Status in QEMU
What QEMU Monitor command displays the current execution state of a virtual machine? (Specify ONLY the command without any path or parameters.)

Answer:
✅ info status

Justification:
The info status command in QEMU Monitor retrieves the current state of a virtual machine, such as whether it is running, paused, or stopped.

86
Q

Storage Protocols Supported by QEMU
Which of the following network-based storage protocols can QEMU use for direct block device access? (Choose THREE correct answers.)

☐ iSCSI
☐ CIFS
☐ NBD
☐ HTTP
☐ GlusterFS
Correct answers:
✅ iSCSI
✅ NBD
✅ GlusterFS

Justification:
QEMU can directly access block devices via iSCSI, NBD (Network Block Device), and GlusterFS. However, CIFS and HTTP require the host operating system’s filesystem capabilities instead of direct QEMU block access.

87
Q

Using SSH for Storage in QEMU
How does QEMU access storage over SSH?

☐ By using scp to transfer disk images before launching the VM
☐ By mounting an SSH-based filesystem at the host level
☐ By using the -drive file=ssh:// option
☐ By requiring an additional kernel module for SSH disk access
☐ By converting the disk image to QCOW2 before launching the VM
Correct answer:
✅ By using the -drive file=ssh:// option

Justification:
QEMU supports accessing storage over SSH using the -drive file=ssh://… option, which enables direct reading and writing of disk images stored on a remote SSH server.

88
Q

QEMU Disk Image Formats
Which of the following are commonly used disk image formats for QEMU? (Choose TWO correct answers.)

☐ QCOW2
☐ VMDK
☐ OVA
☐ RAW
☐ NTFS
Correct answers:
✅ QCOW2
✅ RAW

Justification:
QEMU supports QCOW2 (which provides compression, snapshots, and encryption) and RAW (which offers better performance). VMDK is primarily used by VMware, and OVA is a packaging format rather than a disk format.

89
Q

Attaching Storage to a Running QEMU VM
Which QEMU Monitor command attaches a new storage device to a running virtual machine?

☐ add-storage
☐ device_add
☐ attach-drive
☐ drive-mount
☐ disk-insert
Correct answer:
✅ device_add

Justification:
The device_add command in the QEMU Monitor dynamically attaches a new storage device to a running VM. It is commonly used with -drive options in QEMU.

90
Q

emoving a Disk from a Running QEMU Virtual Machine
Which QEMU Monitor command removes a block device from a running VM?

☐ drive_remove
☐ device_del
☐ detach-block
☐ qemu-remove-disk
☐ disk-unmount
Correct answer:
✅ device_del

Justification:
The device_del command in QEMU Monitor is used to detach and remove a storage device (or other hardware) from a running virtual machine dynamically.

91
Q

Kernel Boot Parameters in QEMU
Which QEMU option is used to specify an initial RAM disk when booting a custom kernel?

☐ -kernel
☐ -initrd
☐ -append
☐ -drive
☐ -boot
Correct answer:
✅ -initrd

Justification:
The -initrd option in QEMU is used to specify an initial RAM disk (initrd), which is required for loading additional drivers and initializing the system during early boot.

92
Q

Custom Kernel Booting in QEMU
Which QEMU command-line option is required to boot a virtual machine with a custom kernel image?

☐ -kernel
☐ -hda
☐ -kexec
☐ -loadvm
☐ -bootloader
Correct answer:
✅ -kernel

Justification:
The -kernel option in QEMU allows users to specify a custom kernel image (e.g., vmlinuz) instead of booting from a disk-based operating system.

93
Q

Passing Kernel Parameters in QEMU
Which QEMU option should be used to pass boot parameters such as console settings to a custom kernel?

☐ -cmdline
☐ -append
☐ -bootparams
☐ -config
☐ -setparams
Correct answer:
✅ -append

Justification:
The -append option allows users to pass additional parameters to the kernel command line, such as specifying the console device or setting the root filesystem.

94
Q

Specifying the Root Filesystem in QEMU
Which boot parameter should be passed to the kernel using -append to define the root filesystem location?

☐ root=
☐ initrd=
☐ cmdline=
☐ fsdev=
☐ rdisk=
Correct answer:
✅ root=

Justification:
The root= kernel parameter is used to specify the root filesystem for the virtual machine. Example:

bash
Copiar
Editar
-append “root=/dev/sda1”
This sets the root filesystem to /dev/sda1.

95
Q

Disabling Kernel Messages During Boot in QEMU
Which kernel boot parameter should be used with -append to disable verbose kernel messages?

☐ quiet
☐ silent
☐ nolog
☐ debug=off
☐ bootlog=0
Correct answer:
✅ quiet

Justification:
Using quiet in the -append option reduces kernel boot messages, making the boot process less verbose. Example:

bash
Copiar
Editar
-append “quiet”

96
Q

KVM Support for AMD Processors
Which kernel module must be loaded to enable KVM on an AMD CPU?

☐ kvm_intel
☐ vmx
☐ amd_vmx
☐ kvm_amd
☐ cpuinfo
Correct answer:
✅ kvm_amd

Justification:
For AMD processors, the correct kernel module for KVM is kvm_amd. It enables hardware-assisted virtualization features specific to AMD-V technology.

97
Q

Checking if KVM is Loaded
Which command can be used to check if KVM modules are loaded in the Linux kernel?

☐ lsmod | grep kvm
☐ modinfo kvm
☐ cat /proc/kvm
☐ vmxinfo
☐ cat /sys/kernel/kvm
Correct answer:
✅ lsmod | grep kvm

Justification:
The command lsmod | grep kvm checks if KVM-related modules (kvm_intel or kvm_amd) are currently loaded into the Linux kernel.

98
Q

Verifying CPU Virtualization Support
Which command can be used to check if an Intel or AMD CPU supports virtualization extensions?

☐ cat /proc/cpuinfo | grep -E ‘vmx|svm’
☐ dmidecode | grep virtualization
☐ kvm-ok
☐ lsmod | grep kvm
☐ uname -r | grep vmx
Correct answer:
✅ cat /proc/cpuinfo | grep -E ‘vmx|svm’

Justification:
The vmx (for Intel CPUs) and svm (for AMD CPUs) flags in /proc/cpuinfo indicate whether hardware virtualization support is available.

99
Q

Starting a KVM Virtual Machine Manually
Which command is commonly used to start a virtual machine using QEMU/KVM?

☐ kvm -m 1024 -smp 2 -drive file=disk.img
☐ kvm_start -m 1024 -hda disk.img
☐ virt-run -memory 1024 -cpu 2 -disk disk.img
☐ qemu-system-kvm -m 1024 -smp 2 -drive file=disk.img
☐ kvm-boot -vm disk.img -m 1024
Correct answer:
✅ qemu-system-kvm -m 1024 -smp 2 -drive file=disk.img

Justification:
qemu-system-kvm is the correct command for launching a KVM-based virtual machine, specifying memory (-m), CPU cores (-smp), and disk (-drive file=).

100
Q

Enabling Nested Virtualization for Intel CPUs
Which command enables nested virtualization for KVM on Intel CPUs?

☐ echo 1 > /sys/module/kvm/parameters/nested
☐ echo Y > /sys/module/kvm_intel/parameters/nested
☐ modprobe kvm nested=1
☐ sysctl -w vm.nested_kvm=1
☐ kvm-config –enable-nested
Correct answer:
✅ echo Y > /sys/module/kvm_intel/parameters/nested

Justification:
For Intel CPUs, nested virtualization is enabled by setting:

bash
Copiar
Editar
echo Y > /sys/module/kvm_intel/parameters/nested
For AMD CPUs, the equivalent command uses kvm_amd instead.

101
Q

Checking the Status of a Virtual Machine with Libvirt
Which command is used to check the status of a virtual machine managed by libvirt?

☐ virt-check
☐ libvirt status
☐ virsh list –all
☐ virt-show
☐ qemu-check
Correct answer:
✅ virsh list –all

Justification:
The virsh list –all command displays the status of all virtual machines managed by libvirt, including running and stopped VMs.

102
Q

Starting a Virtual Machine Using Libvirt
Which command starts a virtual machine that is managed by libvirt?

☐ libvirt start <vm_name>
☐ virsh boot <vm_name>
☐ virtctl run <vm_name>
☐ virsh start <vm_name>
☐ vmctl poweron <vm_name>
Correct answer:
✅ virsh start <vm_name></vm_name></vm_name></vm_name></vm_name></vm_name></vm_name>

Justification:
The virsh start <vm_name> command is used to power on a virtual machine managed by libvirt.</vm_name>

103
Q

Listing Defined Virtual Machines in Libvirt
Which command lists all virtual machines that have been defined in libvirt, regardless of whether they are running?

☐ virsh list –inactive
☐ virsh list –all
☐ virt-manager –list
☐ qemu-system –show
☐ virt-show –all
Correct answer:
✅ virsh list –all

Justification:
The virsh list –all command shows all defined virtual machines, including both active and inactive VMs.

104
Q

Where Libvirt Stores VM Disk Images
By default, where does libvirt store the disk images of virtual machines?

☐ /etc/libvirt/qemu/
☐ /var/lib/libvirt/images/
☐ /usr/lib/libvirt/qemu/
☐ /opt/virt/disks/
☐ /home/libvirt/
Correct answer:
✅ /var/lib/libvirt/images/

Justification:
The default location for virtual machine disk images in libvirt is /var/lib/libvirt/images/. This directory contains QCOW2 or RAW disk files.

105
Q

Defining a New Virtual Machine Using Libvirt
Which command is used to define a new virtual machine from an XML configuration file in libvirt?

☐ virsh newvm <config.xml>
☐ virt-define <config.xml>
☐ virsh define <config.xml>
☐ virtctl import <config.xml>
☐ qemu-system --import <config.xml>
Correct answer:
✅ virsh define <config.xml></config.xml></config.xml></config.xml></config.xml></config.xml></config.xml>

Justification:
The virsh define <config.xml> command registers a new virtual machine in libvirt using an XML configuration file.</config.xml>

106
Q

Creating a Snapshot in Libvirt
Which virsh command is used to create a new snapshot of a virtual machine?

☐ virsh snapshot-save
☐ virsh create-snapshot
☐ virsh snapshot-create-as
☐ virsh snapshot-backup
☐ virsh snapshot-make
Correct answer:
✅ virsh snapshot-create-as

Justification:
The virsh snapshot-create-as command is used to create a new snapshot of a virtual machine in libvirt. It allows specifying the snapshot name, description, and storage options.

107
Q

Listing Snapshots in Libvirt
Which virsh command lists all snapshots associated with a specific virtual machine?

☐ virsh list-snapshots <vm_name>
☐ virsh snapshot-show <vm_name>
☐ virsh snapshot-list <vm_name>
☐ virsh snapshot-status <vm_name>
☐ virsh snapshot-check <vm_name>
Correct answer:
✅ virsh snapshot-list <vm_name></vm_name></vm_name></vm_name></vm_name></vm_name></vm_name>

Justification:
The virsh snapshot-list <vm_name> command displays all snapshots available for a specific virtual machine.</vm_name>

108
Q

Deleting a Snapshot in Libvirt
Which virsh command removes a specific snapshot from a virtual machine?

☐ virsh snapshot-remove <snapshot_name>
☐ virsh snapshot-delete <vm_name> --snapshotname <snapshot_name>
☐ virsh snapshot-destroy <vm_name> <snapshot_name>
☐ virsh snapshot-erase <vm_name> <snapshot_name>
☐ virsh snapshot-unlink <vm_name> <snapshot_name>
Correct answer:
✅ virsh snapshot-delete <vm_name> --snapshotname <snapshot_name></snapshot_name></vm_name></snapshot_name></vm_name></snapshot_name></vm_name></snapshot_name></vm_name></snapshot_name></vm_name></snapshot_name>

Justification:
The correct syntax for removing a snapshot in libvirt is:

bash
Copiar
Editar
virsh snapshot-delete <vm_name> --snapshotname <snapshot_name>
This permanently deletes the specified snapshot.</snapshot_name></vm_name>

109
Q

Reverting to the Latest Snapshot in Libvirt
Which virsh command restores a virtual machine to its most recent snapshot?

☐ virsh snapshot-revert –current <vm_name>
☐ virsh snapshot-revert <vm_name> --last
☐ virsh snapshot-rollback <vm_name>
☐ virsh snapshot-load <vm_name>
☐ virsh snapshot-restore-latest <vm_name>
Correct answer:
✅ virsh snapshot-revert --current <vm_name></vm_name></vm_name></vm_name></vm_name></vm_name></vm_name>

Justification:
The –current flag ensures that the VM reverts to its most recent snapshot without requiring the administrator to specify a snapshot name.

110
Q

Checking Snapshot Details in Libvirt
Which virsh command displays detailed information about a specific snapshot?

☐ virsh snapshot-info <snapshot_name>
☐ virsh snapshot-status <snapshot_name>
☐ virsh snapshot-detail <snapshot_name>
☐ virsh snapshot-check <snapshot_name>
☐ virsh snapshot-show <snapshot_name>
Correct answer:
✅ virsh snapshot-info <snapshot_name></snapshot_name></snapshot_name></snapshot_name></snapshot_name></snapshot_name></snapshot_name>

Justification:
The virsh snapshot-info <snapshot_name> command displays detailed metadata about a snapshot, such as creation time, disk state, and parent snapshot.</snapshot_name>

111
Q

Listing Network Configurations in Libvirt
Which virsh command is used to list all available virtual networks managed by libvirt?

☐ virsh net-list –all
☐ virsh network-show
☐ virsh net-status
☐ virsh list-networks
☐ virsh net-config
Correct answer:
✅ virsh net-list –all

Justification:
The virsh net-list –all command lists all defined virtual networks, including active and inactive ones, managed by libvirt.

112
Q

Creating a New Virtual Network in Libvirt
Which command is used to define a new virtual network from an XML file in libvirt?

☐ virsh network-create <config.xml>
☐ virsh net-define <config.xml>
☐ virsh net-new <config.xml>
☐ virsh create-network <config.xml>
☐ virsh net-add <config.xml>
Correct answer:
✅ virsh net-define <config.xml></config.xml></config.xml></config.xml></config.xml></config.xml></config.xml>

Justification:
The virsh net-define <config.xml> command is used to create a new virtual network in libvirt based on an XML configuration file.</config.xml>

113
Q

Activating a Virtual Network in Libvirt
Which virsh command is used to start a previously defined virtual network?

☐ virsh net-activate <network_name>
☐ virsh net-start <network_name>
☐ virsh net-up <network_name>
☐ virsh net-enable <network_name>
☐ virsh network-run <network_name>
Correct answer:
✅ virsh net-start <network_name></network_name></network_name></network_name></network_name></network_name></network_name>

Justification:
The virsh net-start <network_name> command starts a defined virtual network, making it active for VM use.</network_name>

114
Q

Deleting a Virtual Network in Libvirt
Which virsh command permanently removes a virtual network from libvirt?

☐ virsh net-remove <network_name>
☐ virsh net-delete <network_name>
☐ virsh net-undefine <network_name>
☐ virsh net-destroy <network_name>
☐ virsh net-purge <network_name>
Correct answer:
✅ virsh net-undefine <network_name></network_name></network_name></network_name></network_name></network_name></network_name>

Justification:
The virsh net-undefine <network_name> command permanently removes a virtual network from libvirt’s configuration.</network_name>

115
Q

Checking the Active Network Interface of a VM in Libvirt
Which virsh command displays information about the network interfaces attached to a specific virtual machine?

☐ virsh net-info <vm_name>
☐ virsh domiflist <vm_name>
☐ virsh net-list <vm_name>
☐ virsh vm-net-show <vm_name>
☐ virsh ifconfig <vm_name>
Correct answer:
✅ virsh domiflist <vm_name></vm_name></vm_name></vm_name></vm_name></vm_name></vm_name>

Justification:
The virsh domiflist <vm_name> command shows network interfaces attached to a virtual machine, including bridges, MAC addresses, and interface types.</vm_name>

116
Q

Verifying the Status of dnsmasq in Libvirt
Which command can be used to check whether dnsmasq is running and managing DHCP services for libvirt networks?

☐ systemctl status dnsmasq
☐ virsh net-dhcp-status
☐ dnsmasq –check
☐ virsh net-list-dhcp
☐ libvirt-dhcp status
Correct answer:
✅ systemctl status dnsmasq

Justification:
The dnsmasq service is managed as a system process, and systemctl status dnsmasq verifies if it is running and handling DHCP for libvirt networks.

117
Q

Configuring a Static IP for a VM Managed by Libvirt
Which configuration file is typically modified to assign a static IP to a virtual machine managed by libvirt?

☐ /etc/libvirt/qemu/networks/default.xml
☐ /var/lib/libvirt/dnsmasq/dhcp-hosts.conf
☐ /etc/dnsmasq.d/libvirt.conf
☐ /etc/libvirt/dhcp/static-ip.conf
☐ /usr/lib/libvirt/dhcp/settings.xml
Correct answer:
✅ /etc/libvirt/qemu/networks/default.xml

Justification:
To define static IP assignments for virtual machines, administrators modify the network definition file in /etc/libvirt/qemu/networks/ and set a MAC-to-IP mapping.

118
Q

Restarting the DHCP Service in Libvirt
Which command restarts the dnsmasq service for a specific libvirt virtual network?

☐ virsh net-restart <network_name>
☐ systemctl restart dnsmasq
☐ virsh restart-dhcp <network_name>
☐ dnsmasq --restart-network <network_name>
☐ libvirt-net reload <network_name>
Correct answer:
✅ virsh net-restart <network_name></network_name></network_name></network_name></network_name></network_name>

Justification:
To restart networking services in libvirt (including DHCP via dnsmasq), the virsh net-restart <network_name> command is used.</network_name>

119
Q

Checking DHCP Lease Information in Libvirt
Which file contains DHCP lease assignments for virtual machines managed by libvirt?

☐ /var/lib/libvirt/dnsmasq/default.leases
☐ /etc/dnsmasq/dhcp-leases.conf
☐ /var/lib/dhcp/libvirt.leases
☐ /etc/libvirt/qemu/networks/dhcp-leases.xml
☐ /usr/lib/libvirt/networks/dhcp-assignments.log
Correct answer:
✅ /var/lib/libvirt/dnsmasq/default.leases

Justification:
The DHCP leases file, located in /var/lib/libvirt/dnsmasq/default.leases, contains assigned IPs and MAC addresses for VMs using libvirt-managed DHCP.

120
Q

Disabling DHCP for a Libvirt Network
Which command disables DHCP for a virtual network managed by libvirt?

☐ virsh net-update <network_name> delete dhcp
☐ virsh net-edit <network_name>
☐ virsh net-remove-dhcp <network_name>
☐ systemctl disable libvirt-dhcp
☐ virsh net-dhcp-off <network_name>
Correct answer:
✅ virsh net-edit <network_name></network_name></network_name></network_name></network_name></network_name>

Justification:
To disable DHCP for a virtual network, administrators use virsh net-edit <network_name> and manually remove the DHCP section from the XML configuration.</network_name>

121
Q

Changing the Number of vCPUs in a Running Libvirt VM
Which virsh command is used to change the number of virtual CPUs assigned to a running virtual machine?

☐ virsh setvcpus <vm_name> <num_vcpus>
☐ virsh update-cpu <vm_name> <num_vcpus>
☐ virsh modify-vcpu <vm_name> <num_vcpus>
☐ virsh vcpu-change <vm_name> <num_vcpus>
☐ virsh cpu-allocate <vm_name> <num_vcpus>
Correct answer:
✅ virsh setvcpus <vm_name> <num_vcpus></num_vcpus></vm_name></num_vcpus></vm_name></num_vcpus></vm_name></num_vcpus></vm_name></num_vcpus></vm_name></num_vcpus></vm_name>

Justification:
The virsh setvcpus command dynamically changes the number of vCPUs assigned to a running virtual machine.

122
Q

Checking CPU Affinity in a Libvirt VM
Which virsh command displays the CPU affinity (pinning) settings for a virtual machine?

☐ virsh cpupin <vm_name>
☐ virsh vcpuinfo <vm_name>
☐ virsh show-affinity <vm_name>
☐ virsh cpu-stat <vm_name>
☐ virsh pininfo <vm_name>
Correct answer:
✅ virsh vcpuinfo <vm_name></vm_name></vm_name></vm_name></vm_name></vm_name></vm_name>

Justification:
The virsh vcpuinfo command provides detailed information about vCPUs, including affinity to physical cores.

123
Q

Enabling CPU Pinning in a Libvirt VM
Which virsh command is used to pin a virtual CPU to a specific physical core?

☐ virsh cpuset <vm_name> <vcpu> <core>
☐ virsh vcpu-pin <vm_name> <vcpu> <core>
☐ virsh pin-vcpu <vm_name> <vcpu> <core>
☐ virsh set-affinity <vm_name> <vcpu> <core>
☐ virsh cpu-assign <vm_name> <vcpu> <core>
Correct answer:
✅ virsh vcpu-pin <vm_name> <vcpu> <core></core></vcpu></vm_name></core></vcpu></vm_name></core></vcpu></vm_name></core></vcpu></vm_name></core></vcpu></vm_name></core></vcpu></vm_name>

Justification:
The virsh vcpu-pin command is used to assign a virtual CPU to a specific physical processor, optimizing performance.

124
Q

Viewing CPU Utilization for a Running VM
Which virsh command displays real-time CPU usage statistics for a virtual machine?

☐ virsh cpu-stat <vm_name>
☐ virsh vcpu-info <vm_name>
☐ virsh domstats <vm_name> --cpu
☐ virsh cpu-monitor <vm_name>
☐ virsh domaincpu <vm_name>
Correct answer:
✅ virsh domstats <vm_name> --cpu</vm_name></vm_name></vm_name></vm_name></vm_name></vm_name>

Justification:
The virsh domstats –cpu command provides CPU usage statistics, including CPU time and performance counters.

125
Q

Checking CPU Model Used by a VM
Which virsh command displays the CPU model assigned to a virtual machine?

☐ virsh show-cpu <vm_name>
☐ virsh vcpuinfo <vm_name>
☐ virsh cpu-model <vm_name>
☐ virsh capabilities | grep -A10 "<cpu>"
☐ virsh domcapabilities --cpu <vm_name>
Correct answer:
✅ virsh capabilities | grep -A10 "<cpu>"</cpu></vm_name></cpu></vm_name></vm_name></vm_name>

Justification:
The virsh capabilities command provides detailed information about the CPU model used by VMs on the host system.

126
Q

Listing Available Storage Pools in Libvirt
Which virsh command lists all storage pools managed by libvirt?

☐ virsh pool-show
☐ virsh list-pools
☐ virsh pool-list –all
☐ virsh storage-list
☐ virsh pool-status
Correct answer:
✅ virsh pool-list –all

Justification:
The virsh pool-list –all command displays a list of all storage pools, including both active and inactive pools.

127
Q

Creating a New Storage Pool in Libvirt
Which virsh command is used to define a new storage pool from an XML configuration file?

☐ virsh pool-new <config.xml>
☐ virsh pool-create <config.xml>
☐ virsh pool-define <config.xml>
☐ virsh storage-init <config.xml>
☐ virsh pool-add <config.xml>
Correct answer:
✅ virsh pool-define <config.xml></config.xml></config.xml></config.xml></config.xml></config.xml></config.xml>

Justification:
The virsh pool-define <config.xml> command creates a new storage pool based on an XML configuration file, but does not activate it immediately.</config.xml>

128
Q

Starting a Storage Pool in Libvirt
Which virsh command starts a defined storage pool?

☐ virsh pool-activate <pool_name>
☐ virsh pool-up <pool_name>
☐ virsh pool-start <pool_name>
☐ virsh pool-enable <pool_name>
☐ virsh storage-run <pool_name>
Correct answer:
✅ virsh pool-start <pool_name></pool_name></pool_name></pool_name></pool_name></pool_name></pool_name>

Justification:
The virsh pool-start <pool_name> command activates a storage pool, making it available for use by virtual machines.</pool_name>

129
Q

Deleting a Storage Pool in Libvirt
Which virsh command permanently removes a storage pool?

☐ virsh pool-remove <pool_name>
☐ virsh pool-delete <pool_name>
☐ virsh pool-undefine <pool_name>
☐ virsh pool-destroy <pool_name>
☐ virsh storage-purge <pool_name>
Correct answer:
✅ virsh pool-undefine <pool_name></pool_name></pool_name></pool_name></pool_name></pool_name></pool_name>

Justification:
The virsh pool-undefine <pool_name> command permanently deletes a storage pool, removing it from libvirt’s configuration.</pool_name>

130
Q

Checking Storage Pool Usage in Libvirt
Which virsh command displays detailed information about a specific storage pool, including its usage?

☐ virsh pool-status <pool_name>
☐ virsh pool-info <pool_name>
☐ virsh storage-usage <pool_name>
☐ virsh pool-detail <pool_name>
☐ virsh storage-show <pool_name>
Correct answer:
✅ virsh pool-info <pool_name></pool_name></pool_name></pool_name></pool_name></pool_name></pool_name>

Justification:
The virsh pool-info <pool_name> command provides detailed information about a storage pool, including capacity, available space, and allocation.</pool_name>

131
Q

Converting a Disk Image to QCOW2 Format
Which command is used to convert a virtual disk image to the QCOW2 format?

☐ qemu-img transform -O qcow2 <input></input>
☐ qemu-img convert -f qcow2 <input></input> <output>
☐ qemu-img format-change qcow2 <input></input> <output>
☐ qemu-img change-format -O qcow2 <input></input>
☐ qemu-img convert -O qcow2 <input></input> <output>
Correct answer:
✅ qemu-img convert -O qcow2 <input></input> <output></output></output></output></output>

Justification:
The qemu-img convert -O qcow2 command converts a virtual disk image to QCOW2 format, allowing the use of snapshots and compression.

132
Q

Checking the Format of a Virtual Disk Image
Which command is used to check the format and details of a virtual disk image?

☐ qemu-img check <image>
☐ qemu-img status <image>
☐ qemu-img info <image>
☐ qemu-img inspect <image>
☐ qemu-img details <image>
Correct answer:
✅ qemu-img info <image></image></image></image></image></image></image>

Justification:
The qemu-img info <image> command displays detailed information about a virtual disk image, including format, size, and snapshot support.</image>

133
Q

Expanding a QCOW2 Virtual Disk Image
Which command is used to increase the size of an existing QCOW2 disk image?

☐ qemu-img resize <image> +10G
☐ qemu-img extend <image> 10G
☐ qemu-img grow <image> +10G
☐ qemu-img expand <image> 10G
☐ qemu-img size-up <image> 10G
Correct answer:
✅ qemu-img resize <image> +10G</image></image></image></image></image></image>

Justification:
The qemu-img resize command allows administrators to increase the size of a QCOW2 disk, making additional space available for the VM.

134
Q

Creating a New QCOW2 Image File
Which command creates a new virtual disk image in the QCOW2 format?

☐ qemu-img create -f qcow2 <image> 20G
☐ qemu-img init qcow2 <image> 20G
☐ qemu-img new -O qcow2 <image> 20G
☐ qemu-img mkqcow <image> 20G
☐ qemu-img qcow2-create <image> 20G
Correct answer:
✅ qemu-img create -f qcow2 <image> 20G</image></image></image></image></image></image>

Justification:
The qemu-img create -f qcow2 command creates a new QCOW2 disk image with the specified size.

135
Q

Converting a QCOW2 Image Back to RAW Format
Which command converts a QCOW2 disk image to RAW format for better performance?

☐ qemu-img convert -O raw <input></input> <output>
☐ qemu-img reformat raw <input></input> <output>
☐ qemu-img transcode raw <input></input> <output>
☐ qemu-img change-format raw <input></input> <output>
☐ qemu-img rawconvert <input></input> <output>
Correct answer:
✅ qemu-img convert -O raw <input></input> <output></output></output></output></output></output></output>

Justification:
The qemu-img convert -O raw command converts a QCOW2 disk image to RAW, which provides better performance but lacks snapshot support.

136
Q

Converting a QCOW2 Image to VMDK Format
Which command is used to convert a QCOW2 disk image to VMDK format?

☐ qemu-img transform -O vmdk <input></input>
☐ qemu-img convert -f qcow2 -O vmdk <input></input> <output>
☐ qemu-img format-change vmdk <input></input> <output>
☐ qemu-img change-format -O vmdk <input></input>
☐ qemu-img vmdkconvert <input></input> <output>
Correct answer:
✅ qemu-img convert -f qcow2 -O vmdk <input></input> <output></output></output></output></output>

Justification:
The qemu-img convert command allows conversion between various virtual disk formats, including QCOW2 to VMDK.

137
Q

Converting a VirtualBox VDI Image to RAW Format
Which command converts a VirtualBox VDI disk image to RAW format?

☐ qemu-img convert -f vdi -O raw <input></input> <output>
☐ qemu-img change-format raw <input></input> <output>
☐ qemu-img transform raw <input></input> <output>
☐ qemu-img convert -O raw <input></input> <output>
☐ qemu-img vdi2raw <input></input> <output>
Correct answer:
✅ qemu-img convert -f vdi -O raw <input></input> <output></output></output></output></output></output></output>

Justification:
The -f vdi flag specifies VirtualBox’s VDI format, and -O raw sets the RAW output format.

138
Q

Checking the Integrity of a QCOW2 Disk Image
Which qemu-img command verifies the integrity of a QCOW2 disk image?

☐ qemu-img validate <image>
☐ qemu-img check <image>
☐ qemu-img verify <image>
☐ qemu-img scan <image>
☐ qemu-img test <image>
Correct answer:
✅ qemu-img check <image></image></image></image></image></image></image>

Justification:
The qemu-img check command scans a QCOW2 image for errors and inconsistencies.

139
Q

Reducing the Size of a QCOW2 Image
Which command compacts a QCOW2 image to reduce its physical size?

☐ qemu-img shrink <image>
☐ qemu-img compact <image>
☐ qemu-img resize --shrink <image>
☐ qemu-img convert -O qcow2 <image> <output>
☐ qemu-img rebase -f qcow2 <image>
Correct answer:
✅ qemu-img convert -O qcow2 <image> <output></output></image></image></output></image></image></image></image>

Justification:
The best way to shrink a QCOW2 image is to reconvert it using qemu-img convert -O qcow2, as QCOW2 supports compression.

140
Q

Creating a New VDI Image with a Specific Size
Which command creates a new VirtualBox VDI image with a size of 20GB?

☐ qemu-img create -f vdi <image> 20G
☐ qemu-img make-vdi <image> 20G
☐ qemu-img new -O vdi <image> 20G
☐ qemu-img vdi-create <image> 20G
☐ qemu-img initialize -O vdi <image> 20G
Correct answer:
✅ qemu-img create -f vdi <image> 20G</image></image></image></image></image></image>

Justification:
The qemu-img create -f vdi command initializes a new VirtualBox VDI image with the specified size.

141
Q

Extracting a File from a Virtual Machine Disk Image
Which command is used to extract a file from a virtual machine image without booting the VM?

☐ virt-cat
☐ virt-extract
☐ virt-copy-out
☐ qemu-img export
☐ vm-disk-extract
Correct answer:
✅ virt-copy-out

Justification:
The virt-copy-out command allows extracting files from the guest filesystem of a virtual machine image, without requiring the VM to be booted.

142
Q

Viewing the Contents of a File Inside a Virtual Machine Disk Image
Which command is used to display the contents of a file located inside a virtual machine disk image?

☐ virt-cat <image> <file>
☐ virt-inspect <image> <file>
☐ virt-read <image> <file>
☐ vm-fs-cat <image> <file>
☐ qemu-img view <image> <file>
Correct answer:
✅ virt-cat <image> <file></file></image></file></image></file></image></file></image></file></image></file></image>

Justification:
The virt-cat command is part of libguestfs and allows users to view the contents of a file inside a virtual machine disk image.

143
Q

Mounting a Virtual Machine Disk Image Locally
Which command mounts a virtual disk image so that its filesystem can be accessed directly?

☐ virt-mount <image> <mountpoint>
☐ guestmount -a <image> -m <partition> <mountpoint>
☐ qemu-img mount <image> <mountpoint>
☐ vm-disk-mount <image> <mountpoint>
☐ virt-fs-mount <image> <mountpoint>
Correct answer:
✅ guestmount -a <image> -m <partition> <mountpoint></mountpoint></partition></image></mountpoint></image></mountpoint></image></mountpoint></image></mountpoint></partition></image></mountpoint></image>

Justification:
The guestmount command allows mounting a virtual machine disk image for direct access to its filesystem.

144
Q

Checking the Filesystem Type of a Virtual Machine Image
Which command is used to check the filesystem type of a virtual machine disk image?

☐ virt-inspector <image>
☐ virt-filesystem --long -h -a <image>
☐ qemu-img checkfs <image>
☐ vm-fs-info <image>
☐ virt-fs-type <image>
Correct answer:
✅ virt-filesystem --long -h -a <image></image></image></image></image></image></image>

Justification:
The virt-filesystem command lists filesystem types and mount points for a virtual machine disk image.

145
Q

Injecting a New SSH Key into a Virtual Machine Disk Image
Which command is used to insert an SSH key into a virtual machine image?

☐ virt-customize –add-ssh-key <key> -a <image>
☐ virt-copy-ssh <key> <image>
☐ virt-edit <image> --ssh-key <key>
☐ qemu-img ssh-inject <image> <key>
☐ virt-insert-ssh <key> <image>
Correct answer:
✅ virt-customize --add-ssh-key <key> -a <image></image></key></image></key></key></image></key></image></image></key></image></key>

Justification:
The virt-customize command allows modifying a virtual machine image, including inserting SSH keys for remote access.

146
Q

Creating a Snapshot of a Running Virtual Machine with qemu-img
Which command is used to create a snapshot named “Backup1” for the image production.qcow2?

☐ qemu-img snapshot -c Backup1 production.qcow2
☐ qemu-img snapshot-create Backup1 production.qcow2
☐ qemu-img save-snapshot Backup1 production.qcow2
☐ qemu-img snapshot-new Backup1 production.qcow2
☐ qemu-img snapshot -n Backup1 production.qcow2
Correct answer:
✅ qemu-img snapshot -c Backup1 production.qcow2

Justification:
The qemu-img snapshot -c command creates a new snapshot named “Backup1” for the specified QCOW2 image.

147
Q

Listing Available Snapshots in a QCOW2 Image
Which command lists all snapshots stored in the QCOW2 image production.qcow2?

☐ qemu-img snapshot -l production.qcow2
☐ qemu-img list-snapshots production.qcow2
☐ qemu-img snapshot –show production.qcow2
☐ qemu-img snapshot-info production.qcow2
☐ qemu-img snapshot-display production.qcow2
Correct answer:
✅ qemu-img snapshot -l production.qcow2

Justification:
The qemu-img snapshot -l command lists all snapshots available in a given QCOW2 image.

148
Q

Deleting a Snapshot in a QCOW2 Image
Which command removes the snapshot named “OldSnapshot” from the image production.qcow2?

☐ qemu-img snapshot -d OldSnapshot production.qcow2
☐ qemu-img delete-snapshot OldSnapshot production.qcow2
☐ qemu-img snapshot-remove OldSnapshot production.qcow2
☐ qemu-img snapshot-clear OldSnapshot production.qcow2
☐ qemu-img snapshot-erase OldSnapshot production.qcow2
Correct answer:
✅ qemu-img snapshot -d OldSnapshot production.qcow2

Justification:
The qemu-img snapshot -d command deletes a snapshot from a QCOW2 image while preserving the disk state.

149
Q

Checking the Current Active Snapshot in a QCOW2 Image
Which command shows the currently active snapshot for the image production.qcow2?

☐ qemu-img snapshot -c production.qcow2
☐ qemu-img snapshot -a production.qcow2
☐ qemu-img snapshot -s production.qcow2
☐ qemu-img snapshot -l production.qcow2
☐ qemu-img snapshot-active production.qcow2
Correct answer:
✅ qemu-img snapshot -l production.qcow2

Justification:
The qemu-img snapshot -l command lists all snapshots, including the currently active one.

150
Q

Reverting a Virtual Machine to Its Latest Snapshot
Which command reverts a QCOW2 image to its most recent snapshot?

☐ qemu-img snapshot -a latest production.qcow2
☐ qemu-img snapshot-apply latest production.qcow2
☐ qemu-img snapshot -r latest production.qcow2
☐ qemu-img snapshot-revert latest production.qcow2
☐ qemu-img snapshot –restore latest production.qcow2
Correct answer:
✅ qemu-img snapshot -a latest production.qcow2

Justification:
The qemu-img snapshot -a command applies a snapshot, restoring the image to the selected state.