[admin@node00 upload]$ for imgname in pl* ; do
  oneimage create -d default \
  --name $imgname --path=/var/lib/one/upload/$imgname \
  --prefix vd --type DATABLOCK --persistent \
  --description "$imgname imported on `date`" 
done
ID: 24
ID: 25
ID: 26
ID: 27
ID: 28
ID: 29
[admin@node00 upload]$ rm pl*
[admin@node00 upload]$ 

This worked fine, so I deleted the uploaded images.

 

 

Warnings:

Out of memory

For the record, if you miss one of the hyphens with --name and use -name instead this causes the process to run out of memory like this:

[admin@node00 upload]$ for imgname in pl* [..removed bad command]
Killed
Killed
Killed
Killed
Killed
Killed
[admin@node00 upload]$ 

 

Don't do that :-)

 

Image not bootable

You might need to add --driver=qcow2 

[admin@nw01 upload]$ file 48e6c1dbc2a49f555e81f9c6d01d40fa 
48e6c1dbc2a49f555e81f9c6d01d40fa: Qemu Image, Format: Qcow , Version: 2
[admin@nw01 upload]$ oneimage create -d default --name "freebsd11_base" --path=/var/lib/one/upload/48e6c1dbc2a49f555e81f9c6d01d40fa --prefix=vd --type OS --description "FreeBSD 11 image mit context" --driver=qcow2
ID: 49