Esempio n. 1
0
    def _addQxlDriver(self, mptObj, dstDir):
        drvDir = os.path.join(self.param.tmpDir, "qxl")
        FvmUtil.shell('/bin/mkdir "%s"' % (drvDir), "stdout")
        FvmUtil.shell('/usr/bin/unzip "%s" -d "%s"' % (os.path.join(self.dataDir, "qxl_xp_x86.zip"), drvDir), "stdout")

        drvSubDir = os.path.join(drvDir, "xp", "x86")
        for f in os.listdir(drvSubDir):
            mptObj.addFile(os.path.join(drvSubDir, f), dstDir, True)
Esempio n. 2
0
    def _addVdagent(self, mptObj, dstDir):
        drvDir = os.path.join(self.param.tmpDir, "vdagent")
        FvmUtil.shell('/bin/mkdir "%s"' % (drvDir), "stdout")
        FvmUtil.shell('/usr/bin/unzip "%s" -d "%s"' % (os.path.join(self.dataDir, "vdagent-win32_20111124.zip"), drvDir), "stdout")

        if FvmUtil.getWinArch(self.osName) == "x86":
            drvSubDir = os.path.join(drvDir, "vdagent_x86")
        elif FvmUtil.getWinArch(self.osName) == "amd64":
            drvSubDir = os.path.join(drvDir, "vdagent_x64")
        else:
            assert False

        for f in os.listdir(drvSubDir):
            mptObj.addFile(os.path.join(drvSubDir, f), dstDir, True)
Esempio n. 3
0
    def _addParaDriver(self, mptObj, dstDir):
        drvDir = os.path.join(self.param.tmpDir, "virtio")
        FvmUtil.shell('/bin/mkdir "%s"' % (drvDir), "stdout")
        FvmUtil.shell('/usr/bin/7z x "%s" -o"%s"' % (os.path.join(self.dataDir, "virtio-win-0.1-52.iso"), drvDir), "stdout")

        if FvmUtil.getWinArch(self.osName) == "x86":
            drvSubDir = os.path.join(drvDir, "XP", "X86")
            for f in os.listdir(drvSubDir):
                mptObj.addFile(os.path.join(drvSubDir, f), dstDir, True)
            drvSubDir = os.path.join(drvDir, "WXP", "X86")
            for f in os.listdir(drvSubDir):
                mptObj.addFile(os.path.join(drvSubDir, f), dstDir, True)
        elif FvmUtil.getWinArch(self.osName) == "amd64":
            drvSubDir = os.path.join(drvDir, "XP", "AMD64")
            for f in os.listdir(drvSubDir):
                mptObj.addFile(os.path.join(drvSubDir, f), dstDir, True)
        else:
            assert False