Create and provision an SVM
POST /svm/svms
Creates and provisions an SVM. If no IPspace is provided, then the SVM is created on the Default IPspace.
The number of parallel SVMs that can be created should not be greater than 5. When the sixth SVM POST request is issued, the error message "Maximum allowed SVM jobs exceeded. Wait for the existing SVM jobs to complete and try again." will be returned.
Required properties
- 
name- Name of the SVM to be created. 
Recommended optional properties
- 
ipspace.nameoripspace.uuid- IPspace of the SVM- 
ip_interfaces- If provided, the following fields are required: - 
ip_interfaces.name- Name of the interface - 
ip_interfaces.ip.address- IP address - 
ip_interfaces.ip.netmask- Netmask length or IP address - 
ip_interfaces.location.broadcast_domain.uuidorip_interfaces.location.broadcast_domain.name- Broadcast domain name or UUID belonging to the same IPspace of the SVM. 
 - 
 - 
routes- If provided, the following field is required:- 
routes.gateway- Gateway IP address 
 - 
 - 
cifs- If provided, interfaces, routes and DNS must be provided. The following fields are also required:- 
cifs.name- Name of the CIFS server to be created for the SVM. - 
cifs.ad_domain.fqdn- Fully qualified domain name - 
cifs.ad_domain.user- Administrator username - 
cifs.ad_domain.password- User password 
 - 
 - 
ldap- If provided, the following fields are required:- 
ldap.serversorldap.ad_domain- LDAP server list or Active directory domain - 
ldap.bind_dn- Bind DN - 
ldap.base_dn- Base DN 
 - 
 - 
nis- If provided, the following fields are required:- 
nis.servers- NIS servers - 
nis.domain- NIS domain 
 - 
 - 
dns- If provided, the following fields are required:- 
dns.servers- Name servers - 
dns.domains- Domains 
 - 
 
Default property values
If not specified in POST, the following default property values are assigned:
- 
language- C.UTF-8 - 
ipspace.name- Default - 
snapshot_policy.name- Default - 
subtype- Default ( sync-source if MetroCluster configuration ) 
Related ONTAP commands
- 
vserver create - 
vserver add-aggregates - 
network interface create - 
network route create - 
vserver services name-service dns create - 
vserver nfs create - 
vserver services name-service ldap client create - 
vserver cifs create - 
vserver services name-service nis-domain create - 
vserver iscsi create - 
vserver nvme create - 
vserver fcp create - 
vserver services name-service ns-switch create 
Examples
- 
Creates an SVM with default "snapshot_policy"
 
  POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}}'
- 
Creates an SVM and configures NFS, ISCSI and FCP
 
  POST "/api/svm/svms" '{"name":"testVs", "nfs":{"enabled":"true"}, "fcp":{"enabled":"true"}, "iscsi":{"enabled":"true"}}'
- 
Creates an SVM and configures NVMe
 
  POST "/api/svm/svms" '{"name":"testVs", "nvme":{"enabled":"true"}}'
- 
Creates an SVM and configures LDAP
 
  POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "ldap":{"servers":["10.140.101.1","10.140.101.2"], "ad_domain":"abc.com", "base_dn":"dc=netapp,dc=com", "bind_dn":"dc=netapp,dc=com"}}'
- 
Creates an SVM and configures NIS
 
  POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "nis":{"enabled":"true", "domain":"def.com","servers":["10.224.223.130", "10.224.223.131"]}}'
- 
Creates an SVM and configures DNS
 
  POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "dns":{"domains":["abc.com","def.com"], "servers":["10.224.223.130", "10.224.223.131"]}}'
- 
Creates an SVM and configures a LIF
 
  POST "/api/svm/svms" '{"name":"testVs", "ip_interfaces": [{"name":"lif1", "ip":{"address":"10.10.10.7", "netmask": "255.255.255.0"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}]}'
- 
Creates an SVM and configures a LIF with IPV6 address
 
  POST "/api/svm/svms" '{"name":"testVs", "ip_interfaces": [{"name":"lif2", "ip":{"address":"fd22:8b1e:b255:202:2a0:98ff:fe01:7d5b", "netmask":"24"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}]}'
- 
Creates an SVM and configures CIFS
 
  POST "/api/svm/svms" '{"name":"testVs", "cifs":{"name":"CIFDOC", "ad_domain":{"fqdn":"abc.def.com", "organizational_unit":"CN=Computers", "user":"cif_admin", "password":"abc123"}}, "ip_interfaces":[{"name":"lif1", "ip":{"address":"10.10.10.7", "netmask": "255.255.255.0"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}],"routes": [{"destination": {"address": "0.0.0.0", "netmask": "0"}, "gateway": "10.10.10.7"}], "dns":{"domains":["abc.def.com", "def.com"], "servers":["10.224.223.130", "10.224.223.131"]}}'
Learn more
Parameters
| Name | Type | In | Required | Description | 
|---|---|---|---|---|
return_timeout  | 
integer  | 
query  | 
False  | 
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.  | 
Request Body
| Name | Type | Description | 
|---|---|---|
_links  | 
||
aggregates  | 
array[aggregates]  | 
List of allowed aggregates for SVM volumes. An administrator is allowed to create volumes on these aggregates.  | 
cifs  | 
||
comment  | 
string  | 
Comment  | 
dns  | 
||
fcp  | 
||
ip_interfaces  | 
array[ip_interface_svm]  | 
IP interfaces for the SVM  | 
ipspace  | 
Either the UUID or name may be supplied on input.  | 
|
iscsi  | 
||
language  | 
string  | 
Default volume language code. UTF-8 encoded languages are valid in POST or PATCH. Non UTF-8 language encodings are for backward compatibility and are not valid input for POST and PATCH requests.  | 
ldap  | 
||
name  | 
string  | 
The name of the SVM.  | 
nfs  | 
||
nis  | 
||
nsswitch  | 
Name Service Switch Configuration  | 
|
nvme  | 
||
routes  | 
array[network_route_for_svm]  | 
Optional array of routes for the SVM  | 
snapshot_policy  | 
This is a reference to the Snapshot copy policy.  | 
|
subtype  | 
string  | 
SVM subtype. The SVM subtype sync_destination is created automatically when an SVM of subtype sync_source is created on the source MetroCluster cluster. A POST request with sync_destination as SVM subtype is invalid.  | 
uuid  | 
string  | 
The unique identifier of the SVM.  | 
Example request
{
  "_links": {
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "aggregates": [
    {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "aggr1",
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
    }
  ],
  "cifs": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "ad_domain": {
      "fqdn": "example.com",
      "organizational_unit": "string",
      "password": "string",
      "user": "string"
    },
    "name": "CIFS1"
  },
  "comment": "string",
  "dns": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "domains": [
      "example.com",
      "example2.example3.com"
    ],
    "servers": [
      "10.224.65.20",
      "2001:db08:a0b:12f0::1"
    ]
  },
  "fcp": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    }
  },
  "ip_interfaces": [
    {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "ip": {
        "address": "10.10.10.7",
        "netmask": "24"
      },
      "location": {
        "broadcast_domain": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "bd1",
          "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
        },
        "home_node": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "node1",
          "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
        }
      },
      "name": "lif1",
      "service_policy": "string",
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
    }
  ],
  "ipspace": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "exchange",
    "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
  },
  "iscsi": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    }
  },
  "language": "c.utf_8",
  "ldap": {
    "ad_domain": "string",
    "base_dn": "string",
    "bind_dn": "string",
    "servers": [
      "string"
    ]
  },
  "name": "svm1",
  "nfs": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    }
  },
  "nis": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "domain": "string",
    "servers": [
      "string"
    ]
  },
  "nsswitch": {
    "group": [
      "string"
    ],
    "hosts": [
      "string"
    ],
    "namemap": [
      "string"
    ],
    "netgroup": [
      "string"
    ],
    "passwd": [
      "string"
    ]
  },
  "nvme": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    }
  },
  "routes": [
    {
      "destination": {
        "address": "10.10.10.7",
        "family": "string",
        "netmask": "24"
      },
      "gateway": "10.1.1.1"
    }
  ],
  "snapshot_policy": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "default",
    "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
  },
  "subtype": "string",
  "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
}
Response
Status: 202, Accepted
| Name | Type | Description | 
|---|---|---|
job  | 
Example response
{
  "job": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "uuid": "string"
  }
}
Error
Status: Default
ONTAP Error Response Codes
| Error codes | Description | 
|---|---|
2621580  | 
Vserver name, comment and IPspace are allowed for a destination Vserver.  | 
2621634  | 
"sync-source" SVM can only be created in a MetroCluster configuration.  | 
2621657  | 
"sync-destination" SVM can only be created by the system.  | 
13434884  | 
Cannot create an SVM because of incorrect fields.  | 
13434885  | 
Non-UTF8 language(s) not supported.  | 
13434888  | 
IPspace UUID and IPspace Name mismatch.  | 
13434889  | 
Internal Error. Wait and retry.  | 
13434894  | 
Maximum allowed SVM jobs exceeded. Wait and retry.  | 
| Name | Type | Description | 
|---|---|---|
error  | 
Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}
Definitions
See Definitions
href
| Name | Type | Description | 
|---|---|---|
href  | 
string  | 
_links
| Name | Type | Description | 
|---|---|---|
self  | 
aggregates
Aggregate
| Name | Type | Description | 
|---|---|---|
_links  | 
||
name  | 
string  | 
|
uuid  | 
string  | 
ad_domain
| Name | Type | Description | 
|---|---|---|
fqdn  | 
string  | 
The fully qualified domain name of the Windows Active Directory to which this CIFS server belongs. A CIFS server appears as a member of Windows server object in the Active Directory store.  | 
organizational_unit  | 
string  | 
Specifies the organizational unit within the Active Directory domain to associate with the CIFS server.  | 
password  | 
string  | 
The account password used to add this CIFS server to the Active Directory. This is not audited. Valid in POST only.  | 
user  | 
string  | 
The user account used to add this CIFS server to the Active Directory. Valid in POST only.  | 
cifs
| Name | Type | Description | 
|---|---|---|
_links  | 
||
ad_domain  | 
||
enabled  | 
boolean  | 
Specifies whether or not the CIFS service is administratively enabled.  | 
name  | 
string  | 
The NetBIOS name of the CIFS server.  | 
dns
| Name | Type | Description | 
|---|---|---|
_links  | 
||
domains  | 
array[string]  | 
A list of DNS domains. Domain names have the following requirements: 
  | 
servers  | 
array[string]  | 
The list of IP addresses of the DNS servers. Addresses can be either IPv4 or IPv6 addresses.  | 
fcp
| Name | Type | Description | 
|---|---|---|
_links  | 
||
enabled  | 
boolean  | 
Enable Fiber Channel Protocol (FCP)? Setting to true creates a service if not already created.  | 
ip
IP information
| Name | Type | Description | 
|---|---|---|
address  | 
string  | 
IPv4 or IPv6 address  | 
netmask  | 
string  | 
Input as netmask length (16) or IPv4 mask (255.255.0.0).  | 
broadcast_domain
Broadcast domain UUID along with a readable name.
| Name | Type | Description | 
|---|---|---|
_links  | 
||
name  | 
string  | 
Name of the broadcast domain, scoped to its IPspace  | 
uuid  | 
string  | 
Broadcast domain UUID  | 
home_node
| Name | Type | Description | 
|---|---|---|
_links  | 
||
name  | 
string  | 
|
uuid  | 
string  | 
location
Home_node is optional.
| Name | Type | Description | 
|---|---|---|
broadcast_domain  | 
Broadcast domain UUID along with a readable name.  | 
|
home_node  | 
ip_interface_svm
Interface parameters. Name and home_node are optional.
| Name | Type | Description | 
|---|---|---|
_links  | 
||
ip  | 
IP information  | 
|
location  | 
Home_node is optional.  | 
|
name  | 
string  | 
The name of the interface (optional).  | 
service_policy  | 
string  | 
Built-in service policies for SVMs.  | 
uuid  | 
string  | 
The UUID that uniquely identifies the interface.  | 
ipspace
Either the UUID or name may be supplied on input.
| Name | Type | Description | 
|---|---|---|
_links  | 
||
name  | 
string  | 
IPspace name  | 
uuid  | 
string  | 
IPspace UUID  | 
iscsi
| Name | Type | Description | 
|---|---|---|
_links  | 
||
enabled  | 
boolean  | 
Enable iSCSI? Setting to true creates a service if not already created.  | 
ldap
| Name | Type | Description | 
|---|---|---|
ad_domain  | 
string  | 
This parameter specifies the name of the Active Directory domain
used to discover LDAP servers for use by this client.
This is mutually exclusive with   | 
base_dn  | 
string  | 
Specifies the default base DN for all searches.  | 
bind_dn  | 
string  | 
Specifies the user that binds to the LDAP servers. SVM API supports anonymous binding. For Simple and SASL LDAP binding, use the LDAP API endpoint.  | 
enabled  | 
boolean  | 
Enable LDAP? Setting to true creates a configuration if not already created.  | 
servers  | 
array[string]  | 
nfs
| Name | Type | Description | 
|---|---|---|
_links  | 
||
enabled  | 
boolean  | 
Enable NFS? Setting to true creates a service if not already created.  | 
nis
| Name | Type | Description | 
|---|---|---|
_links  | 
||
domain  | 
string  | 
The NIS domain to which this configuration belongs.  | 
enabled  | 
boolean  | 
Enable NIS? Setting to true creates a configuration if not already created.  | 
servers  | 
array[string]  | 
A list of hostnames or IP addresses of NIS servers used by the NIS domain configuration.  | 
nsswitch
Name Service Switch Configuration
| Name | Type | Description | 
|---|---|---|
group  | 
array[string]  | 
Group sources  | 
hosts  | 
array[string]  | 
Host sources  | 
namemap  | 
array[string]  | 
NameMap sources  | 
netgroup  | 
array[string]  | 
NetGroup sources  | 
passwd  | 
array[string]  | 
Password sources  | 
nvme
| Name | Type | Description | 
|---|---|---|
_links  | 
||
enabled  | 
boolean  | 
Enable NVMe? Setting to true creates a service if not already created.  | 
ip_info
IP information
| Name | Type | Description | 
|---|---|---|
address  | 
string  | 
IPv4 or IPv6 address  | 
family  | 
string  | 
IPv4 or IPv6  | 
netmask  | 
string  | 
Input as netmask length (16) or IPv4 mask (255.255.0.0). For IPv6, you must set the netmask length. The default value is 64. Output is always netmask length.  | 
network_route_for_svm
| Name | Type | Description | 
|---|---|---|
destination  | 
IP information  | 
|
gateway  | 
string  | 
The IP address of the gateway router leading to the destination.  | 
snapshot_policy
This is a reference to the Snapshot copy policy.
| Name | Type | Description | 
|---|---|---|
_links  | 
||
name  | 
string  | 
|
uuid  | 
string  | 
svm
| Name | Type | Description | 
|---|---|---|
_links  | 
||
aggregates  | 
array[aggregates]  | 
List of allowed aggregates for SVM volumes. An administrator is allowed to create volumes on these aggregates.  | 
cifs  | 
||
comment  | 
string  | 
Comment  | 
dns  | 
||
fcp  | 
||
ip_interfaces  | 
array[ip_interface_svm]  | 
IP interfaces for the SVM  | 
ipspace  | 
Either the UUID or name may be supplied on input.  | 
|
iscsi  | 
||
language  | 
string  | 
Default volume language code. UTF-8 encoded languages are valid in POST or PATCH. Non UTF-8 language encodings are for backward compatibility and are not valid input for POST and PATCH requests.  | 
ldap  | 
||
name  | 
string  | 
The name of the SVM.  | 
nfs  | 
||
nis  | 
||
nsswitch  | 
Name Service Switch Configuration  | 
|
nvme  | 
||
routes  | 
array[network_route_for_svm]  | 
Optional array of routes for the SVM  | 
snapshot_policy  | 
This is a reference to the Snapshot copy policy.  | 
|
subtype  | 
string  | 
SVM subtype. The SVM subtype sync_destination is created automatically when an SVM of subtype sync_source is created on the source MetroCluster cluster. A POST request with sync_destination as SVM subtype is invalid.  | 
uuid  | 
string  | 
The unique identifier of the SVM.  | 
job_link
| Name | Type | Description | 
|---|---|---|
_links  | 
||
uuid  | 
string  | 
The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation.  | 
error_arguments
| Name | Type | Description | 
|---|---|---|
code  | 
string  | 
Argument code  | 
message  | 
string  | 
Message argument  | 
error
| Name | Type | Description | 
|---|---|---|
arguments  | 
array[error_arguments]  | 
Message arguments  | 
code  | 
string  | 
Error code  | 
message  | 
string  | 
Error message  | 
target  | 
string  | 
The target parameter that caused the error.  |