Skip to content

Latest commit

 

History

History
33 lines (17 loc) · 1.46 KB

File metadata and controls

33 lines (17 loc) · 1.46 KB

API Reference

Module prototype

  • open_qemu_mode( vm_name=None )

    Open qemu with image located at image_path in qemu mode. It opens VNC on port 1, creates a TCP tunnel for qemu control on port qemu_ctrl_port, and forwards host port ssh_fwd_port to guest port 22 (the default SSH port).

    If vm_name is set, it also preloads the snapshot named vm_name.

  • open_s2e_mode( vm_name=None )

    This method like open_qemu_mode() except that it opens qemu in s2e mode. In addition, it loads s2e configure file located at configure_file_path and actives s2e verbose mode.

  • control_qemu( cmd )

    Control qemu by sending the command cmd to it. One call for one command.

  • ssh_guest( cmd, s2e_mode=False, iden_file=None, retry_n=3 )

    Control guest vm by sending the command cmd to it. Like control_qemu(), one call for one command.

    Defaultly this method is used in qemu mode. If you use it in s2e mode, set s2e_mode to True.

    You can specify SSH identity file by setting iden_file.

    If SSH connection failed, it will retry retry_n times.

  • scp_guest( item_path, is_directory=False, base_dir=home_dir, retry_n=3 )

    Copy the item located at item_path of host vm to guest vm by SCP. If the item is a directory, set is_directory to True. The item_path is related to base_dir. One item (or directory) for one call.

    Like ssh_guest(), if SCP connection failed, it will retry retry_n times.