diff --git a/scripts/vagrant/Vagrantfile b/scripts/vagrant/Vagrantfile index d78f1313b..ce9ae8741 100644 --- a/scripts/vagrant/Vagrantfile +++ b/scripts/vagrant/Vagrantfile @@ -150,7 +150,7 @@ Vagrant.configure(2) do |config| libvirt.qemuargs :value => "-drive" libvirt.qemuargs :value => "format=raw,file=#{nvme_disk},if=none,id=#{nvme_disk_id}" libvirt.qemuargs :value => "-device" - if nvme_namespaces["#{index}".to_i].nil? + if nvme_namespaces["#{index}".to_i].nil? || nvme_namespaces["#{index}".to_i] == "1" libvirt.qemuargs :value => "nvme,drive=#{nvme_disk_id},serial=1234#{index}" else libvirt.qemuargs :value => "nvme,drive=#{nvme_disk_id},serial=1234#{index},namespaces=#{nvme_namespaces["#{index}".to_i]}" diff --git a/scripts/vagrant/create_vbox.sh b/scripts/vagrant/create_vbox.sh index 3a51abbcb..74b9d6ffa 100755 --- a/scripts/vagrant/create_vbox.sh +++ b/scripts/vagrant/create_vbox.sh @@ -178,7 +178,6 @@ fi if [ -z "$NVME_FILE" ]; then TMP="/var/lib/libvirt/images/nvme_disk.img" NVME_DISKS_TYPE="nvme" - NVME_DISKS_NAMESPACES="1" else TMP="" for args in $NVME_FILE; do @@ -188,7 +187,7 @@ else type="nvme" fi NVME_DISKS_TYPE+="$type,"; - if [ -z "$namespace" ]; then + if [ -z "$namespace" ] && [ -n "$SPDK_QEMU_EMULATOR" ]; then namespace="1" fi NVME_DISKS_NAMESPACES+="$namespace,";