Fix variable judgment to import specific modules, and fix the error issue of virt-manager in non-virtualized systems.
assigned to @liyinjie
mentioned in commit 30d68c69
merged