Upgrading: store VM state into DB