In the svn checkout code process of virtual machine Linux, the "/" file system suddenly becomes read-only. dmsg can see that the kernel has an I/O error. Restarting the VM indicates that the disk is incorrect. Run "fsck/-y" to fix the disk error. This situation occurs several times. Sometimes the disk can be started after it is fixed, and then it cannot be started.
Re-install the VM and check the code. The host system runs many tasks and the system is slow. Once an svn checkout Error occurs, I used iotop in the host system (Ubuntu) to check the process I/O status, and found that the write speed of updatedb. mlocate is very high, reaching 10 Mb/s or more.
This page resolves the cause: High I/O causing filesystem upload uption
When the host system and Virtual Machine IO are busy, the virtual machine's IO request is not responded in a timely manner. Virtual Machine Linux does not know that it is running in the virtual machine, it will be considered as a disk IO error, in order to protect disk data, the remount partition will be read-only.
The solution can be found at the above link, but it is relatively advanced (using direct IO, modifying kernel parameters, and using LVM partitions ).
Simple solution:
1) do not run high I/O tasks simultaneously on the host system and Virtual Machine (do not think your i7 computer is amazing );
2) back up the Virtual Machine (copy the vmdk file or use the VirtualBox snapshot), and easily recover even if an error occurs.