use local cache for vms, reduce get method usage.

use local cache for vms, reduce get method usage.