Index: /trunk/include/VBox/scsi.h
===================================================================
--- /trunk/include/VBox/scsi.h	(revision 39565)
+++ /trunk/include/VBox/scsi.h	(revision 39566)
@@ -185,4 +185,5 @@
 #define SCSI_ASC_LOGICAL_BLOCK_OOR                          0x21
 #define SCSI_ASC_INV_FIELD_IN_CMD_PACKET                    0x24
+#define SCSI_ASC_WRITE_PROTECTED                            0x27
 #define SCSI_ASC_MEDIUM_MAY_HAVE_CHANGED                    0x28
 #define SCSI_ASC_MEDIUM_NOT_PRESENT                         0x3a
Index: /trunk/include/VBox/vscsi.h
===================================================================
--- /trunk/include/VBox/vscsi.h	(revision 39565)
+++ /trunk/include/VBox/vscsi.h	(revision 39566)
@@ -99,4 +99,6 @@
 /** The LUN has a non rotational medium. */
 #define VSCSI_LUN_FEATURE_NON_ROTATIONAL RT_BIT(1)
+/** The medium of the LUN is readonly. */
+#define VSCSI_LUN_FEATURE_READONLY       RT_BIT(2)
 
 /**
Index: /trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DrvSCSI.cpp	(revision 39565)
+++ /trunk/src/VBox/Devices/Storage/DrvSCSI.cpp	(revision 39566)
@@ -107,4 +107,6 @@
     /** Mark the drive as having a non-rotational medium (i.e. as a SSD). */
     bool                    fNonRotational;
+    /** Medium is readonly */
+    bool                    fReadonly;
 } DRVSCSI, *PDRVSCSI;
 
@@ -422,4 +424,7 @@
         *pfFeatures |= VSCSI_LUN_FEATURE_NON_ROTATIONAL;
 
+    if (pThis->fReadonly)
+        *pfFeatures |= VSCSI_LUN_FEATURE_READONLY;
+
     return VINF_SUCCESS;
 }
@@ -825,5 +830,5 @@
      * Validate and read configuration.
      */
-    if (!CFGMR3AreValuesValid(pCfg, "NonRotationalMedium\0"))
+    if (!CFGMR3AreValuesValid(pCfg, "NonRotationalMedium\0Readonly\0"))
         return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
                                 N_("SCSI configuration error: unknown option specified"));
@@ -833,4 +838,9 @@
         return PDMDRV_SET_ERROR(pDrvIns, rc,
                     N_("SCSI configuration error: failed to read \"NonRotationalMedium\" as boolean"));
+
+    rc = CFGMR3QueryBoolDef(pCfg, "Readonly", &pThis->fReadonly, false);
+    if (RT_FAILURE(rc))
+        return PDMDRV_SET_ERROR(pDrvIns, rc,
+                                N_("SCSI configuration error: failed to read \"Readonly\" as boolean"));
 
     /*
Index: /trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp	(revision 39565)
+++ /trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp	(revision 39566)
@@ -260,4 +260,7 @@
             aReply[3] = 0; /* Block descriptor length. */
 
+            if (pVScsiLun->fFeatures & VSCSI_LUN_FEATURE_READONLY)
+                aReply[2] |= RT_BIT(7); /* Set write protect bit */
+
             pu8ReplyPos = aReply + 4;
 
@@ -509,6 +512,11 @@
         {
             /* Enqueue new I/O request */
-            rc = vscsiIoReqTransferEnqueue(pVScsiLun, pVScsiReq, enmTxDir,
-                                           uLbaStart * 512, cSectorTransfer * 512);
+            if (   (   enmTxDir == VSCSIIOREQTXDIR_WRITE
+                    || enmTxDir == VSCSIIOREQTXDIR_FLUSH)
+                && (pVScsiLun->fFeatures & VSCSI_LUN_FEATURE_READONLY))
+                rcReq = vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_DATA_PROTECT, SCSI_ASC_WRITE_PROTECTED, 0x00);
+            else
+                rc = vscsiIoReqTransferEnqueue(pVScsiLun, pVScsiReq, enmTxDir,
+                                               uLbaStart * 512, cSectorTransfer * 512);
         }
     }
