Linux Virtualization Interview Questions & Answers

  1. Question 1. What Is Virtualization ?

    Answer :

    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.

  2. Question 2. What Are The Different Types Of Virtualization ?

    Answer :

    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
  3. Linux Embedded systems Interview Questions

  4. Question 3. What Is The Difference Between Full Virtualization & Para Virtualization ?

    Answer :

    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.

  5. Question 4. What Is Hypervisor ?

    Answer :

    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.

  6. Linux Embedded systems Tutorial

  7. Question 5. What Are Different Hypervisors Available In Linux ?

    Answer :

    Xen & KVM are two hypervisor available in linux.

  8. Red Hat Linux Essentials Interview Questions

  9. Question 6. What Is The Difference Between Xen & Kvm ?

    Answer :

    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.

  10. Question 7. What Is Type-1 And Type-2 Hypervisor ?

    Answer :

    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.

  11. Red Hat Linux System Administration Interview Questions

  12. Question 8. What Is Dom0 In Xen ?

    Answer :

    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. 

  13. Question 9. How To Verify Virtualization Technology (vt) Is Enabled In Your Server’s Bios Or Not ?

    Answer :

    grep -E ‘svm|vmx’ /proc/cpuinfo

    vmx is for Intel processors

    svm is for AMD processors

  14. Linux File Systems Interview Questions

  15. Question 10. What Is The Use Of Virsh Command ?

    Answer :

    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.

  16. Question 11. How To Identify The Kvm Version ?

    Answer :

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

  17. Linux Device Drivers Interview Questions

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

    Answer :

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

  19. Linux Embedded systems Interview Questions

  20. Question 13. How To Forcefully Shutdown The Kvm Based Virtual Machine From The Command Line ?

    Answer :

    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.

  21. Question 14. What Are The Basic Requirements Of Vm Live Migration In Kvm ?

    Answer :

    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)
  22. Question 15. Which Command Is Used In Kvm For Vms Live Migration ?

    Answer :

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

  23. Question 16. What Are The Different States Of A Vm In Xen Hypervisor ?

    Answer :

    A VM can have different states like

    r – Running

    b – Blocked

    c – crashed

    s – Shutdown

    p – Paused

  24. Question 17. How To Get The Console Of Guest Or Virtual Machine In Xen ?

    Answer :

    xm console

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

    Answer :

    Use xm command :

    # xm shutdown [domain-id]

    # xm reboot   [domain-id]

    # xm start    [domain-id]

  26. Red Hat Linux Essentials Interview Questions

  27. Question 19. How To Get Hardware Information Of Kvm Guest Machine ?

    Answer :

    Use the command ‘virsh dominfo

  28. Question 20. How To Connect A Particular Vm Using Virt-viewer ?

    Answer :

    virt-viewer -c qemu:///system