[libvirt] [PATCH v3 0/3] Add iSCSI hostdev pass-through device
by John Ferlan
Patches 1 & 2 are related to:
Update to http://www.redhat.com/archives/libvir-list/2014-July/msg01098.html
Patch 1/3 is already ACK'd, but felt it was easier to push together.
Patch 2/3 change since last:
- Fix typos as called in review of 8/8
- Adjust the rng file to
- Change the order of things to be <source>, then <auth> to
follow how <disk> (and storage pools) do things. That resulted
in code motion in domain_conf.c and adjustment to the *-iscsi-auth.xml
files
Patch 3 is related to
http://www.redhat.com/archives/libvir-list/2014-July/msg01268.html
John Ferlan (3):
domain_conf: Common routine to handle network storage host xml def
hostdev: Add iSCSI hostdev XML
qemu: Remove extraneous space in function prototypes
docs/formatdomain.html.in | 144 ++++++----
docs/schemas/domaincommon.rng | 48 +++-
src/conf/domain_conf.c | 289 +++++++++++++++------
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.h | 136 +++++-----
src/qemu/qemu_conf.h | 2 +-
.../qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args | 14 +
.../qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml | 46 ++++
.../qemuxml2argv-hostdev-scsi-lsi-iscsi.args | 14 +
.../qemuxml2argv-hostdev-scsi-lsi-iscsi.xml | 40 +++
...emuxml2argv-hostdev-scsi-virtio-iscsi-auth.args | 16 ++
...qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml | 46 ++++
.../qemuxml2argv-hostdev-scsi-virtio-iscsi.args | 16 ++
.../qemuxml2argv-hostdev-scsi-virtio-iscsi.xml | 40 +++
tests/qemuxml2argvtest.c | 16 ++
tests/qemuxml2xmltest.c | 5 +
16 files changed, 672 insertions(+), 202 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi.xml
--
1.9.3
10 years, 3 months
[libvirt] File permissions on VNC unix sockets
by Landon Gilbert-Bland
I am using kvm libvirt/qemu, and am trying to get VNC working with unix
sockets. I'm using the following in my XML:
<graphics type='vnc' socket='/tmp/kvmtest'/>
This works, it creates the unix socket and I can use it for VNC. But it
creates the socket with 755 permissions, and owned by libvirt-qemu:kvm.
Ideally, I would like it to be 770 root:libvirtd, but could also work
with 775 libvirt-qemu:kvm.
Basically, I would like the group to be read/write/execute, so that
anyone in this group can use virt-manager (or whatever) to get into the
vm with vnc. I haven't found a way to change this in the settins. It
doesn't seem to be honoring the unix socket settings in
/etc/libvirt/libvirdd.conf (it looks like those are only for
libvirt-sock and libvirt-sock-ro), and I haven't been able to find any
documentation about changing these permissions in the XML.
I can manually chmod/chown the socket after it is created (manually or
with a cron), but that is far from an ideal solution. I don't suppose
anyone has run across a configuration option for this that I have missed?
I have only tested this in ubuntu 14.01 and debian sid, for what it's worth.
Thanks,
--landon
10 years, 3 months
[libvirt] Error
by ahmad jan
I am using Libvirt-1.0.0 on ubuntu 14.02 LTS and found the following error
"checking linux/if_bridge.h usability... no
checking linux/if_bridge.h presence... yes
configure: WARNING: linux/if_bridge.h: present but cannot be compiled
configure: WARNING: linux/if_bridge.h: check for missing prerequisite
headers?
configure: WARNING: linux/if_bridge.h: see the Autoconf documentation
configure: WARNING: linux/if_bridge.h: section "Present But Cannot Be
Compiled"
configure: WARNING: linux/if_bridge.h: proceeding with the compiler's result
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: ## Report this to libvir-list <at> redhat.com ##
configure: WARNING: ## ------------------------------------- ##
checking for linux/if_bridge.h... no
configure: error: You must install kernel-headers in order to compile
libvirt with QEMU or LXC support"
Please Guide, how do I recover it
thanks
10 years, 3 months
[libvirt] Help Required
by ahmad jan
Respected Sir
i am using libvirt-1.2.6 API and facing the following error please guide
libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_1.2.6' not found (required by libvirtd)
best regrads
10 years, 3 months
[libvirt] [PATCH] virsh: clean up attach-interface paragraph in man page
by Laine Stump
This makes the paragaph about attach-interface more descriptive and
correct, adding in a few bits of information that were previously
missing, e.g. --script is only allowed for bridge interfaces of Xen
domains, target name is regenerated if it starts with vnet, mac
address will be autogenerated if not specified.
(I did this in response to an email asking why a script couldn't be
specified for a bridge interface of a qemu domain, and why an
interface of type='ethernet' couldn't be created with
attach-interface)
---
tools/virsh.pod | 36 +++++++++++++++++++++++-------------
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 849ae31..abb8743 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -2202,19 +2202,29 @@ Likewise, I<--shareable> is an alias for I<--mode shareable>.
[I<--target target>] [I<--mac mac>] [I<--script script>] [I<--model model>]
[I<--config>] [I<--inbound average,peak,burst>] [I<--outbound average,peak,burst>]
-Attach a new network interface to the domain. I<type> can be either I<network>
-to indicate a physical network device or I<bridge> to indicate a bridge to a
-device. I<source> indicates the source device. I<target> allows to indicate
-the target device in the guest. Names starting with 'vnet' are considered as
-auto-generated an hence blanked out. I<mac> allows to specify the MAC address
-of the network interface. I<script> allows to specify a path to a script
-handling a bridge instead of the default one. I<model> allows to specify the
-model type. I<inbound> and I<outbound> control the bandwidth of the interface.
-I<peak> and I<burst> are optional, so "average,peak", "average,,burst" and
-"average" are also legal. Values for I<average> and I<peak> are
-expressed in kilobytes per second, while I<burst> is expressed in kilobytes
-in a single burst at -I<peak> speed as described in the Network XML
-documentation at L<http://libvirt.org/formatnetwork.html#elementQoS>.
+Attach a new network interface to the domain. I<type> can be either
+I<network> to indicate connection via a libvirt virtual network or
+I<bridge> to indicate connection via a bridge device on the host.
+I<source> indicates the source of the connection (either the name of a
+network, or of a bridge device). I<target> is used to specify the
+tap/macvtap device to be used to connect the domain to the
+source. Names starting with 'vnet' are considered as auto-generated
+and are blanked out/regenerated each time the interface is attached.
+I<mac> specifies the MAC address of the network interface; if a MAC
+address is not given, a new address will be automatically generated
+(and stored in the persistent configuration if "--config" is given on
+the commandline). I<script> is used to specify a path to a custom
+script to be called while attaching to a bridge - this will be called
+instead of the default script not in addition to it; --script is valid
+only for interfaces of type I<bridge> and only for Xen domains.
+I<model> specifies the network device model to be presented to the
+domain. I<inbound> and I<outbound> control the bandwidth of the
+interface. I<peak> and I<burst> are optional, so "average,peak",
+"average,,burst" and "average" are also legal. Values for I<average>
+and I<peak> are expressed in kilobytes per second, while I<burst> is
+expressed in kilobytes in a single burst at -I<peak> speed as
+described in the Network XML documentation at
+L<http://libvirt.org/formatnetwork.html#elementQoS>.
If I<--live> is specified, affect a running domain.
If I<--config> is specified, affect the next startup of a persistent domain.
--
1.9.3
10 years, 3 months
[libvirt] Can't run vbox's network driver and storage driver.
by Taowei Luo
Hi, I just can't find a way running the network driver and storage driver
provided by vbox.
When I use vbox:///session as an url to run vbox driver and call network
(or storage) API, the vbox's driver didn't execute. Instead, it would run
drivers in src/network and src/storage.
The problem only comes with the network driver and storage driver. Which
means the vbox's domain driver works well with libvirt.
I know that actually libvirt communicate with vbox driver though the remote
driver, but I don't know how to make remote driver call vbox's network
driver(or storage driver).
BTW, I need vbox's driver because I have to do some test on it.
Thanks,
Taowei
10 years, 3 months
[libvirt] [PATCH] daemon: Fix indentation in libvirtd.c
by Wang Rui
Signed-off-by: Wang Rui <moon.wangrui(a)huawei.com>
---
daemon/libvirtd.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 4c926b3..946081a 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -803,11 +803,11 @@ static void daemonReloadHandler(virNetServerPtr srv ATTRIBUTE_UNUSED,
siginfo_t *sig ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
- VIR_INFO("Reloading configuration on SIGHUP");
- virHookCall(VIR_HOOK_DRIVER_DAEMON, "-",
- VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL, NULL);
- if (virStateReload() < 0)
- VIR_WARN("Error while reloading drivers");
+ VIR_INFO("Reloading configuration on SIGHUP");
+ virHookCall(VIR_HOOK_DRIVER_DAEMON, "-",
+ VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL, NULL);
+ if (virStateReload() < 0)
+ VIR_WARN("Error while reloading drivers");
}
static int daemonSetupSignals(virNetServerPtr srv)
--
1.7.12.4
10 years, 3 months
[libvirt] [PATCH] audit: Fix some comments
by Wang Rui
Fix a comment in virDomainAuditNetDevice.
Fix a typo in comment of qemuPhysIfaceConnect which is
the caller of virDomainAuditNetDevice.
Signed-off-by: Wang Rui <moon.wangrui(a)huawei.com>
---
src/conf/domain_audit.c | 4 ++--
src/qemu/qemu_command.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index 93625fc..fcf9df7 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -318,8 +318,8 @@ virDomainAuditNet(virDomainObjPtr vm,
/**
* virDomainAuditNetDevice:
- * @vm: domain opening a network-related device
- * @def: details of network device that fd will be tied to
+ * @vmDef: the definition of the VM
+ * @netDef: details of network device that fd will be tied to
* @device: device being opened (such as /dev/vhost-net,
* /dev/net/tun, /dev/tanN). Note that merely opening a device
* does not mean that virDomain owns it; a followup virDomainAuditNet
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index a5ff10a..033a5a8 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -160,7 +160,7 @@ VIR_ENUM_IMPL(qemuNumaPolicy, VIR_DOMAIN_NUMATUNE_MEM_LAST,
* qemuPhysIfaceConnect:
* @def: the definition of the VM (needed by 802.1Qbh and audit)
* @driver: pointer to the driver instance
- * @net: pointer to he VM's interface description with direct device type
+ * @net: pointer to the VM's interface description with direct device type
* @qemuCaps: flags for qemu
* @vmop: VM operation type
*
--
1.7.12.4
10 years, 3 months
[libvirt] Lifecycle events during reboot for KVM and Xen
by Thomas Bechtold
Hi,
during debugging a problem[1] of Openstack Nova I recognized the following:
Doing a reboot (from inside of the VM with "reboot" command) on a kvm VM
doesn't send any lifecycle events (events debugged with [2]).
Doing the same thing with a xen VM leads to 2 events: First a
VIR_DOMAIN_EVENT_STOPPED and then a VIR_DOMAIN_EVENT_STARTED event.
The problem here is that for the xen case it doesn't seem to be possible
to recognize that a reboot is ongoing. For that reason the OpenStack
Nova component just forces the domain to stop after receiving the
VIR_DOMAIN_EVENT_STOPPED event.
Is it expected that the 2 drivers send different events for the same
action or a bug in qemu/xen/libvirt?
Cheers,
Tom
[1] https://bugs.launchpad.net/nova/+bug/1293480
[2] https://gist.github.com/toabctl/53f26989ad7634a3168b
10 years, 3 months
[libvirt] [PATCH V3 00/24] xen_xm parsing code refactor
by David Kiarie
Kiarie Kahurani (24):
src/xenxs:Refactor code parsing memory config
src/xenxs:Refactor code parsing virtual time config
src/xenxs:Refactor code parsing event actions
src/xenxs:Refactor code parsing PCI config
src/xenxs:Refactor code parsing CPU features
src/xenxs:Refactor code parsing xm disk config
src/xenxs:Refactor code parsing Vfb config
src/xenxs:Refactor code parsing Char devices config
src/xenxs:Refactor code parsing Vif config
src/xenxs:Refactor code parsing emulated hardware config
src/xenxs:Refactor code parsing general config
src/xenxs:Refactor code parsing OS config
src/xenxs:Export code for reuse
src/xenxs:Refactor code formating general VM config
src/xenxs:Refactor code formating memory config
src/xenxs:Refactor code formating virtual time config
src/xenxs:Refactor code formating event actions config
src/xenxs:Refactor code formating Char devices config
src/xenxs:Refactor code formating xm disk config
src/xenxs:Refactor code formating CPU features config
src/xenxs:Refactor code formating OS config
src/xenxs:Refactor code formating Vfb config
src/xenxs:Refactor code formating emulated devices config
src/xenxs:Export code
src/xenxs/xen_xm.c | 2217 +++++++++++---------
src/xenxs/xen_xm.h | 4 +
tests/xmconfigdata/test-escape-paths.cfg | 12 +-
tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-localtime.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-net-ioemu.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-old-cdrom.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 10 +-
.../test-fullvirt-serial-dev-2-ports.cfg | 10 +-
.../test-fullvirt-serial-dev-2nd-port.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-serial-file.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-serial-null.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 10 +-
.../test-fullvirt-serial-tcp-telnet.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-sound.cfg | 12 +-
tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 10 +-
tests/xmconfigdata/test-fullvirt-utc.cfg | 10 +-
tests/xmconfigdata/test-no-source-cdrom.cfg | 10 +-
tests/xmconfigdata/test-paravirt-net-e1000.cfg | 2 +-
tests/xmconfigdata/test-paravirt-net-vifname.cfg | 2 +-
.../test-paravirt-new-pvfb-vncdisplay.cfg | 2 +-
tests/xmconfigdata/test-paravirt-new-pvfb.cfg | 2 +-
.../test-paravirt-old-pvfb-vncdisplay.cfg | 2 +-
tests/xmconfigdata/test-paravirt-old-pvfb.cfg | 2 +-
tests/xmconfigdata/test-paravirt-vcpu.cfg | 2 +-
tests/xmconfigdata/test-pci-devs.cfg | 10 +-
35 files changed, 1416 insertions(+), 1083 deletions(-)
V3 of series refactoring xen_xm.c code for reuse in the xen-xl parser.
Changes since V2
-Formating fixes
-reused Vif formating and parsing code
--
1.8.4.5
10 years, 3 months