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

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #1754 from yangdongsheng/lxc_fix

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