4.1 Topic 351: Full Virtualization – Simulado Flashcards
Linux Sem Fronteiras (150 cards)
Which file can be verified to identify if the system’s CPU has virtualization features enabled?
(Specify the full path to the file)
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).
What is the term used to describe VM migrations between hosts?
- P2V
- P2P
- V2V
- Full Migration
- Dynamic Migration
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.
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.
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.
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.
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.
Which software is an open-source virtualization management platform?
- VMware ESXi
- oVirt
- LXC
- KVM
- Open vSwitch
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.
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
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.
What systemd service is specifically designed for managing virtual machines and containers?
- systemd-machined
- systemd-virtualized
- systemd-vm-manager
- systemd-machinectl
- systemd-nspawn
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.
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
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.
Which command is used for interfacing with XAPI?
- xl
- xm
- xenstore
- xapi
- xe
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.
What directive specifies the network interface for a domain in Xen?
- network-interface
- interface
- net
- vif
- eth0
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”.
Which xl sub-command displays the storage devices connected to the domain?
- disk-list
- storage-list
- attach-list
- device-list
- block-list
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.
What QEMU Monitor command creates a new snapshot?
(Specify ONLY the command without any path or parameters.)
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.
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
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://…
When starting an instance with QEMU/KVM, which option should be used to provide parameters to the kernel?
- kernel
- append
- drive
- initrd
- params
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.
Which module needs to be loaded for KVM to utilize the virtualization features of an Intel CPU?
- kvm_intel
- vmx
- svm
- intel_hvm
- cpuinfo
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.
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
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.
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
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.
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.
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.
What is the process responsible for assigning IPs to instances managed by libvirt?
- dhcpd
- systemd-resolved
- dnsmasq
- acpid
- NetworkManager
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.
Which option of the “virsh” command displays information about the CPUs of a domain?
- cpustatus
- vcpuinfo
- info
- inspect
- domaincpu
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.
What virsh command is used to change the XML configuration of a storage pool?
(Specify ONLY the command without any path or parameters)
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.
Which image format in Linux environments is capable of supporting snapshots?
- RAW
- VDI
- VMDK
- QCOW2
- IMG
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.
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.)
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”
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
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.