Whenever there is a file system inconsistency involved, the system mounts in Read only in order to prevent damage to the system. In Xen, if you come across such a situation we can try using the following methods to mount that back in write mode.
- Boot the VM in single user mode. One can get into single user mode by changing the boot option of the VM from “graphical utf8” to “rw init=/bin/bash”
- The VM now goes into single user mode upon reboot
- Try Using command “mount -o remount, rw /” to mount the VM back into write mode.
- If this fails, the VM filesystem needs a manual file system check and hence it is required to reboot the VM in “graphical utf8” so that a filesystem corruption can be detected during system boot where the VM gets into maintenance mode prompting us for the root password
- Once into maintenance mode, we can run a manual fsck using “fsck -ay “filesystem to be checked”
- Reboot VM after this process.
Now you have successfully brought back the VM to Write mode.
Here is a related post you maybe interested in: Changing the VLAN ID using the VMware Infra Client or Vsphere client