Question 1. What Is The Function Of Qemu?
Qemu is a virtualization platform application that works as an emulator that emulates an existing system to run more than one operating system together at the same time. It has its own configuration and it is easy to install and use. It is used to emulate many subsystems like hardware and softwares. It emulates the processors as well like multiprocessing systems.
Question 2. What Are The Different Modes Of Operations Performed By Qemu?
Qemu has two modes of operations and they are as follows:
- User mode emulation: this allow the process execution from one CPU to another CPU. It performs dynamic translation of instructions for host CPU.
- System mode emulation: this allow the emulation of the complete system that includes hardware as well as peripheral related components.
Question 3. What Is The Function Of Dynamic Translator In Context With The Qemu?
Dynamic translator translates the instructions that is being given by the guest system to the host system language. It translates the instructions at runtime to provide the emulation between the host CPU and guest CPU. To translate the instructions it maps the instructions that are passed from one CPU to another CPU. In this case there remains always the possibility that the behavior or additional instructions might be required by the architecture for translations.
Question 4. What Is The Function Of Qemu Accelerator?
To achieve high performance and using QEMU emulation environment there is a requirement to use QEMU accelerator that allows the execution of emulated codes and the libraries attached to it directly on the host CPU using the kernel module. It accelerates the translation of instructions from one CPU to another CPU without delaying the output to the user.
Question 5. How Can You Achieve Dynamic Translation Using Qemu?
Dynamic translation can be achieved by first converting the target into micro-operations. Micro-operations in this case are in the form of C code that gets compiled into objects. A core translator is required that maps the target instructions into micro-operations instructions. It is an efficient and portable way to achieve translation using Qemu. It removes the overhead by caching the translated code. It supports self modification by making the translated block invalidate in cache.
Question 6. What Are The Supported Peripherals Used By Qemu?
QEMU provides a long range of peripheral support for example:
- Hardware video graphics array emulator
- Mouse and keyword support
- Hard disk
- CD-ROM interface
- floppy disk emulation.
- PCI network adapter
- Serial ports
- PCI universal Host controller Interface
Question 7. What Is The Use Of The Command Qemu-img?
Qemu as an emulator allow the user to enjoy the virtualization on their system without the need to install a OS separately. Qemu provides qemu-img command to create the hard disk. This command is used to create images of various formats like qcow (QEMU copy-on-write). This format allows the size of the disk image is different from the file that is physically present. It creates a compact image such that the size decreases and the image that gets produced is compressed to make it protable.
For example: to create a disk image of 128 MB the following code will be written.
Qemu-img create -f qcow disk.img 128MB
Question 8. How To Setup Tap Network Using Qemu?
QEMU runs on user mode network that is being setup between host and guest operating systems. QEMU provides the emulation to manage the network interface internally and for the application as well. It provides a way to manage DHCP host IPs that assigns the IP dynamically to the guest OS. The protocols that are used to be redirected from host to guest OS is done by TCP and UDP. TCP and UDP are the only connections that are present by default. To setup TAP networking, first the connection with the guest OS has to be established by using Ethernet connection connected to the host OS that is using TAP network bridge. The script that is called by qemu for network configuration is /etc/qemu-ifup script, this script sets up the bridge network.
Question 9. How Qemu Speeds Up The Performance Of The System?
QEMU increases the speed and performance by using the dynamic translators and virtualization technique that is being used on different operating system. It provides high performance by executing the guest code directly on the host CPU. It gives high performance when executing under the Xen hypervisor or KVM.
Question 10. How Qemu Uses Hardware Virtualization Extensions?
QEMU is in the process of creating a kernel based virtual machine that uses modified QEMU to provide the extensions for different technologies. The two most processors that are used are Intel and AMD-V processors for which QEMU is creating this extensions. VT (virtualization technology) is disabled by BIOS by default but it can be enabled from BIOS menu to turn on all the functionalities of QEMU.
Question 11. Where Can I Find The Configuration If Tuntap Network Mode Is Being Set By Qemu?
The place where you can find tuntap network mode configuration settings is /dev/tap0 or in the fle /dev/net/tap0. The tuntap network mode can be seen by using the command ifconfig -a. For tuntap mode to exist QEMU should be running and when it shuts down then the devices which are attached to it automatically gets shut down. During shut down it removes the tuntap devices as well.
Question 12. What Is The Purpose Of Using Tun0 Instead Of Tap0 In Qemu?
QEMU uses a tap device only the tun0 name which is being given allows the user to connect in the networking. The kernel of the system create a tap device named as tun0 and a tap device with name tap0. It just uses the name to differentiate its own configuration but it uses tap device only for networking methods. It uses Ethernet frames for the configuration to be stored.
Question 13. What Is The Process Of Setup Up Tuntap Network Mode Without Using Vde?
To setup tuntap networking mode it requires the implication of tap networking device on the host system. It provides good performance overall and can be configured to create virtual network topology. At the same time, it requires high end configuration of the network topology in host that tends to differ from one operating system to another operating system.
The command that allows it to run tap networking mode is
- netdev tap
To change the network configuration for the user it requires
- netdev type=user
The device option in the command is used to plug in the particular network device like
- netdeve type=user, id=mynet0 -device e2000, netdev= mynet0
- netdev tap
Question 14. How To Connect Many Vlan To Tap Devices Using Qemu?
To connect VLANs to tap devices the requirement is of vlan that should be available in the host operating system. Any frame that appears on this device can be attached using the QEMU process. This process request is received by another interfaces on VLAN and then frames are received by device.
The command that is used to configure the networking mode:
qemu -net nic -net tap,ifname=qtap0 …
QEMU needs tuntap device driver that allow the user-space application to obtain different file discriptors that are connected to a network device. The tap devices can be seen by going to the directory file /dev/net/tun or else calling the function TUNSETIFF ioctl() that is allowed only to the user who are privileged.
Question 15. How To Make Bridging Possible In Qemu?
To build bridges in QEMU the configuration files has to be changed and the firewall has to be set up such that it doesn’t interfere in between the process. If firewall creates problem then there is a possibility of loosing the network connection to QEMU virtual machines. So, to enable the firewall to all the traffic to the servers configure the IP addresses by using the command like:
- allow incoming packets for qemu
IPTABLES -A FORWARD -d $IPADDR_FROM_CLIENT_OS -j ACCEPT
- allow outgoing packets from qemu
IPTABLES -A FORWARD -s $IPADDR_FROM_CLIENT_OS -j ACCEPT
These commands will take care of the firewall settings and will help in allowing the traffic to flow to the virtual machine’s IP address. To add a range add the network address and netmask in the configuration file.
- allow incoming packets for qemu
Networking Interview Questions
System Administration Interview Questions
CCNA Interview Questions
Data Center Management Interview Questions
Mac OS X Deployment Interview Questions
Networking Interview Questions
Hardware and Networking Interview Questions