Using `incus storage volume attach --create` for VM block devices

I remember incus storage volume attach gained a –create flag recently, and it’s in 7.0.1.

I’m trying to find the one-line equivalent of the following:

incus storage volume create default vmhost0-sdb --type block size=10GiB
incus storage volume attach default vmhost0-sdb vmhost0 sdb

However I’ve not been able to do this with --create:

$ incus storage volume attach default vmhost0-sdc vmhost0 sdc --create --type block size=10GiB
Error: unknown flag: --type

Is the --create option limited to container filesystem volumes?

The command documentation is wrong. If you are dealing with a VM and did not specify a path for your volume, then it gets created as a block volume: incus/cmd/incus/storage_volume.go at 64d47514c580654a1a380fb05b1aa375d084ddd5 · lxc/incus · GitHub

However, please note that the command doesn’t accept additional configuration such as your size override.