it seems that doesnt work, heres my config:
/etc/pve/storage.cfg
dir: local
path /var/lib/vz
content rootdir,images,iso,vztmpl
maxfiles 0
nfs: ext1
export /mnt
path /mnt/pve/ext1
server 10.0.0.10
content backup,images,rootdir,vztmpl,iso
maxfiles 1
options vers=3
nfs: ext2
export /mnt
path /mnt/pve/ext2
server 10.0.0.11
content vztmpl,iso,images,backup,rootdir
maxfiles 1
options vers=3
nfs: zpool
export /pool
path /mnt/pve/zpool
server 10.0.0.12
content rootdir,images,backup,iso,vztmpl
maxfiles 1
options vers=3
heres my array that i send to the server:
array(12) {
["ostemplate"]=>
string(28) "nfs_ext1:vztmpl/ubuntu.tar.gz"
["vmid"]=>
string(3) "106"
["hostname"]=>
string(5) "test"
["password"]=>
string(13) "123456"
["arch"]=>
string(5) "amd64"
["cpulimit"]=>
string(1) "1"
["cpuunits"]=>
string(3) "256"
["memory"]=>
string(4) "1024"
["swap"]=>
string(4) "1024"
["rootfs"]=>
string(11) "nfs_ext2:10"
["net0"]=>
string(68) "bridge=vmbr0,name=eth0,type=veth,ip=xxx.xxx.xxx.xxx/32,gw=xxx.xxx.xxx.xxx"
["onboot"]=>
bool(true)
}
heres the response:
This API Request Failed.
HTTP Response - 500
HTTP Error - HTTP/1.1 500 storage 'nfs_ext2' does not exists
i can create it in the web gui with these parameters, but not via api - so something is missing in regards to defining the storage - this works fine with rootfs= local:10 and ostemplate=local:vztmpl/ubuntu.tar.gz