alpy.run

This module contains high-level functions for connecting QEMU process with a network skeleton.

alpy.run.qemu_with_skeleton(*, qemu_args, skeleton, timeout)[source]

Context manager for QEMU and network skeleton.

On entering context the manager creates tap interfaces and starts QEMU. QEMU connects to tap interfaces. Then network nodes are created and the interfaces are moved to the node namespaces. On exiting the context QEMU process is stopped and network skeleton is destroyed.

Parameters:
Returns:

QMP handle

Return type:

QEMUMonitorProtocol