-   Linux - Virtualization and Cloud (
-   -   Virtyalbox or Qemu - and how? (

turboscrew 06-17-2014 04:54 AM

Virtyalbox or Qemu - and how?
I need a VM to debug an embedded program, but I don't seem to get anything working properly.

I have two machines: a laptop - ThinkPad T42 (Pentium M, no HW support for virtualization) and a desktop - HP Pavilion a6622sc (AMD Phenom 8550, AMD-V).

The laptop runs Linux Mint 13 (32-bit) MATE and the desktop runs Ubuntu 14.04 LTS (32-bit).

I've tried both Virtualbox and Qemu on both machines, but no combination seems to work properly.

1) command 'qemu' doesn't exist.
2) on laptop Aqemu only gives IBM PC 64-bit option as computer type.
and keep complaining: "SPICE port number incorrect!" even if SPICE is not enabled. It doesn't start anything (the "play"-button).
3) In qemu-launcher the path to qemu is set to /usr/bin/qemu-system-i386, but it still doesn't launch anything (well, a window opens and closes so fast I can't see what it was).
4) On command line it starts, and even debugging works, but I don't seem to get any window showing the output (printk).

Everything starts fine and a window opens and the ouput is displayed there, but no luck with any kind of debugging.

desktop/Virtualbox: same as on laptop.

I'll check the desktop/qemu-stuff in more detail.

Darn those interruptions: I forgot the questions:

- Which one I'd be better off with?

- Any bent-of-iron-wire instructions how to install Qemu right (and what to install) and/or how to install the Virtualbox right (and what to install) for either of the machines?

- Any step-by-step instructions how to debug using Virtualbox?

jefro 06-17-2014 03:04 PM

Might make more sense if you made two questions on this maybe.

Qemu to start.

Qemu doesn't need virtual hardware support. It is pretty small and if installed and you have permissions correctly set, it should start or do something by command line. Find the file qemu and see what the permissions are.

Using the software manager or package management is usually the best way to install software. There are some front ends to qemu that sometimes make life easier.

273 06-17-2014 03:28 PM


Originally Posted by turboscrew (Post 5189241)
Everything starts fine and a window opens and the ouput is displayed there, but no luck with any kind of debugging.

What do you mean by this? What starts just fine? How are you trying to debug what?

turboscrew 06-18-2014 04:44 AM


1) command 'qemu' doesn't exist.

Everything starts fine and a window opens and the ouput is displayed there, but no luck with any kind of debugging.
I tried setting the environment variable VBOX_GUI_DBG_AUTO_SHOW and switch '--dbg', but not a glimpse anywhere about debug entry in any menu. I havent found any info about using a remote debugger (how to connect) either.

I have two machines and two VMs (this far) and I would like to have one combination that works.

turboscrew 06-18-2014 07:13 AM

- first QDiskFileDialog opens (empty, no menu)
- then QEMUCTL opens (empty), cannot close the window - not from the "x" nor feom the menu ("Quit").

It opens a terminal window, boots the guest and the guest output ends up onto the opened terminal.

The command line generated was:

/usr/bin/kvm -monitor stdio -cpu pentium -k fi -enable-kvm -m 256 -localtime -S -fda /home/jaa/OXkernel/ox/vmox.img -hda /home/jaa/.aqemu/OXkernel_HDA.img -boot once=a,menu=on -net nic,vlan=0 -net user,vlan=0 -name "OXkernel
I'm a bit concerned, though, because when I (accidentally) added --dbg I got error pop-up saying:

Error #1
qemu-system-x86_64: --dbg: invalid option
I thought it should have been qemu-system-i386 (with pentium set as processor type).
Anyway, If I use Aqemu, gdb can't connect to it.

On command line it works fine. It's just that ddd looses keyboard (but not mouse?) and shortly after that, crashes.
Nemiver seems to work better.

qemu-system-i386 -s -S -fda ~/OXkernel/ox/vmox.img
So it looks like not everything installed right, and I wouldn't like to base future effort on unstable environment.

BTW, any idea about these:
Are they disappeared totally or jus moved somewhere else?

273 06-18-2014 01:39 PM

I managed to enable the debugger in VirtualBox by editing ~/.VirtualBox/VirtualBox.xml and adding the following to it:

<ExtraDataItem name="GUI/Dbg/Enabled" value="true"/>
I don't know how good or bad it is though. I should also mention I am using VirtualBox 4.3.12 from the Oracle repositories with the Extension pack installed but I don't know how much difference any of that makes.

turboscrew 06-18-2014 05:02 PM

@273: Heyyy, that did it. The 'debug' suddenly appeared. Thanks!
(And seems to work too.)

All times are GMT -5. The time now is 11:31 PM.