run command hangs using "-M none"

Bug #1159605 reported by jiamswang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

when i run following command, it just hangs there

qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -nographic -machine none,kernel_irqchip=on -monitor unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile

OR

qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -nographic -M none -monitor unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile

but blow command just fine

qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -nographic -M none,kernel_irqchip=on -monitor unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile

OR

qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -nographic -M none, -monitor unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile

I installed qemu-git version on gentoo with kernel 3.8.4
is this a bug???

tags: added: paramter passing
Revision history for this message
Shehbaz Jaffer (shehbazjaffer007) wrote :

Hi,

Please see notes about all the commands that you are mentioning in the bug :

1. qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -nographic -machine none,kernel_irqchip=on -monitor unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile

starts a dumb qemu monitor interface. You can see that by removing the -nographic option and using the command as follows:

qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -machine none,kernel_irqchip=on -monitor unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile

2. qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -nographic -M none -monitor unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile

same as first. except that you are giving memory paramter as -M none. It defaults to 128 MB memory.

3. qemu-system-x86_64 -enable-kvm -S -no-user-config -nodefaults -nographic -M none,kernel_irqchip=on -monitor unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile

This command will not work as kernel_irqchip and M are two different options:
1. kernel_irqchip is a -machine paramter (check qemu-system-x86_64 -help).
2. -M is the memory parameter, where you specify how much memory has to be used by your VM.
Hence you should get the following warning like I get when I run your command:

Supported machines are:
none empty machine
pc Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-1.4)
pc-i440fx-1.4 Standard PC (i440FX + PIIX, 1996) (default)
pc-1.3 Standard PC
pc-1.2 Standard PC
pc-1.1 Standard PC
pc-1.0 Standard PC
pc-0.15 Standard PC
pc-0.14 Standard PC
pc-0.13 Standard PC
pc-0.12 Standard PC
pc-0.11 Standard PC, qemu 0.11
pc-0.10 Standard PC, qemu 0.10
isapc ISA-only PC
q35 Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-1.4)
pc-q35-1.4 Standard PC (Q35 + ICH9, 2009)

4. the 4th command would also give you a error. Please see help to clearify where you should be using ',' and '-' as delimiters. Rest assured, the argument passing of qemu is done using optarg() which is a pretty stable function.

Changed in qemu:
status: New → Invalid
Revision history for this message
Andreas Färber (afaerber) wrote :

Shehbaz, you seem to be mixing up -m and -M. -M is a shorthand for -machine, whereas -m is the memory.

Jiamswang, are you saying the second command gets fixed by adding a comma and the first by changing -M to -machine? That sounds more like a heisenbug (works sometimes, fails apparently randomly). Did you try without -pidfile and using your own UNIX socket rather than libvirt's?

Revision history for this message
Shehbaz Jaffer (shehbazjaffer007) wrote :

Andreas, sorry. My Bad. But could you please confirm that 3rd and 4th cmd run correctly/ lead to stall? Do you not get a help msg (unlike an infinite hang mentioned by Jiamswang ) that I mentioned in the comment?

I tried running the given commands on my machine and the 1st and 2nd commands run just fine. Its the 3rd and 4th commands that do not work. Also, the "," is handled by an appropriate help msg. I used libvirt 0.9.8 Host - Ubuntu 12.04 Kernel 3.6. Guest Gentoo.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.