Everything about QEmu!

Qemu

(Created by: Fabrice Bellard )

It is the blog post where all the required details are gathered for you to get the insights of Qemu software, its installation and how to get started with it and open source softwares.

What is it?

QEMU is a generic and open source machine [emulator] and [virtualizer]. When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.

When used as a virtualizer, QEMU achieves near native performance by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, 64-bit POWER, S390, 32-bit and 64-bit ARM, and MIPS guests.[1]

According to wikipedia:
QEMU is a hosted virtual machine monitor: it emulates CPUs through dynamic binary translation and provides a set of device models, enabling it to run a variety of unmodified guest operating systems. It also can be used with KVM to run virtual machines at near-native speed (requiring hardware virtualization extensions on x86 machines). QEMU can also do CPU emulation for user-level processes, allowing applications compiled for one architecture to run on another.

In a nutshell, You can run your system as a completely different hardware configuration without affecting anything on your system.

History

The history of qemu is still a mystery to me. Hope you understand git history :)
The git history of Qemu is here.

If you find more about qemu's history, comment below to share.

How to install it?

1. From .tar.xz

Follow these steps:
  1. wget https://download.qemu.org/qemu-2.xx.x.tar.xz
  2. tar xvJf qemu-2.xx.x.tar.xz
  3. cd qemu-2.10.1
  4. ./configure
  5. make

Note: Replace qemu-2.xx.x.tar.xz with the correct version number. (qemu-2.10.1.tar.xz)

2. From Linux Package Managers

QEMU is packaged by most Linux distributions[2]:

  • Arch:
    pacman -S qemu
  • Debian/Ubuntu:
    apt-get install qemu
  • Fedora:
    dnf install @virtualization
  • Gentoo:
    emerge --ask app-emulation/qemu
  • RHEL/CentOS:
    yum install qemu-kvm
  • SUSE:
    zypper install qemu

3. From Source/Git

  1. git clone git://git.qemu.org/qemu.git
  2. cd qemu
  3. git submodule init
  4. git submodule update --recursive
  5. ./configure
  6. make

4. MacOs

  1. brew install qemu


How to set up your system using qemu?

(Follow this qemu documentation if need further reference.)

Unlike other virtualization programs such as VirtualBox and VMware, QEMU does not provide a GUI to manage virtual machines (other than the window that appears when running a virtual machine), nor does it provide a way to create persistent virtual machines with saved settings. All parameters to run a virtual machine must be specified on the command line at every launch, unless you have created a custom script to start your virtual machine(s). However, there are several GUI front-ends for QEMU:

  •     virt-manager
  •     gnome-boxes
  •     qemu-launcher
  •     qtemu
  •     aqemuAUR

Additional front-ends with QEMU support are available for libvirt.[3]

QEMU is a processor emulator and supports emulation of ARM, PowerPC, SPARC, x86, x86-64 and more. QEMU has two operating modes[4]:
  •  User mode emulation: QEMU can launch Linux processes compiled for one CPU on another CPU, translating syscalls on the fly.
  •  Full system emulation: QEMU emulates a full system (virtual machine), including a processor and various peripherals such as disk, ethernet controller etc.

To setup a working environment, a virtual machine on qemu, follow following steps:
  •  


Wanna Contribute!

Like any open-source project, anyone excited enough, can contribute to qemu.  First to get started in open source world is to start using them.
  1. Install qemu on your device.
  2. Test it for a few days and check if it is your type or not.
  3. If it suits you, take a step ahead towards its contribution, peek into its source code. (You can download its source code from its git repository here or its Github repository here.
  4. Contact with the project maintainers and ask them to help if needed.
  5. Get yourself assigned to few simple and basic issue/tasks by the project maintainers to dive a little deeper.

You can also take help from various open source awareness programs like:

To Contact the project maintainers:
  • Join the project mailing list for their updates and to ask any doubts if you have.
  • Join their group on whatever medium they have (Slack, IRC, Telegram, Google Groups...).  The irc channel for qemu is #qemu on freenode network.




References

About:

Setup:

Others:


Check my blog posts on LibreBoot and its contribution to get more insights.
Till then, To infinity and Beyond !

No comments:

Post a Comment

Moving!

It's been a long time, since I published anything here, but that doesn't mean I stop writing, I kept writing everyday, just didn...