Set the VirtualBox virtual harddrive to read-only.
'''1.''' Power off the machine.
'''2.''' Open setting window of the machine and set the type of storage device controller from AHCI
to LsiLogic SAS
.
VirtualBox
→ Settings
→ Storage
→ Type:
LsiLogic SAS
→ OK
'''3.''' Learn the syntax.
Do not run the following command. Only look at it.
TODO research: lsilogicsas
might no longer work because nowadays using IntelAhci. So commands below need adjustment. How? This is difficult because undocumented by VirtualBox.
VBoxManage setextradata vmname "VBoxInternal/Devices/lsilogicsas/0/LUN#0/AttachedDriver/Config/ReadOnly" 1Replace
vmname
with the name of the actual VM name.
'''4.''' On the command line run.
{{project_name_gateway_long}} Xfce example:
{{CodeSelect|code=
VBoxManage setextradata {{project_name_gateway_short}}-Xfce "VBoxInternal/Devices/lsilogicsas/0/LUN#0/AttachedDriver/Config/ReadOnly" 1
}}
{{project_name_workstation_long}} CLI example:
{{CodeSelect|code=
VBoxManage setextradata {{project_name_workstation_short}}-CLI "VBoxInternal/Devices/lsilogicsas/0/LUN#0/AttachedDriver/Config/ReadOnly" 1
}}