def status(name, call=None):
    if call != 'action':
        raise SaltCloudSystemExit(
            'The status action must be called with -a or --action.'
        )

    conn = get_conn()
    instance = conn.get_vm_by_name(name)
    return instance.get_status()
To check the status of a VM using its name
dataset/ETHPy150Open saltstack/salt/salt/cloud/clouds/vsphere.py/status