Dec 022010
 

qemuI’ve received this article from Francesco and gladly i publish it:

Every day we read of new Linux distributions (GNU/Linux to be correct), and sometimes happen to want to try them “on the road”, even those who do not have a live version. The first program that comes to mind, I think, is precisely Qemu. But I also think that there is also an attempt  to find a more friendly alternative. The second choice I think is VirtualBox, a Qemu-based solution that gives to you at once and without effort everything you need. But is it really necessary to use a program that adds to our Linux machine other useless processes ? For me no. Of course, to switch from Virtualbox to Qemu I think, all of these tasks should be accomplished by a graphical interface “mouse-proof” and the terminal should not be used.

You don’t believe that it’s possible ?

Programs you need:

  • qemu, the main program on the command line;
  • qemu-launcher, graphic interface of qemu;
  • qemu-control, add-on of qemu-launcher.




qemu-fig1

(Image 1 – Qemu-launcher just started.)

Apart from the first tab, that appears to us as soon as we start the program, it is interesting  the last tab “Emulator”:
qemu-fig2

(Image 2)

In Image 2 for our purposes we note the option “Provide a control panel”  must be checked and that in “Additional arguments” we need to add the qemu options, “-enable-kvm -usb”: the second options “-usb” allows us to use the USB ports, so any USB stick, while the first option “-enable-kvm” allow qemu to use the virtualization capabilities of our processor, if present. With virtualization enabled Qemu will use the resources of our PC in a near-native mode and indeed the execution speed is much faster than using a plain Qemu. It necessary, however, that this function is supported by your processor, and that is enabled in the BIOS of the motherboard and its drivers, whose names should start with “kvm”, are loaded. As last thing, check that in the tab “Launcher settings” in “Path to ‘qemuctl’” is indicated where is the add-on and that it actually exists there.

Start Qemu-launcher with the button “Launch”. You will see two windows: the main emulator, the largest, and a little one who is none other than the qemu-control program.qemu-fig3

(Image 3)

Start from the main window, which should be titled QEMU, there the operating system you are virtualizing is booting wait for the end of the start up. Insert a USB stick and select Qemu-control Connect —> USB —> renew (that is under “connect”)  to recognize the existing USB devices.qemu-fig4(Image 4)

In Image 5 we see that our memory stick is recognized (for USB DISK 2.0) and ready to be used. After umounting it in our main (host) system, select that item.qemu-fig5
(Image 5)

In Image 6 we see that the contents of the memory stick is shown in the virtualized system and the memory stick is now fully available to us.qemu-fig6

(Image 6)

To remove the memory stick again, “renew”, but this time choosing the item that is under a “disconnect” and then in “disconnect” Select the device to disconnect (Image 7).qemu-fig7

(Image 7)

I showed only the use of a mass storage device but the qemu-control program can do many other interesting things. It’s thanks to the existence of this add-on that I left Virtualbox because it requires in order to use USB devices a change in a file system in Linux, that when the change results in an error message unimportant but that depends on the presence of such software and not Linux.

Before concluding, I must point out as the main program Qemu-launcher allows us to emulate the presence of network cards, sound card, video card, the type of system to virtualize, the ability to store different types of settings and many other things that it will be for the reader to find out as needed. And then we talk about this program absolutely free and not as semi-free VirtualBox, unless you choose the OSE version – more limited, or others.

Francesco Di Leo

Popular Posts:

Flattr this!

  14 Responses to “Qemu and its hidden virtues.”

  1. AQEMU is alternativer QEMU launcher using QT graphics library. Project hosted in sourceforge.net

  2. Attenzione a cosa pubblicate ragazzi… Virtualbox NON è basato su qemu. Qemu è un software di emulazione Virtualbox invece di virtualizzazione(guardare wikipedia per la conferma). L’equivalente di Virtualbox è il progetto kvm con libvirt e lo trovate nella sua migliore implementazione su fedora 14.
    Buon esperimento

  3. VirtualBox runs so much faster than when I last used Qemu; has Qemu improved in the last few years? I remember when they Free’d their kerlen driver to increase speed, but I think I was using VBox by then.

    I launched Qemu last week to test an installed that wouldn’t launch elsewhere (woo hoo!), but I didn’t pay any attention to its speediness.

    Always great to have more tools in the tool kit; I’ll have to check out these GUIs, especially AQemu as I prefer Qt and KDE apps. Debian Testing has AQemu and Qemu-launcher, but I don’t see Qemu-control…

  4. virt-manager doesn’t support as many qemu options as those UIs, but for most users it’s probably a much better option.

  5. Per essere più precisi, avrei dovuto scrivere che Virtualbox è una soluzione che contiene anche codice di Qemu. In Wikipedia si legge che “In January 2007, VirtualBox was released. It uses some of QEMU’s virtual hardware devices and has a built-in dynamic recompiler that is based on QEMU.”.

    Per quanto riguarda la diatriba tra virtualizzazione ed emulazione confermo che qemu-kvm, versione modificata di Qemu, usa le funzioni di virtualizazione del processore, se presenti ed attivate.

    Francesco Di Leo

  6. Articolo interessante e utile. Grazie.

    Saluti, red/

  7. Salve!

    ottimo articolo! Ho seguito tutto passo passo ma non riesco a far funzionare qemuctl.
    Se abilito la spunta parte solo qemuctl ma non la macchina virtuale. Se faccio partire la macchina virtuale solo successivamente qemuctl da shell ottengo questo errore…

    *** variable not allowed to be undef where GtkTextIter is wanted at /usr/bin/qemuctl line 253.
    *** ignoring at /usr/bin/qemuctl line 286.

    come posso risolvere?

    PS. macchina base ubuntu, macchine virtuali sia windows che altre distro linux.

    • Hai installato il pacchetto qemu-kvm ? Vedo che è un pacchetto disponibile per Ubuntu. Se ottieni altri errori lancia il comando qemu-launcher da terminale e controlla gli eventuali errori.

  8. Hai installato il pacchetto qemu-kvm ? Se ottieni altri errori lancia il comando qemu-launcher da terminale e controlla gli eventuali errori.

  9. Certo. Qemu funziona perfettamente. Riesco a virtualizzare ogni cosa. Ho anche provato ad abilitare le Vt-d.

    Lanciando qemu-launcer ottengo questi warning :

    [CODE]Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated at /usr/bin/qemu-launcher line 2000.
    /usr/bin/qemuctl -boot c -m 4096 -hda ‘/home/fabri/Scrivania/Win7HDD’ -net nic,vlan=0 -net user,vlan=0 -localtime -soundhw sb16[/CODE]

    Flaggando qemuctl e “cliccando su launch” mi si aggiungono queste righe :
    [CODE]
    /usr/bin/qemuctl -boot c -m 4096 -hda ‘/home/fabri/Scrivania/Win7HDD’ -net nic,vlan=0 -net user,vlan=0 -localtime -soundhw sb16 -enable-kvm -usb &
    *** unhandled exception in callback:
    *** variable not allowed to be undef where GtkTextIter is wanted at /usr/bin/qemuctl line 253.
    *** ignoring at /usr/bin/qemuctl line 286.
    [/CODE]
    (che sono gli stessi errori di prima)

    • Mi rimangono due ipotesi: la prima è che qemuctl non esegua o non trovi il giusto eseguibile, quindi fai un controllo del pacchetto qemu-kvm; la seconda è che si tratti di un bug di qemuctl.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

*