How to hot plugin a new vhost-user-blk-pci device to running VM?

Liang Chaojun jesonliang040705 at hotmail.com
Fri May 14 06:33:37 UTC 2021



Thanks,I have tried qemu monitor as below. I used chardev_add to add a chardev and used device_add it to running vm. But i often hit a issue and cause the vm crash. qemu-system-x86_64: ../hw/virtio/vhost.c:1566: vhost_dev_get_config: Assertion `hdev->vhost_ops' failed.

virsh qemu-monitor-command spdk1 --hmp --cmd "chardev-add socket,id=spdk_vhost_blk0,path=/var/tmp/vhost.0,reconnect=1"  virsh qemu-monitor-command spdk1 --hmp --cmd "device_add vhost-user-blk-pci,chardev=spdk_vhost_blk0,num-queues=4"

> 在 2021年5月14日,00:47,Peter Krempa <pkrempa at redhat.com> 写道:
> 
> On Thu, May 13, 2021 at 23:11:36 +0800, Liang Chaojun wrote:
>> 
>> 
>> Thanks Peter for your quickly response. Is there any workaround to do that?As you know we must take care the risk of using latest version in product environment.
> 
> Manual approach is to use 'virsh qemu-monitor-command' or the equivalent
> to attach the appropriate backends and frontends manually.
> 
> Obviously that is very far from anything I'd recommend to use in any
> production environment.
> 





More information about the libvir-list mailing list