When I was under Debian Wheezy, virt-manager created virtual machines with the "pc-0.12" machine type.
Since I am under Debian Jessie, virt-manager creates virtual machines with "pc-i440fx-2.1" machine type.

How does virt-manager (or libvirt, or qemu, or kvm ?) determine/find the right machine type ?

Thanks by advance

  • 1
    I think the default is defined at compile time and thus differs between distributions, though in reality you should change it to Q35 anyway as we're not in 1996 anymore. – André Borie Nov 23 '15 at 21:51
  • Why virt-manager doesn't follow your suggestions ;-) – Bertaud Nov 23 '15 at 22:41
  • You mean "doesn't follow yet my suggestion" ;), and that's just because they can still get away with it for now, just like you can still get away with forcing CSM booting even though you use both UEFI-capable machines and OSes. In the end, you should try and use what works best for you, but I recommend you try Q35 and see how it goes instead of emulating obsolete 1996-era hardware. – André Borie Nov 24 '15 at 7:39
  • 1
    I tried to change "pc-i440fx-2.1" by "pc-q35" as you suggested. The result is : error: internal error: PCI bus is not compatible with the device at 0000:00:1e.0. Device requires a PCI Express slot, which is not provided by bus 0000:00. the device is a PCI bridge Intel 82801 rev 90. – Bertaud Nov 24 '15 at 14:22
  • You can take a look here, essentially what happens is that the new machine type changes the default devices and the previous XML template no longer matches that and thus errors out. You need to adapt your VM definition to the new device model (aka machine type). – André Borie Nov 24 '15 at 14:27

The machine type (or device model) is a list of low-level devices that should be emulated by default, like a chipset, PCI controller, storage controller, etc. This "device model" is thus the base "computer" you'll be emulating, and on which you'll be adding other devices like disk drives, passed-through USB devices, etc.

I believe there is no logic to "choose" the device model and it just relies on compile-time defaults. There might be a notion of "templates" in libvirt/virt-manager and as such there may be different defaults depending on the template you choose (some OSes will refuse to boot with the outdated pc device model, so different device models need to be present to accomodate different OSes).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.