diff --git a/virttest/env_process.py b/virttest/env_process.py index 1588cdede1..702cc26117 100644 --- a/virttest/env_process.py +++ b/virttest/env_process.py @@ -765,7 +765,7 @@ def preprocess(test, params, env): kernel_extra_params_add = params.get("kernel_extra_params_add", "") kernel_extra_params_remove = params.get("kernel_extra_params_remove", "") if params.get("disable_pci_msi"): - disable_pci_msi = params.get("disable-pci_msi") + disable_pci_msi = params.get("disable_pci_msi") if disable_pci_msi == "yes": if "pci=" in kernel_extra_params_add: kernel_extra_params_add = re.sub("pci=.*?\s+", "pci=nomsi ", diff --git a/virttest/utils_disk.py b/virttest/utils_disk.py index f358a5fcae..99f270213c 100644 --- a/virttest/utils_disk.py +++ b/virttest/utils_disk.py @@ -13,6 +13,7 @@ from avocado.core import exceptions from avocado.utils import process +from avocado.utils.service import SpecificServiceManager from . import error_context @@ -422,6 +423,12 @@ def __init__(self, disk): self.g = guestfs.GuestFS() self.disk = disk self.g.add_drive(disk) + libvirtd = SpecificServiceManager("libvirtd") + libvirtd_status = libvirtd.status() + if libvirtd_status is None: + raise exceptions.TestError('libvirtd: service not found') + if (not libvirtd_status) and (not libvirtd.start()): + raise exceptions.TestError('libvirtd: failed to start') logging.debug("Launch the disk %s, wait..." % self.disk) self.g.launch()