qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] storing machine data in qcow images?


From: Michael S. Tsirkin
Subject: [Qemu-block] storing machine data in qcow images?
Date: Fri, 18 May 2018 18:30:38 +0300

Hi!
Right now, QEMU supports multiple machine types within
a given architecture. This was the case for many architectures
(like ARM) for a while, somewhat more recently this is the case
for x86 with I440FX and Q35 options.

Unfortunately this means that it's no longer possible
to more or less reliably boot a VM just given a disk image,
even if you select the correct QEMU binary:
you must supply the correct machine type.

Some guests go even further and require specific devices to be present.

Would it be reasonable to support storing this information in the qcow
image itself?  For example, I can see it following immediately the
backing file path within the image.

As Eduardo pointed out off-list, the format could be a set of key-value
pairs. Initially qemu-img could gain ability to retrieve and manipulate
these. Down the road we could teach qemu to use them automatically.
We could also thinkably warn the user, or drop the image from the boot
order.

Reasonable (IMO) things we could store in such a section:
- qemu architecture to use with the image
- machine type

more possibilities:
- required cpu flags
- expected frontend devices
- kernel flags for device tree based guests

Security considerations
- If there is a machine type specific security issue,
  this makes it easier to trick user to hitting it.
  Not sure how common this is.
- We most likely shouldn't get backend parameters from the image

Thoughts?

-- 
MST



reply via email to

[Prev in Thread] Current Thread [Next in Thread]