[libvirt] [PATCH V2 0/7] support multi function PCI device
by Wen Congyang
We want to use more than 200+ device. Libvirt does not use multi
function PCI device and PCI-to-PCI bridge. So we can not use more
than 200+ device if it's a PCI device or it's controller is a PCI
device.
This patchset adds the support of multi function PCI device. It
does not support to hot plug/unplug multi function PCI device.
Change log:
v1 -> v2:
1. split the patch, and it will be easily to review
2. Auto assign a slot not a function if user does not specify the address.
Wen Congyang (7):
check whether qemu supports multi function PCI device
prevent hot unplugging multi function PCI device
the key of hash table should include the function value
Reimplement qemuDomainPCIAddressReserveSlot(): reserve all functions
in the slot
assign the whole slot to the PCI device that has no address
the hotplugged PCI device should use the whole slot
support multifunction PCI device
src/conf/domain_conf.c | 3 +
src/qemu/qemu_capabilities.c | 5 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 151 +++++++++++++++++++++++++++++++++++++-----
src/qemu/qemu_command.h | 5 ++
src/qemu/qemu_hotplug.c | 76 +++++++++++++++++++--
tests/qemuhelptest.c | 3 +-
7 files changed, 218 insertions(+), 26 deletions(-)
13 years, 6 months
[libvirt] [PATCH 00/16] More virCommand conversions and cleanups
by Cole Robinson
The following series converts all users of several older command
wrappers (virRunWithHook, virExecDaemonize, and virExec) to use
virCommand. The remaining functionality is then moved out of
util.c and into command.c
Cole Robinson (16):
remote_driver: Convert virExecDaemonize usage to virCommand
util: Combine __virExec and virExecWithHook
command: Allow setting a NULL hook function
storage_backend: Convert virRunWithHook usage to virCommand
apparmor: Convert virExec usage to virCommand
storage: Convert qemu-img -help parsing to virCommand
storage: Covert regex helpers to virCommand
storage: iscsi: Convert virExec to virCommand
qemu: Convert virExec usage to virCommand
openvz: Convert virExec usage to virCommand
remote: Convert SSH tunnel to virCommand
util: Remove unused virExec wrapper
util: Implement virRun as a wrapper around virCommand
Move virRun, virExec*, virFork to util/command
storage_backend: Fix error reporting with regex helper
command: Report stdout/stderr if command fails
cfg.mk | 2 +-
src/libvirt_private.syms | 8 +-
src/lxc/veth.c | 2 +-
src/nwfilter/nwfilter_ebiptables_driver.c | 1 +
src/openvz/openvz_conf.c | 37 +-
src/openvz/openvz_driver.c | 52 ++-
src/qemu/qemu_driver.c | 14 +-
src/qemu/qemu_process.c | 2 +-
src/remote/remote_driver.c | 83 +--
src/security/security_apparmor.c | 70 +---
src/storage/storage_backend.c | 292 ++++--------
src/storage/storage_backend.h | 3 +-
src/storage/storage_backend_fs.c | 7 +-
src/storage/storage_backend_iscsi.c | 40 +-
src/storage/storage_backend_logical.c | 32 +-
src/util/command.c | 621 +++++++++++++++++++++++-
src/util/command.h | 16 +-
src/util/ebtables.c | 2 +-
src/util/pci.c | 2 +-
src/util/util.c | 764 +----------------------------
src/util/util.h | 44 --
src/vmware/vmware_driver.c | 1 +
22 files changed, 854 insertions(+), 1241 deletions(-)
--
1.7.4.4
13 years, 6 months
[libvirt] [libvirt-php] Work on ./example
by David Streibl
Hello,
as part of my student project I am working on simple web interface which
would support multiple virtualisation platforms.
This of course led me to libvirt and libvirt-php more specificly.
Right now I'm using modfied code of exapme Libvirt class and the plan is:
- add phpdoc
- refactor it to match libvirt convetion (get_domain_someting ->
dmain_get_something)
- split Libvirt to subclasses for domain, connection, network, storage (not
completly sure if it is good idea)
- add few unit tests (dont know about time and usefulness of this)
Would it be welcomed if I send to whole think or even parts of it as patches
to libvirt-php/example?
Thanks for any reply and sorry for my english,
David
13 years, 6 months
[libvirt] [PATCH 0/4 v3] More virCommand conversions and cleanups
by Cole Robinson
The following series converts the last user of virExec to use
virCommand. The remaining functionality is then moved out of
util.c and into command.c
v2:
Committed some patches
Dropped final patch, can be submitted seperately
Addressed Eric's comments
v3:
Commited some patches
Addressed Eric's v2 comments
Cole Robinson (4):
qemu: Convert virExec usage to virCommand
util: Remove unused virExec wrapper
util: Implement virRun as a wrapper around virCommand
Move virRun, virExec*, virFork to util/command
cfg.mk | 3 +-
src/libvirt_private.syms | 6 +-
src/lxc/veth.c | 2 +-
src/nwfilter/nwfilter_ebiptables_driver.c | 1 +
src/qemu/qemu_driver.c | 26 +-
src/qemu/qemu_process.c | 2 +-
src/storage/storage_backend_fs.c | 2 +-
src/storage/storage_backend_logical.c | 2 +-
src/util/command.c | 565 ++++++++++++++++++++++++-
src/util/command.h | 14 +
src/util/ebtables.c | 2 +-
src/util/pci.c | 2 +-
src/util/util.c | 661 +----------------------------
src/util/util.h | 32 --
src/vmware/vmware_driver.c | 1 +
15 files changed, 608 insertions(+), 713 deletions(-)
--
1.7.4.4
13 years, 6 months
[libvirt] (how much) support for kqemu domain
by John Lumby
I am wondering about the extent to which "old" qemu-0.11.1 and kqemu-1.4.0 are supported by virt-manager.
I see I can specify --virt-type=kqemu on virt-install and it remembers domain type='kqemu', and does things such as refusing to start the vm if the kqemu kernel mod not loaded, but it seems it does not tack on the
-enable-kqemu -kernel-kqemu
options on to the qemu command line. There is really not much point in trying to start a qemu-based vm with neither hardware kvm nor kqemu ...
I can work around it with an override script to intercept the qemu command, but does anyone think virt-manager ought to do this for me?
John Lumby
_________________________________________________________________
13 years, 7 months
[libvirt] Building on Solaris 11 Express
by Richard Laager
I would really like to use ZFS's zvols as storage for my guests. I
really like ZFS's snapshots, send/receive, and checksumming features.
(Compression and deduplication might be useful as well.)
I'm roughly about half-way done writing a ZFS storage backend for
libvirt. It behaves like the LVM backend. I've been writing it on Linux.
However, ZFS on Linux is not yet production-ready.
So I tried building libvirt on Solaris 11 Express. The following
outlines the trouble (and successes) I've had so far.
First, I had to prune down the features being built:
I added --without-xen to deal with the following. I wasn't
intending on using Xen, so this doesn't bother me personally.
configure: error: You must install the Xen development package to compile Xen driver with -lxenstore
I added --without-openvz to deal with the following. Likewise,
I'm not using it.
CC libvirt_driver_openvz_la-openvz_driver.lo
openvz/openvz_driver.c:45:19: paths.h: No such file or directory
In file included from ../src/conf/domain_conf.h:40,
from openvz/openvz_conf.h:33,
from openvz/openvz_driver.c:56:
../src/conf/nwfilter_conf.h:521: warning: parameter has incomplete type
I added --without-network to deal with the following. I may need
to actually fix this at some point.
CC libvirt_util_la-bridge.lo
util/bridge.c:39:20: paths.h: No such file or directory
util/bridge.c:42:55: linux/param.h: No such file or directory
util/bridge.c:43:55: linux/sockios.h: No such file or directory
util/bridge.c:44:55: linux/if_bridge.h: No such file or directory
util/bridge.c:45:55: linux/if_tun.h: No such file or directory
util/bridge.c: In function `ifSetInterfaceMac':
util/bridge.c:313: error: `SIOCGIFHWADDR' undeclared (first use in this function)
util/bridge.c:313: error: (Each undeclared identifier is reported only once
util/bridge.c:313: error: for each function it appears in.)
util/bridge.c:316: error: structure has no member named `ifr_hwaddr'
util/bridge.c:318: error: `SIOCSIFHWADDR' undeclared (first use in this function)
util/bridge.c: In function `ifGetMtu':
util/bridge.c:347: error: `SIOCGIFMTU' undeclared (first use in this function)
util/bridge.c: In function `ifSetMtu':
util/bridge.c:378: error: `SIOCSIFMTU' undeclared (first use in this function)
util/bridge.c: In function `brAddTap':
util/bridge.c:501: error: `IFF_TAP' undeclared (first use in this function)
util/bridge.c:501: error: `IFF_NO_PI' undeclared (first use in this function)
util/bridge.c:515: error: `TUNSETIFF' undeclared (first use in this function)
util/bridge.c:537: error: `TUNSETPERSIST' undeclared (first use in this function)
util/bridge.c: In function `brDeleteTap':
util/bridge.c:567: error: `IFF_TAP' undeclared (first use in this function)
util/bridge.c:567: error: `IFF_NO_PI' undeclared (first use in this function)
util/bridge.c:574: error: `TUNSETIFF' undeclared (first use in this function)
util/bridge.c:575: error: `TUNSETPERSIST' undeclared (first use in this function)
util/bridge.c: In function `brSetInterfaceUp':
util/bridge.c:612: error: `SIOCGIFFLAGS' undeclared (first use in this function)
util/bridge.c:620: error: `SIOCSIFFLAGS' undeclared (first use in this function)
util/bridge.c: In function `brGetInterfaceUp':
util/bridge.c:652: error: `SIOCGIFFLAGS' undeclared (first use in this function)
Then, I had to fix a trivial code error. I've mailed the patch to this
list with a subject of "[PATCH] Fix virExecWithHook Prototype".
I also had linker trouble. Solaris 11's gcc package uses Solaris ld, not
GNU ld. I had to change the following:
VERSION_SCRIPT_FLAGS=-Wl,--version-script=
`$LD --help 2>&1 | grep -- --version-script >/dev/null` || \
- VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
+ VERSION_SCRIPT_FLAGS=""
Interestingly, this code seems to have been added to support Solaris ld
according to git blame; see git log c2fb8bfe. I'm not sure what is
correct here.
At this point, libvirt builds and installs. I tested virsh against a
remote system using: virsh -c qemu+ssh://REMOTE/system
This worked except for the fact that it was trying to attach
to /usr/local/var/run/libvirt-sock on the remote system due
to /usr/local being the --prefix used with the *local* virsh was built.
I'm not sure how that architectural issue should be addressed. For
testing, I just made a /usr/local/var -> /var symlink on the remote
system.
However, libvirtd will not start locally (on Solaris) which has pretty
much stopped my progress. I'm sure this must be something trivial. Is it
getting a bad prefix? Is something other than libvirtd supposed to make
the socket file? I did try making a /.libvirt directory for testing.
# rm /usr/local/var/run/libvirtd.pid ; /usr/local/sbin/libvirtd -v
20:13:33.663: 1: info : libvirt version: 0.9.1
20:13:33.663: 1: error : qemudListenUnix:605 : Failed to bind socket to
'@//.libvirt/libvirt-sock': No such file or directory
Thanks,
Richard
13 years, 7 months
[libvirt] Libvirt 0.9.2 week freeze, RC1 version to test
by Daniel Veillard
So we are entering the week freeze for the new version.
I have made an rc1 tarball available at:
ftp://libvirt.org/libvirt/libvirt-0.9.2-rc1.tar.gz
I also made rpms too for those interested.
I didn't included the locking patches from Dan Berrange, though I had
given a review and ACK on the previous version. Maybe we can push this
soon and then I will made an rc2. It would be nice to try to identify
the OpenSolaris portability issues,a dn if someone could give it a try
on Win32 that would be great (along other linux builds of course !)
I have tried it locally and basic operations seems to work fine,
please give it a try too.
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 7 months
[libvirt] [PATCHv4 0/7] interface: new public API for network config change transactions
by Laine Stump
(This is v3 of some of the patches and v4 of some others. Changes from
previous versions are noted in the individual patches.)
This patch series implements three new APIs for the interface
driver which support transactional changes to the host's network
config - at any point you can begin a transaction (which saves a
snapshot of the current config), then make any changes you like to the
config, and later either commit those changes (the current
implementation just removes the snapshotted files) or rollback to the
original config.
The actual implementation of this functionality lives in the netcf
library; these patches create pass-through functions that call out to
netcf on the machine that's running libvirtd.
Most importantly, note that uses of "start" in the API names have been
changed to "begin", and rather than a single virsh command with
multiple subcommands, there are now three separate commands:
iface-begin, iface-commit, and iface-rollback.
Thanks to using AC_CHECK_LIB in configure.ac, this code can safely be
pushed and built on systems that don't yet have a new enough netcf to
contain the API extensions - those functions are simply not
implemented in that case (and return the appropriate error).
13 years, 7 months
[libvirt] [PATCH] Fix netdev detection on RHEL6x versions of qemu
by Neil Wilson
This allows the attach-device derived functions to work on the vanilla
RHEL6 versions of qemu. Looking for the '-spice' parameter differentiates
the RHEL from non-RHEL versions.
Signed-off-by: Neil Wilson <neil(a)brightbox.co.uk>
---
src/qemu/qemu_capabilities.c | 7 ++++---
tests/qemuhelptest.c | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 71a54a5..587de9e 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -962,10 +962,11 @@ qemuCapsComputeCmdFlags(const char *help,
qemuCapsSet(flags, QEMU_CAPS_SMBIOS_TYPE);
if (strstr(help, "-netdev")) {
- /* Disable -netdev on 0.12 since although it exists,
- * the corresponding netdev_add/remove monitor commands
+ /* Disable -netdev on non-RHEL6 versions of 0.12 since although
+ * it exists,the corresponding netdev_add/remove monitor commands
* do not, and we need them to be able todo hotplug */
- if (version >= 13000)
+ if ((version >= 13000) ||
+ ((version >= 12001) && (strstr(help, "-spice"))))
qemuCapsSet(flags, QEMU_CAPS_NETDEV);
}
diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c
index 2522396..ceed35f 100644
--- a/tests/qemuhelptest.c
+++ b/tests/qemuhelptest.c
@@ -331,6 +331,7 @@ mymain(void)
QEMU_CAPS_ENABLE_KVM,
QEMU_CAPS_BALLOON,
QEMU_CAPS_DEVICE,
+ QEMU_CAPS_NETDEV,
QEMU_CAPS_SMP_TOPOLOGY,
QEMU_CAPS_RTC,
QEMU_CAPS_VNET_HOST,
@@ -454,6 +455,7 @@ mymain(void)
QEMU_CAPS_ENABLE_KVM,
QEMU_CAPS_BALLOON,
QEMU_CAPS_DEVICE,
+ QEMU_CAPS_NETDEV,
QEMU_CAPS_SMP_TOPOLOGY,
QEMU_CAPS_RTC,
QEMU_CAPS_VNET_HOST,
--
1.7.4.1
13 years, 7 months