I guess vmxml.sync() is what you want.