readVM and writeVM