[PATCH 0/3] bhyve: support setting serial number for disks
Roman Bogorodskiy (3): bhyve: support setting serial number for SATA disks bhyve: support setting serial number for NVMe controllers bhyve: forbid "," in disk serial numbers src/bhyve/bhyve_command.c | 5 ++++ src/bhyve/bhyve_domain.c | 15 ++++++++++ ...hyvexml2argv-nvme-explicit-controller.args | 9 ++++++ ...vexml2argv-nvme-explicit-controller.ldargs | 4 +++ ...bhyvexml2argv-nvme-explicit-controller.xml | 20 +++++++++++++ .../bhyvexml2argv-nvme-invalid-serial.xml | 20 +++++++++++++ ...bhyvexml2argv-sata-disk-invalid-serial.xml | 23 +++++++++++++++ .../bhyvexml2argv-sata-rotation-rate.args | 2 +- .../bhyvexml2argv-sata-rotation-rate.xml | 3 ++ tests/bhyvexml2argvtest.c | 3 ++ ...yvexml2xmlout-nvme-explicit-controller.xml | 28 +++++++++++++++++++ tests/bhyvexml2xmltest.c | 3 ++ 12 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.args create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.ldargs create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.xml create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-invalid-serial.xml create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-disk-invalid-serial.xml create mode 100644 tests/bhyvexml2xmloutdata/x86_64/bhyvexml2xmlout-nvme-explicit-controller.xml -- 2.52.0
bhyve supports passing disk serial number using the "ser=<SN>" option, so update bhyveBuildAHCIControllerArgStr() to set it from the "serial" element. Closes: https://gitlab.com/libvirt/libvirt/-/work_items/901 Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_command.c | 3 +++ .../x86_64/bhyvexml2argv-sata-rotation-rate.args | 2 +- .../x86_64/bhyvexml2argv-sata-rotation-rate.xml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index a4f9c8823b..f0c3cf03c5 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -333,6 +333,9 @@ bhyveBuildAHCIControllerArgStr(const virDomainDef *def, if (disk->rotation_rate) virBufferAsprintf(&device, ",nmrr=%u", disk->rotation_rate); + if (disk->serial) + virBufferAsprintf(&device, ",ser=%s", disk->serial); + virBufferAddBuffer(&buf, &device); } diff --git a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-rotation-rate.args b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-rotation-rate.args index 2cf40953e8..3ae510e2ed 100644 --- a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-rotation-rate.args +++ b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-rotation-rate.args @@ -5,6 +5,6 @@ bhyve \ -H \ -P \ -s 0:0,hostbridge \ --s 2:0,ahci,hd:/tmp/freebsd1.img,nmrr=7200,hd:/tmp/freebsd2.img,nmrr=5400,hd:/tmp/freebsd3.img,nmrr=1 \ +-s 2:0,ahci,hd:/tmp/freebsd1.img,nmrr=7200,ser=BHYVE-SER01-0001,hd:/tmp/freebsd2.img,nmrr=5400,ser=BHYVE-SER02-0004,hd:/tmp/freebsd3.img,nmrr=1,ser=BHYVE-SER03-1234 \ -s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \ bhyve diff --git a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-rotation-rate.xml b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-rotation-rate.xml index a0d80cb908..ed6da8e317 100644 --- a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-rotation-rate.xml +++ b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-rotation-rate.xml @@ -8,16 +8,19 @@ </os> <devices> <disk type='file'> + <serial>BHYVE-SER01-0001</serial> <driver name='file' type='raw'/> <source file='/tmp/freebsd1.img'/> <target dev='hda' bus='sata' rotation_rate='7200'/> </disk> <disk type='file'> + <serial>BHYVE-SER02-0004</serial> <driver name='file' type='raw'/> <source file='/tmp/freebsd2.img'/> <target dev='hdb' bus='sata' rotation_rate='5400'/> </disk> <disk type='file'> + <serial>BHYVE-SER03-1234</serial> <driver name='file' type='raw'/> <source file='/tmp/freebsd3.img'/> <target dev='hdc' bus='sata' rotation_rate='1'/> -- 2.52.0
On Fri, Jul 31, 2026 at 19:52:03 +0200, Roman Bogorodskiy wrote:
bhyve supports passing disk serial number using the "ser=<SN>" option, so update bhyveBuildAHCIControllerArgStr() to set it from the "serial" element.
Closes: https://gitlab.com/libvirt/libvirt/-/work_items/901 Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_command.c | 3 +++ .../x86_64/bhyvexml2argv-sata-rotation-rate.args | 2 +- .../x86_64/bhyvexml2argv-sata-rotation-rate.xml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index a4f9c8823b..f0c3cf03c5 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -333,6 +333,9 @@ bhyveBuildAHCIControllerArgStr(const virDomainDef *def, if (disk->rotation_rate) virBufferAsprintf(&device, ",nmrr=%u", disk->rotation_rate);
+ if (disk->serial) + virBufferAsprintf(&device, ",ser=%s", disk->serial);
Note that libvirt doesn't enforce any length limits for 'serial' value. In qemu it gets silently truncated to the size that qemu supports (which may or may not conform to the "physical"/protocol specification limits. We had trouble with that in the past when qemu changed the truncation. How does bhyve behave here?
Peter Krempa wrote:
On Fri, Jul 31, 2026 at 19:52:03 +0200, Roman Bogorodskiy wrote:
bhyve supports passing disk serial number using the "ser=<SN>" option, so update bhyveBuildAHCIControllerArgStr() to set it from the "serial" element.
Closes: https://gitlab.com/libvirt/libvirt/-/work_items/901 Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_command.c | 3 +++ .../x86_64/bhyvexml2argv-sata-rotation-rate.args | 2 +- .../x86_64/bhyvexml2argv-sata-rotation-rate.xml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index a4f9c8823b..f0c3cf03c5 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -333,6 +333,9 @@ bhyveBuildAHCIControllerArgStr(const virDomainDef *def, if (disk->rotation_rate) virBufferAsprintf(&device, ",nmrr=%u", disk->rotation_rate);
+ if (disk->serial) + virBufferAsprintf(&device, ",ser=%s", disk->serial);
Note that libvirt doesn't enforce any length limits for 'serial' value.
In qemu it gets silently truncated to the size that qemu supports (which may or may not conform to the "physical"/protocol specification limits.
We had trouble with that in the past when qemu changed the truncation.
How does bhyve behave here?
Bhyve mentions 20 character limits for both AHCI and NVMe. It also silently truncates the user provided value to this 20 char limit. It does not _seem_ that this limit is going to change for AHCI and NVMe.
bhyve supports setting NVMe controller serial number using the "ser=<SN>" option. Update bhyveBuildNVMeControllerArgStr() to set that if "serial" is specified for the controller. We do it in the controller's disks loop, but as we prohibit more than 1 disk per controller in bhyveDomainDefValidate(), there is no repetition here. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_command.c | 2 ++ ...hyvexml2argv-nvme-explicit-controller.args | 9 ++++++ ...vexml2argv-nvme-explicit-controller.ldargs | 4 +++ ...bhyvexml2argv-nvme-explicit-controller.xml | 20 +++++++++++++ tests/bhyvexml2argvtest.c | 1 + ...yvexml2xmlout-nvme-explicit-controller.xml | 28 +++++++++++++++++++ tests/bhyvexml2xmltest.c | 1 + 7 files changed, 65 insertions(+) create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.args create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.ldargs create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.xml create mode 100644 tests/bhyvexml2xmloutdata/x86_64/bhyvexml2xmlout-nvme-explicit-controller.xml diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index f0c3cf03c5..956fcab06c 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -479,6 +479,8 @@ bhyveBuildNVMeControllerArgStr(const virDomainDef *def, virBufferAsprintf(&opt, ",maxq=%d", disk->queues); if (disk->queue_size) virBufferAsprintf(&opt, ",qsz=%d", disk->queue_size); + if (controller->opts.nvmeopts.serial) + virBufferAsprintf(&opt, ",ser=%s", controller->opts.nvmeopts.serial); nvme_opts = virBufferContentAndReset(&opt); diff --git a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.args b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.args new file mode 100644 index 0000000000..74dd4baa37 --- /dev/null +++ b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.args @@ -0,0 +1,9 @@ +bhyve \ +-c 1 \ +-m 214 \ +-u \ +-H \ +-P \ +-s 0:0,hostbridge \ +-s 2:0,nvme,/tmp/freebsd.img,maxq=2,qsz=256,ser=BHYVE-NVME0-01234 \ +bhyve diff --git a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.ldargs b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.ldargs new file mode 100644 index 0000000000..5905f4b3e6 --- /dev/null +++ b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.ldargs @@ -0,0 +1,4 @@ +bhyveload \ +-m 214 \ +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.xml b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.xml new file mode 100644 index 0000000000..9781d3aaef --- /dev/null +++ b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-explicit-controller.xml @@ -0,0 +1,20 @@ +<domain type='bhyve'> + <name>bhyve</name> + <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid> + <memory>219136</memory> + <vcpu>1</vcpu> + <os> + <type>hvm</type> + </os> + <devices> + <controller type='nvme' index='0'> + <serial>BHYVE-NVME0-01234</serial> + </controller> + <disk type='file'> + <driver name='file' type='raw' queues='2' queue_size='256'/> + <source file='/tmp/freebsd.img'/> + <target dev='nvme0n1' bus='nvme'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + </devices> +</domain> diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 71322d1330..436eecb003 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -280,6 +280,7 @@ mymain(void) DO_TEST_FAILURE("serial-invalid-port"); DO_TEST("nvme"); DO_TEST("2-nvme-2-controllers"); + DO_TEST("nvme-explicit-controller"); DO_TEST_FAILURE("2-nvme-same-controller"); DO_TEST("sata-rotation-rate"); DO_TEST_FAILURE("disk-virtio-rotation-rate"); diff --git a/tests/bhyvexml2xmloutdata/x86_64/bhyvexml2xmlout-nvme-explicit-controller.xml b/tests/bhyvexml2xmloutdata/x86_64/bhyvexml2xmlout-nvme-explicit-controller.xml new file mode 100644 index 0000000000..f646267ec5 --- /dev/null +++ b/tests/bhyvexml2xmloutdata/x86_64/bhyvexml2xmlout-nvme-explicit-controller.xml @@ -0,0 +1,28 @@ +<domain type='bhyve'> + <name>bhyve</name> + <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <disk type='file' device='disk'> + <driver name='file' type='raw' queues='2' queue_size='256'/> + <source file='/tmp/freebsd.img'/> + <target dev='nvme0n1' bus='nvme'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <controller type='nvme' index='0'> + <serial>BHYVE-NVME0-01234</serial> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + </devices> +</domain> diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index 120bdd42e5..51ce2adb33 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -129,6 +129,7 @@ mymain(void) DO_TEST_DIFFERENT("4-consoles"); DO_TEST_DIFFERENT("nvme"); DO_TEST_DIFFERENT("2-nvme-2-controllers"); + DO_TEST_DIFFERENT("nvme-explicit-controller"); DO_TEST_DIFFERENT("passthru-multiple-devs"); DO_TEST_DIFFERENT("slirp"); DO_TEST_DIFFERENT("virtio-scsi"); -- 2.52.0
As bhyve options are passed as a comma separated list, e.g.: -s N:0,ahci,hd:/tmp/my.img,nmrr=7200,ser=BHYVE-SER01-0001 Do not allow using "," in the serial name. This applies to both NVMe and SATA disks. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_domain.c | 15 ++++++++++++ .../bhyvexml2argv-nvme-invalid-serial.xml | 20 ++++++++++++++++ ...bhyvexml2argv-sata-disk-invalid-serial.xml | 23 +++++++++++++++++++ tests/bhyvexml2argvtest.c | 2 ++ tests/bhyvexml2xmltest.c | 2 ++ 5 files changed, 62 insertions(+) create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-invalid-serial.xml create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-disk-invalid-serial.xml diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index b6344185b7..1c588d9243 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -338,6 +338,13 @@ bhyveDomainDeviceDefValidate(const virDomainDeviceDef *dev, _("Bhyve virtio-serial controller supports up to 16 ports")); return -1; } + } else if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_NVME && + controller->opts.nvmeopts.serial) { + if (strchr(controller->opts.nvmeopts.serial, ',')) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Serial number may not contain ',' character")); + return -1; + } } break; } @@ -423,6 +430,14 @@ bhyveDomainDeviceDefValidate(const virDomainDeviceDef *dev, return -1; } + if (disk->bus == VIR_DOMAIN_DISK_BUS_SATA && disk->serial) { + if (strchr(disk->serial, ',')) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Serial number may not contain ',' character")); + return -1; + } + } + break; } case VIR_DOMAIN_DEVICE_NET: { diff --git a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-invalid-serial.xml b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-invalid-serial.xml new file mode 100644 index 0000000000..b9da5352ea --- /dev/null +++ b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-invalid-serial.xml @@ -0,0 +1,20 @@ +<domain type='bhyve'> + <name>bhyve</name> + <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid> + <memory>219136</memory> + <vcpu>1</vcpu> + <os> + <type>hvm</type> + </os> + <devices> + <controller type='nvme' index='0'> + <serial>BHYVE-NVME0,01234</serial> + </controller> + <disk type='file'> + <driver name='file' type='raw' queues='2' queue_size='256'/> + <source file='/tmp/freebsd.img'/> + <target dev='nvme0n1' bus='nvme'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + </devices> +</domain> diff --git a/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-disk-invalid-serial.xml b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-disk-invalid-serial.xml new file mode 100644 index 0000000000..b5d7da8c1e --- /dev/null +++ b/tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-disk-invalid-serial.xml @@ -0,0 +1,23 @@ +<domain type='bhyve'> + <name>bhyve</name> + <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <disk type='file' device='disk'> + <serial>A,B,C</serial> + <driver name='file' type='raw'/> + <source file='/tmp/freebsd.img'/> + <target dev='hda' bus='sata'/> + </disk> + </devices> +</domain> diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 436eecb003..95969a641b 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -282,7 +282,9 @@ mymain(void) DO_TEST("2-nvme-2-controllers"); DO_TEST("nvme-explicit-controller"); DO_TEST_FAILURE("2-nvme-same-controller"); + DO_TEST_FAILURE("nvme-invalid-serial"); DO_TEST("sata-rotation-rate"); + DO_TEST_FAILURE("sata-disk-invalid-serial"); DO_TEST_FAILURE("disk-virtio-rotation-rate"); DO_TEST_FAILURE("disk-virtio-queue-opts"); DO_TEST("slirp"); diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index 51ce2adb33..3c90673f5e 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -130,6 +130,7 @@ mymain(void) DO_TEST_DIFFERENT("nvme"); DO_TEST_DIFFERENT("2-nvme-2-controllers"); DO_TEST_DIFFERENT("nvme-explicit-controller"); + DO_TEST_FAILURE("nvme-invalid-serial"); DO_TEST_DIFFERENT("passthru-multiple-devs"); DO_TEST_DIFFERENT("slirp"); DO_TEST_DIFFERENT("virtio-scsi"); @@ -146,6 +147,7 @@ mymain(void) DO_TEST_FAILURE("virtio-console-too-many-ports"); DO_TEST_FAILURE("virtio-console-invalid-name"); DO_TEST_FAILURE("virtio-console-invalid-path"); + DO_TEST_FAILURE("sata-disk-invalid-serial"); /* Address allocation tests */ DO_TEST_DIFFERENT("addr-single-sata-disk"); -- 2.52.0
On Fri, Jul 31, 2026 at 19:52:05 +0200, Roman Bogorodskiy wrote:
As bhyve options are passed as a comma separated list, e.g.:
-s N:0,ahci,hd:/tmp/my.img,nmrr=7200,ser=BHYVE-SER01-0001
Do not allow using "," in the serial name. This applies to both NVMe and SATA disks.
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_domain.c | 15 ++++++++++++ .../bhyvexml2argv-nvme-invalid-serial.xml | 20 ++++++++++++++++ ...bhyvexml2argv-sata-disk-invalid-serial.xml | 23 +++++++++++++++++++ tests/bhyvexml2argvtest.c | 2 ++ tests/bhyvexml2xmltest.c | 2 ++ 5 files changed, 62 insertions(+) create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-nvme-invalid-serial.xml create mode 100644 tests/bhyvexml2argvdata/x86_64/bhyvexml2argv-sata-disk-invalid-serial.xml
This patch should go first before you do the actual impl.
diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index b6344185b7..1c588d9243 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -338,6 +338,13 @@ bhyveDomainDeviceDefValidate(const virDomainDeviceDef *dev, _("Bhyve virtio-serial controller supports up to 16 ports")); return -1; } + } else if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_NVME && + controller->opts.nvmeopts.serial) { + if (strchr(controller->opts.nvmeopts.serial, ',')) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Serial number may not contain ',' character")); + return -1; + } } break; } @@ -423,6 +430,14 @@ bhyveDomainDeviceDefValidate(const virDomainDeviceDef *dev, return -1; }
+ if (disk->bus == VIR_DOMAIN_DISK_BUS_SATA && disk->serial) { + if (strchr(disk->serial, ',')) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Serial number may not contain ',' character")); + return -1; + } + } + break; } case VIR_DOMAIN_DEVICE_NET: {
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
participants (2)
-
Peter Krempa -
Roman Bogorodskiy