refactor the apis for vmprovder