def create(name,
           groups=None,
           ostype=None,
           register=True,
           basefolder=None,
           new_uuid=None,
           **kwargs):
    '''
    Create a new VM

    CLI Example:

    .. code-block:: bash

        salt 'hypervisor' vboxmanage.create <name>
    '''
    nodes = list_nodes_min()
    if name in nodes:
        raise CommandExecutionError(
            'The specified VM ({0}) is already registered.'.format(name)
        )

    params = ''

    if name:
        if NAME_RE.search(name):
            raise CommandExecutionError('New VM name contains invalid characters')
        params += ' --name {0}'.format(name)

    if groups:
        if isinstance(groups, string_types):
            groups = [groups]
        if isinstance(groups, list):
            params += ' --groups {0}'.format(','.join(groups))
        else:
            raise CommandExecutionError(
                'groups must be either a string or a list of strings'
            )

    ostypes = list_ostypes()
    if ostypes not in ostype:
        raise CommandExecutionError(
            'The specified OS type ({0}) is not available.'.format(name)
        )
    else:
        params += ' --ostype ' + ostype

    if register is True:
        params += ' --register'

    if basefolder:
        if not os.path.exists(basefolder):
            raise CommandExecutionError('basefolder {0} was not found'.format(basefolder))
        params += ' --basefolder {0}'.format(basefolder)

    if new_uuid:
        if NAME_RE.search(new_uuid):
            raise CommandExecutionError('New UUID contains invalid characters')
        params += ' --uuid {0}'.format(new_uuid)

    cmd = '{0} create {1}'.format(vboxcmd(), params)
    ret = salt.modules.cmdmod.run_all(cmd)
    if ret['retcode'] == 0:
        return True
    return ret['stderr']
dataset/ETHPy150Open saltstack/salt/salt/modules/vboxmanage.py/create/swapped operands of `not in`