def rule(event):
    if all(
        [
            any(
                [
                    "-m 1M" in event.deep_get("CommandLine", default=""),
                    "-m 2M" in event.deep_get("CommandLine", default=""),
                    "-m 3M" in event.deep_get("CommandLine", default=""),
                ]
            ),
            "restrict=off" in event.deep_get("CommandLine", default=""),
            "-netdev " in event.deep_get("CommandLine", default=""),
            "connect=" in event.deep_get("CommandLine", default=""),
            "-nographic" in event.deep_get("CommandLine", default=""),
            not any(
                [
                    " -cdrom " in event.deep_get("CommandLine", default=""),
                    " type=virt " in event.deep_get("CommandLine", default=""),
                    " -blockdev " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
