-
Notifications
You must be signed in to change notification settings - Fork 5
Uploading Datasets
jim80net edited this page Oct 7, 2014
·
3 revisions
A windows example:
{
"uuid": "22222222-2222-2222-2222-222222222222",
"provider": "community",
"owner": "00000000-0000-0000-0000-000000000000",
"name": "windows2012r2",
"version": "1.0.0",
"description": "Windows 2012R2 Standard Edition - mycompany",
"homepage": "",
"urn": "smartos:uploaduser:windows2012r2:1.0.0",
"state": "active",
"public": true,
"disabled": false,
"type": "zvol",
"os": "windows",
"published_at": "2014-10-07T16:46:09Z",
"created_at": "2014-10-07T16:46:09Z",
"requirements": {
"networks": [
{
"comment_name": "net0",
"comment_description": "public"
}
],
"ssh_key": false
},
"users": [
{
"name": "administrator"
}
],
"tags": {
"role": "os"
},
"options": {
"cpu_type": "host",
"disk_driver": "virtio",
"image_size": "61440",
"nic_driver": "virtio"
},
"metatdata_info": [ ],
"builder_info": { },
"files": [
{
"path": "windows2012r2-1.0.0.zvol.gz",
"sha1": "mysha1sum",
"md5": "mymd5sum",
"size": 8083306448,
"compression": "gzip"
}
]
}
curl -v -u uploadusertoken: http://1.2.3.4/api/upload -F manifest=@myserver.manifest.dsapi -F file=@myserver.zvol.gz
If the uploading user has the s_dataset.manage and s_dataset.admin roles, the dataset will be automatically activated. Otherwise, activate it with the following command:
curl -v -u adminusertoken: http://1.2.3.4/api/datasets/22222222-2222-2222-2222-222222222222?action=enable
- tmpfs must be large enough to contain the whole image. Sorry, Windows users.
- Check the DSAPI manifest for errors.