Vitor de Lima has uploaded a new change for review. Change subject: vm.py: Always use 'qemu' domain type in fake mode ......................................................................
vm.py: Always use 'qemu' domain type in fake mode This patch forces the libvirt domain type to be 'qemu' if the fake kvm mode is enabled. This fixes problems faking ppc64 support in x86-64 hosts. Change-Id: I875854ccc4d884aa36a77cd062521889622e567d Signed-off-by: Vitor de Lima <[email protected]> --- M tests/vmTests.py M vdsm/vm.py 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/38/23938/1 diff --git a/tests/vmTests.py b/tests/vmTests.py index 6215041..27ce1f2 100644 --- a/tests/vmTests.py +++ b/tests/vmTests.py @@ -26,6 +26,7 @@ from vdsm import constants from testrunner import VdsmTestCase as TestCaseBase import caps +from vdsm import config from vdsm import utils from vdsm import libvirtconnection from monkeypatch import MonkeyPatch @@ -85,6 +86,7 @@ shutil.rmtree(constants.P_VDSM_RUN) constants.P_VDSM_RUN = oldVdsmRun + @MonkeyPatch(config.config, 'getboolean', lambda s, k: False) def testDomXML(self): expectedXML = """ <domain type="kvm"> @@ -608,6 +610,7 @@ self.assertEquals(cm.exception.args[0], exceptionMsg) + @MonkeyPatch(config.config, 'getboolean', lambda s, k: False) @MonkeyPatch(caps, 'getTargetArch', lambda: caps.Architecture.X86_64) @MonkeyPatch(caps, 'osversion', lambda: { 'release': '1', 'version': '18', 'name': 'Fedora'}) @@ -619,6 +622,7 @@ def testBuildCmdLineX86_64(self): self.assertBuildCmdLine(CONF_TO_DOMXML_X86_64) + @MonkeyPatch(config.config, 'getboolean', lambda s, k: False) @MonkeyPatch(caps, 'getTargetArch', lambda: caps.Architecture.PPC64) @MonkeyPatch(caps, 'osversion', lambda: { 'release': '1', 'version': '18', 'name': 'Fedora'}) diff --git a/vdsm/vm.py b/vdsm/vm.py index 5bdd9cc..e1a1651 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -915,7 +915,8 @@ self.doc = xml.dom.minidom.Document() - if utils.tobool(self.conf.get('kvmEnable', 'true')): + if not config.getboolean('vars', 'fake_kvm_support') and \ + utils.tobool(self.conf.get('kvmEnable', 'true')): domainType = 'kvm' else: domainType = 'qemu' -- To view, visit http://gerrit.ovirt.org/23938 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I875854ccc4d884aa36a77cd062521889622e567d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vitor de Lima <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
