5

I use Kubuntu 14.04 (x86_64 3.13.0-43-generic #72-Ubuntu) with qemu-kvm.

$ kvm --version
QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.9)

How could I change the "default" machine (now it is out-from-the-box value pc-i440fx-trusty seen below)?

$ qemu-system-x86_64 -machine help
Supported machines are:    
pc-0.13              Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.0        Standard PC (i440FX + PIIX, 1996)
pc-1.0-qemu-kvm      Standard PC (i440FX + PIIX, 1996) (alias of pc-1.0)
pc-1.0               Standard PC (i440FX + PIIX, 1996)
pc-q35-1.7           Standard PC (Q35 + ICH9, 2009)
pc-1.1               Standard PC (i440FX + PIIX, 1996)
q35                  Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-2.0)
pc-q35-2.0           Standard PC (Q35 + ICH9, 2009)
pc-i440fx-1.4        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.5        Standard PC (i440FX + PIIX, 1996)
pc-0.14              Standard PC (i440FX + PIIX, 1996)
pc-0.15              Standard PC (i440FX + PIIX, 1996)
xenfv                Xen Fully-virtualized PC
pc-q35-1.4           Standard PC (Q35 + ICH9, 2009)
isapc                ISA-only PC
pc-0.10              Standard PC (i440FX + PIIX, 1996)
pc                   Ubuntu 14.04 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-trusty)
pc-i440fx-trusty     Ubuntu 14.04 PC (i440FX + PIIX, 1996) (default)
pc-1.2               Standard PC (i440FX + PIIX, 1996)
pc-0.11              Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.7        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.6        Standard PC (i440FX + PIIX, 1996)
none                 empty machine
xenpv                Xen Para-virtualized PC
pc-q35-1.5           Standard PC (Q35 + ICH9, 2009)
pc-1.0-precise       Standard PC (i440FX + PIIX, 1996) (alias of pc-1.0-qemu-kvm)
pc-1.0-qemu-kvm      Standard PC (i440FX + PIIX, 1996)
pc-q35-1.6           Standard PC (Q35 + ICH9, 2009)
pc-0.12              Standard PC (i440FX + PIIX, 1996)
pc-1.3               Standard PC (i440FX + PIIX, 1996)

I found this in qemu_2.0.0~rc1 diff:

++/* Ubuntu machine types */
++
++static QEMUMachine pc_machine_trusty = {
++ PC_DEFAULT_MACHINE_OPTIONS,
++ .default_machine_opts = "firmware=bios-256k.bin",
++ .hot_add_cpu = pc_hot_add_cpu,
++ .name = "pc-i440fx-trusty",
++ .alias = "pc",
++ .desc = "Ubuntu 14.04 PC (i440FX + PIIX, 1996)", 
++ .init = pc_init_pci,
++ .is_default = 1,
++};

-- so should I assume that this value is hardcoded and couldn't be changed not dealing with sources and re-compiling qemu?

1
  • How certain are you this is coming from KVM and not libvirt, given you're using Openstack?
    – ijw
    Feb 1, 2015 at 6:27

1 Answer 1

4

The default machine can be overridden with the -machine option:

qemu-system-x86_64 -machine pc ...

Replace pc accordingly.

2
  • That's clear. Question is how to change default value globally (because of working with OpenStack, which unfortunately don't allow to add command line attributes to qemu).
    – AntonioK
    Dec 23, 2014 at 14:19
  • 4
    @AntonioK Well in that case you have two options: recompile QEMU or create a wrapper script which adds the -machine FOO option (#!/bin/sh exec qemu-system-x86.bin -machine pc "$@"). Perhaps you can ask some Openstack resources for a configuration option where you do not have to modify QEMU, that seems to be your real question.
    – Lekensteyn
    Dec 24, 2014 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .