Ref: https://github.com/harvester/harvester/issues/1608
Verify Items
- NVMe disk can only be added once on UI
Case: add new NVMe disk on dashboard UI
- Install Harvester with 2 nodes
- Power off 2nd node
- Update VM’s xml definition (by using
virsh edit
or virt-manager)- Create nvme.img block:
dd if=/dev/zero of=/var/lib/libvirt/images/nvme.img bs=1M count=4096
- change owner
chown qemu:qemu /var/lib/libvirt/images/nvme.img
- update
<domain type="kvm">
to<domain type="kvm" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">
- append xml node into domain as below:
- Create nvme.img block:
<qemu:commandline>
<qemu:arg value="-drive"/>
<qemu:arg value="file=/var/lib/libvirt/images/nvme.img,if=none,id=D22,format=raw"/>
<qemu:arg value="-device"/>
<qemu:arg value="nvme,drive=D22,serial=1234"/>
</qemu:commandline>
- Power on 2nd node
- login to dashboard, then click
Edit Config
on 2nd node - Navigate to Disks tab, then add the NVMe disk from the drop-down list of Add Disk
- The NVMe disk should disappear from the drop-down list
- Cick Save,
Edit Config
on 2nd node again - The NVMe disk should not able to be added again