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] 6ecdf90e22

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2026-03-10 13:58:40 +01:00
committed by Rob Bradford
parent 0a4fe0e41e
commit d90f852ddf

View File

@@ -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);
}