300+ TOP Linux Virtualization Interview Questions and Answers

Q1. How To Get The Console Of Guest Or Virtual Machine In Xen ?

xm console

Q2. Which Command Is Used To List All Virtual Machine Running On The Kvm Hypervisor ?

Using the command ‘virsh list –all’ we can list all virtual machines irrespective of their states.

Q3. What Are The Different States Of A Vm In Xen Hypervisor ?

A VM can have different states like

r – Running

b – Blocked

c – crashed

s – Shutdown

p – Paused

Q4. What Are The Different Types Of Virtualization ?

Virtualization can be used in different ways  and  can take many different forms.

Some of them are listed below :

  • Server Virtualization
  • Network Virtualization
  • Hardware virtualization
  • Application virtualization
  • Desktop virtualization
  • User virtualization

Q5. What Is The Difference Between Xen & Kvm ?

For  Xen hypervisor  first we have to install Xen kernel and have to boot the machine with Xen kernel where as KVM is kernel based Virtualization , we don’t need any extra kernel for KVM. KVM is a module in Kernel. Xen hypervisor by default does not support full virtualization whereas KVM supports Full virtualization.

Q6. What Is Dom0 In Xen ?

Dom0 or Domain0 is the initial domain started by xen hypervisor. It has the special rights like to start new domain and access the hardware directly. Dom0 is responsible for running all of the device drivers for the hardware. 

Q7. What Is Virtualization ?

Virtualization is a technique for creating virtual resources (rather than the actual) such as server, storage device, network  and Operating system. Virtualization is dis-associating the tight bond between software and hardware.

Q8. What Are The Basic Requirements Of Vm Live Migration In Kvm ?

Some of the basic requirements are listed below :

  • The guest image or virtual machine image  must be located on a shared storage and it must be accessible using iSCSI, NFS, GFS2 or Fibre Channel.
  • The shared storage must be mounted on the same path on both the hypervisors / hosts.
  • Both hypervisors / hosts must run the same version of KVM.
  • Both guests or VMs must have the same network configuration & bridging configuration (their IPs must be different)

Q9. What Are Different Hypervisors Available In Linux ?

Xen & KVM are two hypervisor available in linux.

Q10. How To Shutdown,reboot & Start Vms ( Domain-ids) In Xen ?

Use xm command :

# xm shutdown [domain-id]

# xm reboot   [domain-id]

# xm start    [domain-id]

Q11. What Is The Difference Between Full Virtualization & Para Virtualization ?

Full virtualization & para virtualization both comes under the Hardware virtualization.

Some of the difference between them are listed below :

Full Virtualization : It is a virtualization in which guest machine(virtual machines) is unaware that it is in virtualized environment therefore hardware is virtualized by the host operating system so that the guest can issue commands to what it thinks is actual hardware but really are just simulated hardware devices created by the host

Para Virtualization : It is a virtualization in which guest machine is aware that it is in virtualized environment . If guest machine require resources like memory & cpu , it issues command to guest operating system  instead of directly communication with actual hardware.

Q12. Which Command Is Used In Kvm For Vms Live Migration ?

‘virsh migrate –live machine_name qemu+ssh://destination_server/system’

Q13. What Is Hypervisor ?

Hypervisor is a piece of a software that is being install on the physical machine , which then further creates and run virtual machines.  Virtual machine are known as guest machines and host machine is the hypervisor on which different virtual machines are created.

Q14. How To Forcefully Shutdown The Kvm Based Virtual Machine From The Command Line ?

We can forcefully shutdown the VM using the command ‘virsh destroy machine_name’.This command should only be used in a case where VM is in Hung state because forcefully shut down may cause filesystem corruption.

Q15. What Is Type-1 And Type-2 Hypervisor ?

Type-1 hypervisor is bare metal hypervisor runs on bare metal  of hardware. Hyper-V and ESXI Server are  the examples of type-1 hypervisor. Type-2 hypervisor is hosted by operating system. Examples of type-2 hypervisor are Microsoft Virtual Server & VMware Server.

Q16. How To Get Hardware Information Of Kvm Guest Machine ?

Use the command ‘virsh dominfo

Q17. How To Identify The Kvm Version ?

To find the  KVM version use the command ‘virsh version’

Q18. What Is The Use Of Virsh Command ?

virsh is the interface or command for managing the virtual machines based on KVM & Xen hypervisor. On virsh interface virtual machines are identified by their domain names , so virsh is generally used to list current domains , to create , pause & shutdown domains.

Q19. How To Connect A Particular Vm Using Virt-viewer ?

virt-viewer -c qemu:///system