Fix variable judgment to import specific modules, and fix the error issue of virt-manager in non-virtualized systems.