mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: config: Fix generic vhost-user parsing
The generic vhost-user device took its virtio device type on the command line via the `virtio_id` parameter, but the same value is called `device_type` in the API and the resulting config struct. This irregularity was due to churn during the review process, `device_type` was the intended name. Accept `device_type` on the command line and keep `virtio_id` as a deprecated alias that logs a warning. The alias will then be removed in a later release. Fixes: #8545 Assisted-by: Claude:Opus-4.8 Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -43,14 +43,14 @@ similar to this:
|
||||
--disk path=your-linux-image.iso \
|
||||
--kernel vmlinux \
|
||||
--cmdline "console=hvc0 root=/dev/vda1 rw" \
|
||||
--generic-vhost-user "socket=\"${path_to_virtiofsd_socket//\"/\"\"}\",virtio_id=26,queue_sizes=[512,512]" \
|
||||
--generic-vhost-user "socket=\"${path_to_virtiofsd_socket//\"/\"\"}\",device_type=26,queue_sizes=[512,512]" \
|
||||
"${other_cloud_hypervisor_options[@]}"
|
||||
```
|
||||
|
||||
26 is the ID for a virtio-fs device. The IDs for other devices are defined
|
||||
by the VIRTIO specification. The odd-looking variable expansion escapes
|
||||
any double quotes in the socket path. It is also possible to provide
|
||||
the name that is defined by the virtio specification, so `virtio_id=fs`
|
||||
the name that is defined by the virtio specification, so `device_type=fs`
|
||||
will also work.
|
||||
|
||||
Inside the guest, you can mount the virtio-fs device with
|
||||
|
||||
Reference in New Issue
Block a user