-
Notifications
You must be signed in to change notification settings - Fork 28
run_qemu.sh: replace -drive rootfs with -blockdev + -device #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
According to Itaru Kitayama in pmem#210, this fixes the following error: ``` qemu-system-aarch64: -drive file=root.img,format=raw,media=disk: PCI: Only PCI/PCIe bridges can be plugged into pxb-cxl ``` > Jonathan explains this is due to on arm64 -drive is virtoi-blk by > default and we need to set a bus via the -device option. Do it as > Jonathan suggested in: > > https://lore.kernel.org/linux-cxl/20250520183109.00002730@huawei.com/ From https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-1 The QEMU block device handling options have a long history and have gone through several iterations as the feature set and complexity of the block layer have grown. Many online guides to QEMU often reference older and deprecated options, which can lead to confusion. The most explicit way to describe disks is to use a combination of -device to specify the hardware device and -blockdev to describe the backend. The device defines what the guest sees and the backend describes how QEMU handles the data. It is the only guaranteed stable interface for describing block devices and as such is recommended for management tools and scripting. The -drive option combines the device and backend into a single command line option which is a more human friendly. There is however no interface stability guarantee although some older board models still need updating to work with the modern blockdev forms. Co-developed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Co-developed-by: Itaru Kitayama <itaru.kitayama@fujitsu.com> Tested-by: Itaru Kitayama <itaru.kitayama@fujitsu.com> Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@marc-hb thanks for this new PR. I've tested your proposed branch and I was able to get to the prompt (autologin) after commenting some Debian testing packages out from the list as the mkosi doesn't know how to expand the rootfs image as the number of packages grow. I tested mkosi alone and tried to grow disk sizes, and with the recent mkosi, I think we need two .conf files: |
@ikitayama I really don't understand how this PR can be related to Debian packages and disk sizes, is it? I mean, does this PR make any difference with respect to building the image? It really should not. BTW every time I have a "disk full" message, |
@marc-hb the wipe option |
You can also try |
I updated mkosi repository chcked out from GitHub and did not hit the mkosi image creation thanks. At the top of the run_qemu.sh script:
Is ths rootfssize shell variable honored during the execution? In my trial the image size of root.img.raw file is 2.4G. |
As discovered in (unrelated) pmem#211 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
It depends: |
As discovered in (unrelated) #211 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
I just realized QEMU silently ignores
|
Tentative fix in #213 |
According to Itaru Kitayama in #210, this fixes the following error:
From https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-1
The QEMU block device handling options have a long history and have gone
through several iterations as the feature set and complexity of the
block layer have grown. Many online guides to QEMU often reference older
and deprecated options, which can lead to confusion.
The most explicit way to describe disks is to use a combination of
-device to specify the hardware device and -blockdev to describe the
backend. The device defines what the guest sees and the backend
describes how QEMU handles the data. It is the only guaranteed stable
interface for describing block devices and as such is recommended for
management tools and scripting.
The -drive option combines the device and backend into a single command
line option which is a more human friendly. There is however no
interface stability guarantee although some older board models still
need updating to work with the modern blockdev forms.
Co-developed-by: Jonathan Cameron Jonathan.Cameron@huawei.com
Co-developed-by: Itaru Kitayama itaru.kitayama@fujitsu.com
Tested-by: Itaru Kitayama itaru.kitayama@fujitsu.com
Signed-off-by: Marc Herbert marc.herbert@intel.com