[Feature Request] Automatic device configuration discovery

Bug #1798434 reported by Ryan Govostes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Won't Fix
Undecided
Unassigned

Bug Description

Would it be possible to have a script that enumerates the device tree of a Linux host and generates a qemu command line that would recreate it under emulation? The user would have to customize the arguments (for instance to point to disk image files), but it would take a lot of the guesswork out.

Similarly, there could be information that can be gleaned from the kernel build config that would help with configuration.

Ryan Govostes (rgov)
description: updated
Revision history for this message
Peter Maydell (pmaydell) wrote :

This is occasionally asked for but unfortunately not in the general case possible. Device trees contain enough information for a guest OS to use the hardware; they do not contain a full description of how the hardware is actually configured and connected together, and they don't say anything about parts of the hardware that are "discoverable" (ie probeable, like PCI). So there isn't enough information to produce a full board model, and the parts that correspond to QEMU command line options (like pluggable devices such as ethernet cards) aren't usually in the DT at all.

The expected workflow goes the other way around -- you start by picking a machine type that QEMU models, and then configure the kernel and use the device tree that is intended for it, in the same way you would if you wanted to get Linux running on a real hardware board.

Revision history for this message
Thomas Huth (th-huth) wrote :

Right, and since QEMU also only supports a limited set of devices, there is no chance that you can mirror an arbitrary host this way. But if you want to convert a host into a VM and do not care whether each and every detail can be mirrored, have a look at http://libguestfs.org/virt-p2v.1.html - that's likely the best solution so far.

Changed in qemu:
status: New → Won't Fix
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.