def install_usbclerk_win(vmi): """Install usbclerk on a windows client. ..todo:: host_path - fix """ vm.copy_files_to(vmi.cfg.host_path, self.cfg.client_path_usbc) cmd = ["start", "/wait", "msiexec", "/i", vmi.cfg.client_path_usbc, "/qn"] act.run_cmd(vmi, cmd)
def install_usbclerk_win(vmi): """Install usbclerk on a windows client. ..todo:: host_path - fix """ vmi.vm.copy_files_to(vmi.cfg.host_path, vmi.cfg.client_path_usbc) cmd = ["start", "/wait", "msiexec", "/i", vmi.cfg.client_path_usbc, "/qn"] act.run_cmd(vmi, cmd)
def install_rv(vmi): """Install remote-viewer on a windows client. .. todo:: Add cfg.client_path_rv_dst = C:\virt-viewer """ vm.copy_files_to(vmi.cfg.host_path, self.cfg.client_path_rv) cmd = ["start", "/wait", "msiexec", "/i", vmi.cfg.client_path_rv] cmd.append("INSTALLDIR=%s" % vmi.cfg.client_path_rv_dst) act.run_cmd(vmi, cmd)
def install_rv(vmi): """Install remote-viewer on a windows client. .. todo:: Add cfg.client_path_rv_dst = C:\virt-viewer """ vmi.vm.copy_files_to(vmi.cfg.host_path, vmi.cfg.client_path_rv) cmd = ['start', '/wait', 'msiexec', '/i', vmi.cfg.client_path_rv] cmd.append('INSTALLDIR=%s' % vmi.cfg.client_path_rv_dst) act.run_cmd(vmi, cmd)
def kill_by_name(vmi, app_name): """Kill selected app on selected VM. Parameters ---------- app_name : str Name of the binary. """ cmd = ["taskkill", "/F", "/IM"] cmd.append(app_name.split("\\")[-1]) act.run_cmd(vmi, cmd)
def reset_gui(vmi): """Kill remote-viewer. Raises ------ SpiceUtilsError Fails to kill remote-viewer. """ # .. todo:: check if remote-viewer is running before killing it. cmd = ["taskkill", "/F", "/IM", "remote-viewer.exe"] act.run_cmd(vmi, cmd)
def kill_by_name(vmi, app_name): """Kill selected app on selected VM. Parameters ---------- app_name : str Name of the binary. """ cmd = ["taskkill", "/F", "/IM"] cmd.append(app_name.split('\\')[-1]) act.run_cmd(vmi, cmd)
def service_vdagent(vmi, action): """Start/Stop/... on the spice-vdagentd service. Parameters ---------- action : str Action on vdagent-service: stop, start, restart, status, ... http://ss64.com/nt/net_service.html Know actions are: start / stop / pause / continue. .. todo:: Implement me. Not finished: status, restart. """ cmd = ["net", action, "RHEV Spice Agent"] act.run_cmd(vmi, cmd)
def service_vdagent(vmi, action): """Start/Stop/... on the spice-vdagentd service. Parameters ---------- action : str Action on vdagent-service: stop, start, restart, status, ... http://ss64.com/nt/net_service.html Know actions are: start / stop / pause / continue. .. todo:: Implement me. Not finished: status, restart. """ cmd = ['net', action, "RHEV Spice Agent"] act.run_cmd(vmi, cmd)
def verify_virtio(vmi): """Verify Virtio-Serial linux driver is properly loaded. """ cmd = [vmi.cfg.pnputil, "/e"] output = act.run_cmd(vmi, cmd) installed = "System devices" in output act.info(vmi, "Virtio Serial driver is installed:", installed) return installed
def proc_is_active(vmi, pname): cmd = ["tasklist", "/FI"] cmd.append("IMAGENAME eq %s.exe" % pname) output = act.run_cmd(vmi, cmd) if pname in output: res = True else: res = False return res
def verify_virtio(vmi): """Verify Virtio-Serial linux driver is properly loaded. """ cmd = [vmi.cfg.pnputil, '/e'] output = act.run_cmd(vmi, cmd) installed = "System devices" in output act.info(vmi, "Virtio Serial driver is installed:", installed) return installed
def proc_is_active(vmi, pname): cmd = ['tasklist', '/FI'] cmd.append("IMAGENAME eq %s.exe" % pname) output = act.run_cmd(vmi, cmd) return pname in output