diff --git a/scripts/gen_nvme.sh b/scripts/gen_nvme.sh index 31817b271..fe619b2f3 100755 --- a/scripts/gen_nvme.sh +++ b/scripts/gen_nvme.sh @@ -34,10 +34,22 @@ function create_json_config() { echo '}' } +function create_json_config_with_subsystems() { + cat <<- JSON + { + "subsystems": [ + $(create_json_config) + ] + } + JSON +} + bdfs=($(nvme_in_userspace)) if [ "$1" = "--json" ]; then create_json_config +elif [ "$1" = "--json-with-subsystems" ]; then + create_json_config_with_subsystems else create_classic_config fi diff --git a/scripts/vagrant/README.md b/scripts/vagrant/README.md index 323a26d2d..ff77bfe47 100644 --- a/scripts/vagrant/README.md +++ b/scripts/vagrant/README.md @@ -184,7 +184,8 @@ Following VM initialization you must: ``` $ sudo scripts/setup.sh - $ sudo ./build/examples/hello_bdev + $ sudo scripts/gen_nvme.sh --json-with-subsystems > ./build/examples/hello_bdev.json + $ sudo ./build/examples/hello_bdev --json ./build/examples/hello_bdev.json -b Nvme0n1 ``` ### Running autorun.sh with vagrant