2

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

Bertaud
  • 133
  • 1
  • 8
  • 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](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#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 07: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](http://lime-technology.com/forum/index.php?PHPSESSID=a40dfd4282e8dd1096ebd2d1e304e519&topic=35732.msg333245#msg333245), 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
  • There is no Ox1e device in my xml: is it the reason ? – Bertaud Nov 24 '15 at 14:53
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/32059/discussion-between-bertaud-and-andre-borie). – Bertaud Nov 24 '15 at 16:59

1 Answers1

1

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).

André Borie
  • 749
  • 1
  • 7
  • 21