diff --git a/virtio-devices/src/block.rs b/virtio-devices/src/block.rs index a08f7ed4c..23a0dbb3f 100644 --- a/virtio-devices/src/block.rs +++ b/virtio-devices/src/block.rs @@ -193,9 +193,7 @@ 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" - ); + warn!("Attempting to write to sector 0 on a disk without specifying image_type"); return Err(ExecuteError::ReadOnly); } diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index e484a447a..be6f7069c 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -2734,8 +2734,12 @@ impl DeviceManager { Configuration updated to persist type across reboots and migrations." ); - if detected_image_type == ImageType::Raw { - warn!("Autodetected raw image type. Disabling sector 0 writes."); + if detected_image_type == ImageType::Raw + || detected_image_type == ImageType::FixedVhd + { + warn!( + "Autodetected {detected_image_type} image type. Disabling sector 0 writes." + ); disable_sector0_writes = true; } else { warn!(