def _check(): QMError.check(os.path.exists("/dev/kvm"), QMError.CODE_UNSUPPORTED, "No KVM support on host") QMError.check(os.access("/dev/kvm", os.W_OK), QMError.CODE_UNSUPPORTED, "No permission to use KVM") QMError.check(os.geteuid() == 0, QMError.CODE_UNSUPPORTED, "Not running as root") QMError.check(cmd.exists("qm"), QMError.CODE_UNSUPPORTED, "Binary qm does not exist") QMError.check(cmd.exists("socat"), QMError.CODE_UNSUPPORTED, "Binary socat does not exist") dpkg.checkSupport() QMError.check(dpkg.isInstalled("pve-qemu-kvm"), QMError.CODE_UNSUPPORTED, "Package pve-qemu-kvm not installed") global qmVersion qmVersion = dpkg.getVersion("pve-qemu-kvm") QMError.check(([0, 15, 0] <= qmVersion < [2, 3]), QMError.CODE_UNSUPPORTED, "Unsupported version of pve-qemu-kvm", {"version": qmVersion}) brctl.checkSupport() return True
def _check(): QemuImgError.check(cmd.exists("qemu-img"), QemuImgError.CODE_UNSUPPORTED, "Binary qemu-img does not exist") return True
def _check(): TcpserverError.check(cmd.exists("tcpserver"), TcpserverError.CODE_UNSUPPORTED, "Binary tcpserver does not exist") return True
def isSupported(): return cmd.exists("busybox")
def _check(): VFatError.check(cmd.exists("mkfs.vfat"), VFatError.CODE_UNSUPPORTED, "Binary mkfs.vfat does not exist") return True
def _check(): for binary in ['mkfs.vfat', 'sfdisk', 'dd', 'losetup', 'partx']: ImageError.check(cmd.exists(binary), ImageError.CODE_UNSUPPORTED, "Binary %s does not exist" % binary) return True
def isSupported(): return cmd.exists("aria2c")
def _check(): BrctlError.check(os.geteuid() == 0, BrctlError.CODE_UNSUPPORTED, "Not running as root") BrctlError.check(cmd.exists("brctl"), BrctlError.CODE_UNSUPPORTED, "Binary brctl does not exist") return True
def _check(): IpspyError.check(cmd.exists("ipspy"), IpspyError.CODE_UNSUPPORTED, "Binary ipspy does not exist") return True
def _check(): WebsockifyError.check(cmd.exists("websockify"), WebsockifyError.CODE_UNSUPPORTED, "Binary websockify does not exist") return True
def _check(): DpkgError.check(cmd.exists("dpkg-query"), DpkgError.CODE_UNSUPPORTED, "Binary dpkg-query does not exist") return True
def _check(): NetstatError.check(cmd.exists("netstat"), NetstatError.CODE_UNSUPPORTED, "Binary netstat does not exist") return True
def isSupported(): return cmd.exists("vpncloud")