env_process: Do not getattr of vm if vm is None.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>