[PATCH] virsh: Allow listing just domain IDs
by Michal Privoznik
Some completers for libvirt related tools might want to list
domain IDs only. Just like the one I've implemented for
virt-viewer [1]. I've worked around it using some awk magic,
but if it was possible to just 'virsh list --id' then I could
drop awk.
1: https://www.redhat.com/archives/virt-tools-list/2019-May/msg00014.html
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
I just realized that I've never sent this and it was sitting in a
branch for 1.5 years. <facepalm/>
tools/virsh-domain-monitor.c | 41 ++++++++++++++++++++++++------------
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index e0491d48ac..9e66d573e6 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1919,6 +1919,10 @@ static const vshCmdOptDef opts_list[] = {
.type = VSH_OT_BOOL,
.help = N_("list domain names only")
},
+ {.name = "id",
+ .type = VSH_OT_BOOL,
+ .help = N_("list domain IDs only")
+ },
{.name = "table",
.type = VSH_OT_BOOL,
.help = N_("list table (default)")
@@ -1945,6 +1949,7 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
bool optTable = vshCommandOptBool(cmd, "table");
bool optUUID = vshCommandOptBool(cmd, "uuid");
bool optName = vshCommandOptBool(cmd, "name");
+ bool optID = vshCommandOptBool(cmd, "id");
size_t i;
char *title;
char uuid[VIR_UUID_STRING_BUFLEN];
@@ -1988,8 +1993,12 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
VSH_EXCLUSIVE_OPTIONS("table", "name");
VSH_EXCLUSIVE_OPTIONS("table", "uuid");
+ VSH_EXCLUSIVE_OPTIONS("table", "id");
+ VSH_EXCLUSIVE_OPTIONS("all", "id");
+ VSH_EXCLUSIVE_OPTIONS("inactive", "id");
+ VSH_EXCLUSIVE_OPTIONS("state-shutoff", "id");
- if (!optUUID && !optName)
+ if (!optUUID && !optName && !optID)
optTable = true;
if (!(list = virshDomainListCollect(ctl, flags)))
@@ -2007,6 +2016,8 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
}
for (i = 0; i < list->ndomains; i++) {
+ const char *sep = "";
+
dom = list->domains[i];
id = virDomainGetID(dom);
if (id != (unsigned int) -1)
@@ -2044,20 +2055,24 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
goto cleanup;
}
- } else if (optUUID && optName) {
- if (virDomainGetUUIDString(dom, uuid) < 0) {
- vshError(ctl, "%s", _("Failed to get domain's UUID"));
- goto cleanup;
+ } else {
+ if (optUUID) {
+ if (virDomainGetUUIDString(dom, uuid) < 0) {
+ vshError(ctl, "%s", _("Failed to get domain's UUID"));
+ goto cleanup;
+ }
+ vshPrint(ctl, "%s", uuid);
+ sep = " ";
}
- vshPrint(ctl, "%-36s %-30s\n", uuid, virDomainGetName(dom));
- } else if (optUUID) {
- if (virDomainGetUUIDString(dom, uuid) < 0) {
- vshError(ctl, "%s", _("Failed to get domain's UUID"));
- goto cleanup;
+ if (optID) {
+ vshPrint(ctl, "%s%s", sep, id_buf);
+ sep = " ";
}
- vshPrint(ctl, "%s\n", uuid);
- } else if (optName) {
- vshPrint(ctl, "%s\n", virDomainGetName(dom));
+ if (optName) {
+ vshPrint(ctl, "%s%s", sep, virDomainGetName(dom));
+ sep = " ";
+ }
+ vshPrint(ctl, "\n");
}
}
--
2.26.2
4 years, 2 months
[PATCH 0/4] hyperv: Cleanup code create embedded properties
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (4):
hyperv: Accept const @value in hypervSetEmbeddedProperty()
hyperv: Use g_auto() for virHashTable in hypervCreateEmbeddedParam
hyperv: Drop needles error label in hypervCreateEmbeddedParam()
hyverv: hypervCreateEmbeddedParam: Rework items counting
src/hyperv/hyperv_wmi.c | 43 ++++++++++++++++++++++++++---------------
src/hyperv/hyperv_wmi.h | 5 +++--
2 files changed, 30 insertions(+), 18 deletions(-)
--
2.26.2
4 years, 2 months
[libvirt PATCH] docs: Mention GPG key used for signing releases
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Notes:
Should we also make the key available for download?
docs/downloads.html.in | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/docs/downloads.html.in b/docs/downloads.html.in
index 43366b3694..aa0bb23d45 100644
--- a/docs/downloads.html.in
+++ b/docs/downloads.html.in
@@ -493,6 +493,20 @@
<li><a href="https://libvirt.org/sources/">libvirt.org HTTPS server</a></li>
</ul>
+ <h2><a id="keys">Signing keys</a></h2>
+
+ <p>
+ Source RPM packages and tarballs for libvirt and libvirt-python published
+ on this project site are signed with a GPG signature. You should always
+ verify the package signature before using the source to compile binary
+ packages. The following key is currently used to generate the GPG
+ signatures:
+ </p>
+ <pre>
+pub 4096R/10084C9C 2020-07-20 Jiří Denemark <jdenemar(a)redhat.com>
+Fingerprint=453B 6531 0595 5628 5547 1199 CA68 BE80 1008 4C9C
+</pre>
+
<h2><a id="schedule">Primary release schedule</a></h2>
<p>
--
2.28.0
4 years, 2 months
[libvirt PATCH 0/8] build: lower maximum frame size to 1792
by Ján Tomko
Ján Tomko (8):
libxl: libxlDomainStart: use g_autoptr for virDomainDef
libxl: libxlDomainStart: autofree managed_save_path
libxl: libxlDomainStart: use g_auto more
libxl: allocate d_config
esx: esxConnectOpen: use allocated buffer
lxc: virLXCProcessStart: use allocated buffers
remote: allocate virDomainDef for ACL check
build: lower maximum frame size to 1792
meson.build | 7 +++--
src/esx/esx_driver.c | 7 ++---
src/libxl/libxl_domain.c | 40 +++++++++++++----------------
src/lxc/lxc_process.c | 19 ++++++++------
src/remote/remote_daemon_dispatch.c | 19 +++++++-------
5 files changed, 46 insertions(+), 46 deletions(-)
--
2.26.2
4 years, 2 months
[PATCH v2 00/18] virschematest: Improve XML validation
by Peter Krempa
Quite a few XMLs in examples/tests are not validated, many of them
actually invalid. Improve schema validation.
v2:
- pushed ACK'd patches
- rebased
- added patch for schema validation of tests/cputestdata
Peter Krempa (18):
virschematest: Rewrite internals to allow increasing XML test coverage
virschematest: Add regex filtering for directory contents
examples: xml: Fix 'pool-netfs.xml' example
examples: xml: Fix 'vol-raw.xml' and 'vol-sparse.xml'
virschematest: Add coverage for 'examples/xml/storage'
virschematest: Add coverage for 'examples/xml/test'
virschematest: Fix testing of 'nwfilter' xmls
domainconfdata/getfilesystem.xml: Remove <init> element
schema: nwfilter: Allow all accepted values for 'ipsetflags'
schema: nwfiter: Allow leading/trailing whitespace in
'variable-name-type'
nwfilterxml2firewall: Fix schema compilance of 'tcp' test case
nwfilterxml2xmltest: Rename cases with XMLs not conforming to schema
schema: domain: Add definition for the 'vmware' private namespace
schema: domain: Allow space in XML schema for bridge source
tests: vmx: Add <name> element for all domain XMLs
virschematest: Add directories containing domain XMLs
virschematest: Validate more XMLs
virschematest: Validate schema in tests/cputestdata
docs/schemas/domaincommon.rng | 17 +-
docs/schemas/nwfilter.rng | 4 +-
examples/xml/storage/pool-netfs.xml | 2 +-
examples/xml/storage/vol-raw.xml | 3 +
examples/xml/storage/vol-sparse.xml | 3 +
tests/domainconfdata/getfilesystem.xml | 1 -
tests/nwfilterxml2firewalldata/tcp.xml | 2 +-
...ipv6-test.xml => ah-ipv6-test-invalid.xml} | 0
...pv6-test.xml => all-ipv6-test-invalid.xml} | 0
.../{arp-test.xml => arp-test-invalid.xml} | 0
...est1.xml => chain_prefixtest1-invalid.xml} | 0
...ment-test.xml => comment-test-invalid.xml} | 0
...pv6-test.xml => esp-ipv6-test-invalid.xml} | 0
...ata-test.xml => hex-data-test-invalid.xml} | 0
.../{icmp-test.xml => icmp-test-invalid.xml} | 0
...cmpv6-test.xml => icmpv6-test-invalid.xml} | 0
.../{ip-test.xml => ip-test-invalid.xml} | 0
.../{ipv6-test.xml => ipv6-test-invalid.xml} | 0
.../{mac-test.xml => mac-test-invalid.xml} | 0
.../{rarp-test.xml => rarp-test-invalid.xml} | 0
...v6-test.xml => sctp-ipv6-test-invalid.xml} | 0
.../{sctp-test.xml => sctp-test-invalid.xml} | 0
...pv6-test.xml => tcp-ipv6-test-invalid.xml} | 0
.../{tcp-test.xml => tcp-test-invalid.xml} | 0
...pv6-test.xml => udp-ipv6-test-invalid.xml} | 0
.../{udp-test.xml => udp-test-invalid.xml} | 0
...test.xml => udplite-ipv6-test-invalid.xml} | 0
.../{vlan-test.xml => vlan-test-invalid.xml} | 0
tests/nwfilterxml2xmltest.c | 44 +--
tests/virschematest.c | 371 ++++++++++++------
tests/vmx2xmldata/vmx2xml-annotation.vmx | 1 +
tests/vmx2xmldata/vmx2xml-annotation.xml | 1 +
.../vmx2xml-case-insensitive-1.vmx | 1 +
.../vmx2xml-case-insensitive-2.vmx | 1 +
.../vmx2xmldata/vmx2xml-cdrom-ide-device.vmx | 1 +
.../vmx2xmldata/vmx2xml-cdrom-ide-device.xml | 1 +
.../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx | 1 +
.../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml | 1 +
tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.vmx | 1 +
tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml | 1 +
tests/vmx2xmldata/vmx2xml-cdrom-ide-file.vmx | 1 +
tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 1 +
.../vmx2xml-cdrom-ide-raw-auto-detect.vmx | 1 +
.../vmx2xml-cdrom-ide-raw-auto-detect.xml | 1 +
.../vmx2xml-cdrom-ide-raw-device.vmx | 1 +
.../vmx2xml-cdrom-ide-raw-device.xml | 1 +
.../vmx2xmldata/vmx2xml-cdrom-scsi-device.vmx | 1 +
.../vmx2xmldata/vmx2xml-cdrom-scsi-device.xml | 1 +
.../vmx2xmldata/vmx2xml-cdrom-scsi-empty.vmx | 1 +
.../vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml | 1 +
tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.vmx | 1 +
tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 1 +
.../vmx2xml-cdrom-scsi-passthru.vmx | 1 +
.../vmx2xml-cdrom-scsi-passthru.xml | 1 +
.../vmx2xml-cdrom-scsi-raw-auto-detect.vmx | 1 +
.../vmx2xml-cdrom-scsi-raw-auto-detect.xml | 1 +
.../vmx2xml-cdrom-scsi-raw-device.vmx | 1 +
.../vmx2xml-cdrom-scsi-raw-device.xml | 1 +
tests/vmx2xmldata/vmx2xml-datacenterpath.vmx | 1 +
tests/vmx2xmldata/vmx2xml-datacenterpath.xml | 1 +
.../vmx2xmldata/vmx2xml-ethernet-bridged.vmx | 1 +
.../vmx2xmldata/vmx2xml-ethernet-bridged.xml | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-custom.vmx | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-custom.xml | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-e1000.vmx | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-e1000.xml | 1 +
.../vmx2xml-ethernet-generated.vmx | 1 +
.../vmx2xml-ethernet-generated.xml | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-nat.vmx | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-nat.xml | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-other.vmx | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-other.xml | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-static.vmx | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-static.xml | 1 +
.../vmx2xmldata/vmx2xml-ethernet-vmxnet2.vmx | 1 +
.../vmx2xmldata/vmx2xml-ethernet-vmxnet2.xml | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-vpx.vmx | 1 +
tests/vmx2xmldata/vmx2xml-ethernet-vpx.xml | 1 +
tests/vmx2xmldata/vmx2xml-firmware-efi.vmx | 1 +
tests/vmx2xmldata/vmx2xml-firmware-efi.xml | 1 +
tests/vmx2xmldata/vmx2xml-floppy-device.vmx | 1 +
tests/vmx2xmldata/vmx2xml-floppy-device.xml | 1 +
tests/vmx2xmldata/vmx2xml-floppy-file.vmx | 1 +
tests/vmx2xmldata/vmx2xml-floppy-file.xml | 1 +
tests/vmx2xmldata/vmx2xml-graphics-vnc.vmx | 1 +
tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 1 +
.../vmx2xmldata/vmx2xml-harddisk-ide-file.vmx | 1 +
.../vmx2xmldata/vmx2xml-harddisk-ide-file.xml | 1 +
.../vmx2xml-harddisk-scsi-file.vmx | 1 +
.../vmx2xml-harddisk-scsi-file.xml | 1 +
.../vmx2xml-harddisk-transient.vmx | 1 +
.../vmx2xml-harddisk-transient.xml | 1 +
tests/vmx2xmldata/vmx2xml-minimal-64bit.vmx | 1 +
tests/vmx2xmldata/vmx2xml-minimal-64bit.xml | 1 +
tests/vmx2xmldata/vmx2xml-minimal.vmx | 1 +
tests/vmx2xmldata/vmx2xml-minimal.xml | 1 +
tests/vmx2xmldata/vmx2xml-parallel-device.vmx | 1 +
tests/vmx2xmldata/vmx2xml-parallel-device.xml | 1 +
tests/vmx2xmldata/vmx2xml-parallel-file.vmx | 1 +
tests/vmx2xmldata/vmx2xml-parallel-file.xml | 1 +
tests/vmx2xmldata/vmx2xml-scsi-driver.vmx | 1 +
tests/vmx2xmldata/vmx2xml-scsi-driver.xml | 1 +
.../vmx2xmldata/vmx2xml-scsi-writethrough.vmx | 1 +
.../vmx2xmldata/vmx2xml-scsi-writethrough.xml | 1 +
tests/vmx2xmldata/vmx2xml-serial-device.vmx | 1 +
tests/vmx2xmldata/vmx2xml-serial-device.xml | 1 +
tests/vmx2xmldata/vmx2xml-serial-file.vmx | 1 +
tests/vmx2xmldata/vmx2xml-serial-file.xml | 1 +
.../vmx2xml-serial-network-client.vmx | 1 +
.../vmx2xml-serial-network-client.xml | 1 +
.../vmx2xml-serial-network-server.vmx | 1 +
.../vmx2xml-serial-network-server.xml | 1 +
.../vmx2xml-serial-pipe-client-app.vmx | 1 +
.../vmx2xml-serial-pipe-client-vm.vmx | 1 +
.../vmx2xml-serial-pipe-server-app.vmx | 1 +
.../vmx2xml-serial-pipe-server-vm.vmx | 1 +
tests/vmx2xmldata/vmx2xml-serial-pipe.xml | 1 +
tests/vmx2xmldata/vmx2xml-sharedfolder.vmx | 1 +
tests/vmx2xmldata/vmx2xml-sharedfolder.xml | 1 +
tests/vmx2xmldata/vmx2xml-smbios.vmx | 1 +
tests/vmx2xmldata/vmx2xml-smbios.xml | 1 +
tests/vmx2xmldata/vmx2xml-svga.vmx | 1 +
tests/vmx2xmldata/vmx2xml-svga.xml | 1 +
123 files changed, 393 insertions(+), 147 deletions(-)
rename tests/nwfilterxml2xmlin/{ah-ipv6-test.xml => ah-ipv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{all-ipv6-test.xml => all-ipv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{arp-test.xml => arp-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{chain_prefixtest1.xml => chain_prefixtest1-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{comment-test.xml => comment-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{esp-ipv6-test.xml => esp-ipv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{hex-data-test.xml => hex-data-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{icmp-test.xml => icmp-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{icmpv6-test.xml => icmpv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{ip-test.xml => ip-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{ipv6-test.xml => ipv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{mac-test.xml => mac-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{rarp-test.xml => rarp-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{sctp-ipv6-test.xml => sctp-ipv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{sctp-test.xml => sctp-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{tcp-ipv6-test.xml => tcp-ipv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{tcp-test.xml => tcp-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{udp-ipv6-test.xml => udp-ipv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{udp-test.xml => udp-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{udplite-ipv6-test.xml => udplite-ipv6-test-invalid.xml} (100%)
rename tests/nwfilterxml2xmlin/{vlan-test.xml => vlan-test-invalid.xml} (100%)
--
2.26.2
4 years, 2 months
[PATCH] spec: Fix numad check
by Boris Fiuczynski
Fixes commit 974dc0a4c678af8ccb9224abecc834bb593e81fa
which caused
DEBUG: meson.build:2149:2: ERROR: Problem encountered: You must have numactl enabled for numad support.
on s390x.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay(a)linux.ibm.com>
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 2bd4784d0f..325566f329 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -182,7 +182,7 @@
%if %{with_qemu} || %{with_lxc}
# numad is used to manage the CPU and memory placement dynamically,
# it's not available on many non-x86 architectures.
- %ifnarch %{arches_numad}
+ %ifarch %{arches_numad}
%define with_numad 0%{!?_without_numad:1}
%endif
%endif
--
2.25.1
4 years, 2 months
Plans for the next release
by Jiri Denemark
We are getting close to the next release of libvirt. To aim for the
release on Nov 02 I suggest entering the freeze on Monday Oct 26 and
tagging RC2 on Thursday Oct 29.
I hope this works for everyone.
Jirka
4 years, 2 months
[PATCH v2 0/7] more Hyper-V APIs
by Matt Coleman
This set of patches adds several new APIs and fixes several others.
Changes since v1:
* 'enabledValue' and 'disabledValue' are now static strings in
hypervDomainSetAutostart()
* a long virReportError() call has been split into two lines
Matt Coleman (7):
hyperv: implement domainSetAutostart
hyperv: implement nodeGetFreeMemory
hyperv: implement domainReboot and domainReset
hyperv: implement domainShutdown and domainShutdownFlags
hyperv: fix domainSuspend and domainResume on Hyper-V V2
hyperv: fix domainManagedSave on Hyper-V V2
news: more Hyper-V APIs
NEWS.rst | 7 +-
src/hyperv/hyperv_driver.c | 267 +++++++++++++++++++++++++-
src/hyperv/hyperv_wmi_classes.h | 3 +
src/hyperv/hyperv_wmi_generator.input | 78 ++++++++
4 files changed, 347 insertions(+), 8 deletions(-)
--
2.27.0
4 years, 2 months
[PATCH 0/5] hyperv: Make ownershipt transfer obvious
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (5):
hyperv: Make it obvious that hypervInvokeMethod() consumes an argument
hyperv: Reindent hypervInvokeMethod() body
hyperv: Drop needless label in hypervDomainSetMemoryFlags()
hyperv: Make it obvious that hypervAddEmbeddedParam() consumes an
argument
hyperv: Simplify @memResource freeing in hypervDomainSetMemoryFlags()
src/hyperv/hyperv_driver.c | 34 ++++------
src/hyperv/hyperv_wmi.c | 129 +++++++++++++++++++++----------------
src/hyperv/hyperv_wmi.h | 12 ++--
3 files changed, 94 insertions(+), 81 deletions(-)
--
2.26.2
4 years, 2 months
Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev
by daggs
Greetings All,
> Sent: Thursday, October 15, 2020 at 6:25 PM
> From: "Peter Krempa" <pkrempa(a)redhat.com>
> To: libvir-list(a)redhat.com
> Cc: "daggs" <daggs(a)gmx.com>
> Subject: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev
>
> -drive detects whether a device is a cdrom automatically but we need to
> use 'host_cdrom' when using blockdev explicitly. Fix the hostdev code
> which was recently converted to -blockdev.
>
> Warning:
>
> I _don't_ have a box with a CDROM handy so this code is not tested in action!
>
> Peter Krempa (6):
> qemuProcessCreatePretendCmd: Split up preparation and command building
> qemu: hostdev: Prepare definition bits in qemuDomainPrepareHostdev
> qemu: Prepare hostdev data which depends on the host state separately
> qemuxml2argvmock: Remove mocking of 'virSCSIDeviceGetSgName'
> qemu: Detect whether a SCSI hostdev is a cdrom
> qemu: Add test cases for 'host_cdrom' blockdev backend via <disk>
I've tested the bellow on libvirt 6.8.0, I wasn't able to get it to work, with the same entry as the example, e.g.:
<hostdev mode='subsystem' type='scsi' managed='yes'>
<source>
<adapter name='cdrom'/>
<address bus='0' target='0' unit='0'/>
</source>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</hostdev>
I get this error:
error: XML error: SCSI host device doesn't support managed mode.
if I mark the managed as no (like other pci pass-through devices I have in the vm), I get this error:
error: internal error: Cannot parse adapter 'cdrom'
looks like the commit is missing the cdrom validation at https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virscsi.c#L90
full machine xml can be found at https://dpaste.com/G32WWAJA2
Dagg.
4 years, 2 months