mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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 <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
0a4fe0e41e
commit
d90f852ddf
@@ -186,6 +186,9 @@ impl BlockEpollHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if request_type == RequestType::Out && disable_sector0_writes && request.sector == 0 {
|
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);
|
return Err(ExecuteError::ReadOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user