From d90f852ddf5d3bacc7afe373df1764a45fc12b01 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 10 Mar 2026 13:58:40 +0100 Subject: [PATCH] virtio-devices: block: add helpful message on failed sector 0 write We ran the Microsoft Windows installer in CHV (via network + VNC) and the installation always failed when the installer wanted to write the partition table. Since recently, for very good reason, sector 0 writes are disabled if the image type is not set explicitly and only implicitly auto-detected as raw [0]. To ease troubleshooting, I've added a descriptive log message. It is a little spammy, but it is what is required to help users to troubleshoot. [0] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7728/changes/6ecdf90e22adeecbaf1ce311b1abd358a4788d48 Signed-off-by: Philipp Schuster On-behalf-of: SAP philipp.schuster@sap.com --- virtio-devices/src/block.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virtio-devices/src/block.rs b/virtio-devices/src/block.rs index bf7d9123c..0f6ca0882 100644 --- a/virtio-devices/src/block.rs +++ b/virtio-devices/src/block.rs @@ -186,6 +186,9 @@ impl BlockEpollHandler { } if request_type == RequestType::Out && disable_sector0_writes && request.sector == 0 { + warn!( + "Attempting to write to sector 0 on a raw disk without specifying image_type=raw" + ); return Err(ExecuteError::ReadOnly); }