[libvirt] [libvirt-tck] [RFC] 802.1Qbg test scripts
by Gerhard Stenzel
Hi Daniel,
I am currently looking into TCK test cases to verify setting 802.1Qbg
functionality from libvirt. My current approach requires changes to some
library functions in lib/Sys/Virt/TCK/.
I would appreciate your feedback about these changes before continuing
much further.
I also attach the test case.
Thanks in advance.
--
Best regards,
Gerhard Stenzel,
-----------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
14 years, 1 month
[libvirt] [PATCH] Implement support for virtio plan9fs filesystem passthrough in QEMU (v2)
by Daniel P. Berrange
Rebased version of my original patch, changing to use 'passthrough'
security model by default. Support for other models can be added
in a follow up patch
Make use of the existing <filesystem> element to support plan9fs
filesystem passthrough in the QEMU driver
<filesystem type='mount'>
<source dir='/export/to/guest'/>
<target dir='/import/from/host'/>
</filesystem>
NB, the target is not actually a directory, it is merely a arbitrary
string tag that is exported to the guest as a hint for where to mount
it.
---
src/qemu/qemu_conf.c | 96 +++++++++++++++++++++++++
src/qemu/qemu_conf.h | 5 ++
tests/qemuxml2argvdata/qemuxml2argv-fs9p.args | 1 +
tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml | 28 +++++++
tests/qemuxml2argvtest.c | 2 +
5 files changed, 132 insertions(+), 0 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fs9p.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 7a37c70..18a302a 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1212,6 +1212,8 @@ static unsigned long long qemudComputeCmdFlags(const char *help,
flags |= QEMUD_CMD_FLAG_TDF;
if (strstr(help, ",menu=on"))
flags |= QEMUD_CMD_FLAG_BOOT_MENU;
+ if (strstr(help, "-fsdev"))
+ flags |= QEMUD_CMD_FLAG_FSDEV;
/* Keep disabled till we're actually ready to turn on netdev mode
* The plan is todo it in 0.13.0 QEMU, but lets wait & see... */
@@ -2008,6 +2010,10 @@ qemuAssignDeviceAliases(virDomainDefPtr def, unsigned long long qemuCmdFlags)
if (!(qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE))
return 0;
+ for (i = 0; i < def->nfss ; i++) {
+ if (virAsprintf(&def->fss[i]->info.alias, "fs%d", i) < 0)
+ goto no_memory;
+ }
for (i = 0; i < def->nsounds ; i++) {
if (virAsprintf(&def->sounds[i]->info.alias, "sound%d", i) < 0)
goto no_memory;
@@ -2371,6 +2377,15 @@ qemuAssignDevicePCISlots(virDomainDefPtr def, qemuDomainPCIAddressSetPtr addrs)
goto error;
}
}
+ for (i = 0; i < def->nfss ; i++) {
+ if (def->fss[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
+ continue;
+
+ /* Only support VirtIO-9p-pci so far. If that changes,
+ * we might need to skip devices here */
+ if (qemuDomainPCIAddressSetNextAddr(addrs, &def->fss[i]->info) < 0)
+ goto error;
+ }
/* Network interfaces */
for (i = 0; i < def->nnets ; i++) {
@@ -2761,6 +2776,64 @@ error:
}
+char *qemuBuildFSStr(virDomainFSDefPtr fs,
+ unsigned long long qemuCmdFlags ATTRIBUTE_UNUSED)
+{
+ virBuffer opt = VIR_BUFFER_INITIALIZER;
+
+ if (fs->type != VIR_DOMAIN_FS_TYPE_MOUNT) {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("can only passthrough directories"));
+ goto error;
+ }
+
+ virBufferAddLit(&opt, "local,security_model=passthrough");
+ virBufferVSprintf(&opt, ",id=%s%s", QEMU_FSDEV_HOST_PREFIX, fs->info.alias);
+ virBufferVSprintf(&opt, ",path=%s", fs->src);
+
+ if (virBufferError(&opt)) {
+ virReportOOMError();
+ goto error;
+ }
+
+ return virBufferContentAndReset(&opt);
+
+error:
+ virBufferFreeAndReset(&opt);
+ return NULL;
+}
+
+
+char *
+qemuBuildFSDevStr(virDomainFSDefPtr fs)
+{
+ virBuffer opt = VIR_BUFFER_INITIALIZER;
+
+ if (fs->type != VIR_DOMAIN_FS_TYPE_MOUNT) {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("can only passthrough directories"));
+ goto error;
+ }
+
+ virBufferAddLit(&opt, "virtio-9p-pci");
+ virBufferVSprintf(&opt, ",id=%s", fs->info.alias);
+ virBufferVSprintf(&opt, ",fsdev=%s%s", QEMU_FSDEV_HOST_PREFIX, fs->info.alias);
+ virBufferVSprintf(&opt, ",mount_tag=%s", fs->dst);
+ qemuBuildDeviceAddressStr(&opt, &fs->info);
+
+ if (virBufferError(&opt)) {
+ virReportOOMError();
+ goto error;
+ }
+
+ return virBufferContentAndReset(&opt);
+
+error:
+ virBufferFreeAndReset(&opt);
+ return NULL;
+}
+
+
char *
qemuBuildControllerDevStr(virDomainControllerDefPtr def)
{
@@ -4377,6 +4450,29 @@ int qemudBuildCommandLine(virConnectPtr conn,
}
}
+ if (qemuCmdFlags & QEMUD_CMD_FLAG_FSDEV) {
+ for (i = 0 ; i < def->nfss ; i++) {
+ char *optstr;
+ virDomainFSDefPtr fs = def->fss[i];
+
+ ADD_ARG_LIT("-fsdev");
+ if (!(optstr = qemuBuildFSStr(fs, qemuCmdFlags)))
+ goto error;
+ ADD_ARG(optstr);
+
+ ADD_ARG_LIT("-device");
+ if (!(optstr = qemuBuildFSDevStr(fs)))
+ goto error;
+ ADD_ARG(optstr);
+ }
+ } else {
+ if (def->nfss) {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("filesystem passthrough not supported by this QEMU"));
+ goto error;
+ }
+ }
+
if (!def->nnets) {
/* If we have -device, then we set -nodefault already */
if (!(qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) {
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 2c9e608..fbd89de 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -93,6 +93,7 @@ enum qemud_cmd_flags {
QEMUD_CMD_FLAG_NODEFCONFIG = (1LL << 37), /* -nodefconfig */
QEMUD_CMD_FLAG_BOOT_MENU = (1LL << 38), /* -boot menu=on support */
QEMUD_CMD_FLAG_ENABLE_KQEMU = (1LL << 39), /* -enable-kqemu flag */
+ QEMUD_CMD_FLAG_FSDEV = (1LL << 40), /* -fstype filesystem passthrough */
};
/* Main driver state */
@@ -188,6 +189,7 @@ struct _qemuDomainCmdlineDef {
# define QEMU_DRIVE_HOST_PREFIX "drive-"
# define QEMU_VIRTIO_SERIAL_PREFIX "virtio-serial"
+# define QEMU_FSDEV_HOST_PREFIX "fsdev-"
# define qemuReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_QEMU, code, __FILE__, \
@@ -248,9 +250,12 @@ char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk,
char *qemuBuildDriveStr(virDomainDiskDefPtr disk,
int bootable,
unsigned long long qemuCmdFlags);
+char *qemuBuildFSStr(virDomainFSDefPtr fs,
+ unsigned long long qemuCmdFlags);
/* Current, best practice */
char * qemuBuildDriveDevStr(virDomainDiskDefPtr disk);
+char * qemuBuildFSDevStr(virDomainFSDefPtr fs);
/* Current, best practice */
char * qemuBuildControllerDevStr(virDomainControllerDefPtr def);
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-fs9p.args b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.args
new file mode 100644
index 0000000..995ffc0
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.args
@@ -0,0 +1 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/to/guest -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=/import/from/host,bus=pci.0,addr=0x2 -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
new file mode 100644
index 0000000..9072ead
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
@@ -0,0 +1,28 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory>219200</memory>
+ <currentMemory>219200</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>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>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' unit='0'/>
+ </disk>
+ <controller type='ide' index='0'/>
+ <filesystem type='mount'>
+ <source dir='/export/to/guest'/>
+ <target dir='/import/from/host'/>
+ </filesystem>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 7b9df09..92d5b18 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -368,6 +368,8 @@ mymain(int argc, char **argv)
DO_TEST("sound", 0);
DO_TEST("sound-device", QEMUD_CMD_FLAG_DEVICE |
QEMUD_CMD_FLAG_NODEFCONFIG);
+ DO_TEST("fs9p", QEMUD_CMD_FLAG_DEVICE |
+ QEMUD_CMD_FLAG_NODEFCONFIG | QEMUD_CMD_FLAG_FSDEV);
DO_TEST("hostdev-usb-address", 0);
DO_TEST("hostdev-usb-address-device", QEMUD_CMD_FLAG_DEVICE |
--
1.7.2.3
14 years, 1 month
[libvirt] [PATCH v3 00/13] Implement memory control api
by Nikunj A. Dadhania
Changelog from v2:
* Implement virDomainGetMemoryParameters api
* Add virDomainGetMemoryParameters to memtune command in virsh
* Provide domainGetMemoryParameters implementation for remote, QEmu and LXC
drivers
* Auto-generate code using rpcgen and remote_generate_stubs.pl
* Squash all the changes related to remote driver and remote protocol into
one single patch.
* Patch re-ordering
Changelog from v1:
* Patch re-ordering for compilation
* Folded python bindings changes to patch 01
* Added defines for string constants for memory tunables
* Typo fix: min_guarantee
* Moved initialization of function pointers in driver.h patch
This patch series implement public api for controlling various memory tunables
exported by the OS. This is based on the following RFC[1].
* Implement virDomainSetMemoryParameters api
* Provide implementation for remote, QEmu and LXC drivers
* Enable memory controller support fro QEmu
* virsh command for runtime changes to the memory parameters
* Domain configuration parsing for memory control parameters
* Cgroup memory controller code for memory hard_limit/soft_limit, swap
hard_limit
To Do
* Python bindings is just a place holder, need to implement
1. https://www.redhat.com/archives/libvir-list/2010-August/msg00607.html
2. https://www.redhat.com/archives/libvir-list/2010-August/msg00699.html
---
Nikunj A. Dadhania (13):
Adding structure and defines for virDomainSet/GetMemoryParameters
Adding virDomainSetMemoryParameters and virDomainGetMemoryParameters API
Adds xml entries for memory tunables
XML parsing for memory tunables
Implement cgroup memory controller tunables
Implement driver interface domainSetMemoryParamters for QEmu
Implement driver interface domainGetMemoryParamters for QEmu
Adding memtunables to qemuSetupCgroup
Adding memtunables to libvirt-lxc command
Implement driver interface domainSetMemoryParamters for LXC
Implement driver interface domainGetMemoryParamters for LXC
Adding memtune command to virsh tool
Remote protocol changes and implements virDomainSet/GetMemoryParameters
daemon/remote.c | 158 ++++++++++++++++++++++
daemon/remote_dispatch_args.h | 2
daemon/remote_dispatch_prototypes.h | 16 ++
daemon/remote_dispatch_ret.h | 1
daemon/remote_dispatch_table.h | 10 +
docs/schemas/domain.rng | 31 ++++
include/libvirt/libvirt.h.in | 68 +++++++++
python/generator.py | 2
python/libvirt-override-api.xml | 12 ++
python/libvirt-override.c | 14 ++
src/conf/domain_conf.c | 50 ++++++-
src/conf/domain_conf.h | 12 +-
src/driver.h | 12 ++
src/esx/esx_driver.c | 2
src/esx/esx_vmx.c | 30 ++--
src/libvirt.c | 103 ++++++++++++++
src/libvirt_private.syms | 6 +
src/libvirt_public.syms | 6 +
src/lxc/lxc_controller.c | 24 +++
src/lxc/lxc_driver.c | 213 ++++++++++++++++++++++++++++-
src/openvz/openvz_driver.c | 10 +
src/phyp/phyp_driver.c | 2
src/qemu/qemu.conf | 4 -
src/qemu/qemu_conf.c | 11 +-
src/qemu/qemu_driver.c | 256 ++++++++++++++++++++++++++++++++++-
src/remote/remote_driver.c | 146 ++++++++++++++++++++
src/remote/remote_protocol.c | 84 +++++++++++
src/remote/remote_protocol.h | 56 ++++++++
src/remote/remote_protocol.x | 42 ++++++
src/test/test_driver.c | 14 +-
src/uml/uml_conf.c | 2
src/uml/uml_driver.c | 16 +-
src/util/cgroup.c | 106 ++++++++++++++
src/util/cgroup.h | 7 +
src/xen/xen_driver.c | 2
tools/virsh.c | 130 ++++++++++++++++++
36 files changed, 1592 insertions(+), 68 deletions(-)
14 years, 1 month
[libvirt] [PATCH 00/12] vcpus: initial implemantation of <vcpu current=x>.
by Eric Blake
As promised, here's my first round of patches to make <vcpu> support
add the ability to persistently remember if a domain should have
fewer vcpus at boot than the maximum allowed for hot-plugging.
Patches 1-10 are pretty well tested, 11 may need some tweaking to
get the semantics right, and 12 is mainly for RFC, since I need
help finishing off the series.
Eric Blake (12):
vcpu: improve cpuset attribute
vcpu: add current attribute to <vcpu> element
vcpu: add new public API
vcpu: define internal driver API
vcpu: implement the public APIs
vcpu: implement the remote protocol
vcpu: make old API trivially wrap to new API
vcpu: support maxvcpu in domain_conf
vcpu: add virsh support
vcpu: improve vcpu support in qemu command line
vcpu: complete vcpu support in qemu driver
food for thought
daemon/remote.c | 53 +++++++
daemon/remote_dispatch_args.h | 2 +
daemon/remote_dispatch_prototypes.h | 16 ++
daemon/remote_dispatch_ret.h | 1 +
daemon/remote_dispatch_table.h | 10 ++
docs/formatdomain.html.in | 17 ++-
docs/schemas/domain.rng | 14 ++-
include/libvirt/libvirt.h.in | 14 ++
src/conf/domain_conf.c | 41 ++++--
src/conf/domain_conf.h | 3 +-
src/driver.h | 9 +
src/esx/esx_driver.c | 30 ++++-
src/esx/esx_vmx.c | 24 ++-
src/libvirt.c | 125 +++++++++++++++-
src/libvirt_public.syms | 6 +
src/lxc/lxc_driver.c | 2 +
src/opennebula/one_conf.c | 11 +-
src/opennebula/one_driver.c | 2 +
src/openvz/openvz_conf.c | 7 +-
src/openvz/openvz_driver.c | 47 +++++-
src/phyp/phyp_driver.c | 32 ++++-
src/qemu/qemu_conf.c | 19 ++-
src/qemu/qemu_driver.c | 119 +++++++++++++--
src/remote/remote_driver.c | 55 +++++++
src/remote/remote_protocol.c | 33 ++++
src/remote/remote_protocol.h | 26 +++
src/remote/remote_protocol.x | 19 +++-
src/remote_protocol-structs | 12 ++
src/test/test_driver.c | 34 ++++-
src/uml/uml_driver.c | 2 +
src/vbox/vbox_tmpl.c | 46 +++++-
src/xen/xen_driver.c | 32 ++++-
src/xen/xend_internal.c | 15 ++-
src/xen/xm_internal.c | 15 ++-
src/xenapi/xenapi_driver.c | 60 +++++++-
src/xenapi/xenapi_utils.c | 6 +-
tests/qemuargv2xmltest.c | 2 +
tests/qemuxml2argvdata/qemuxml2argv-smp.args | 1 +
tests/qemuxml2argvdata/qemuxml2argv-smp.xml | 28 ++++
tests/qemuxml2argvtest.c | 2 +
tests/qemuxml2xmltest.c | 2 +
tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml | 22 +++
tools/virsh.c | 211 +++++++++++++++++++++++---
tools/virsh.pod | 28 ++++-
44 files changed, 1140 insertions(+), 115 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-smp.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-smp.xml
create mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml
--
1.7.2.3
14 years, 1 month
[libvirt] [PATCH] Added new attribute security_model to filesystem element
by Harsh Prateek Bora
This patch introduces new attribute to filesystem element
to support customizable security_model for mount type.
Valid security_model are: passthrough, mapped and none.
Usage:
<filesystem type='mount' security_model='passthrough'>
<source dir='/export/to/guest'/>
<target dir='mount_tag'/>
</filesystem>
Note: This patch is based on Daniel's patch to support 9pfs.
It shall be applied after applying Daniel's patch to support 9pfs.
Signed-off-by: Harsh Prateek Bora <harsh(a)linux.vnet.ibm.com>
---
docs/schemas/domain.rng | 7 +++++++
src/conf/domain_conf.c | 30 ++++++++++++++++++++++++++++--
src/conf/domain_conf.h | 10 ++++++++++
src/qemu/qemu_conf.c | 11 +++++++++--
4 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index ccb8cf3..43a292d 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -761,6 +761,13 @@
</choice>
<optional>
<ref name="address"/>
+ <attribute name="security_model">
+ <choice>
+ <value>passthrough</value>
+ <value>mapped</value>
+ <value>none</value>
+ </choice>
+ </attribute>
</optional>
</element>
</define>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e05d5d7..a9881d1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -161,6 +161,12 @@ VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST,
"file",
"template")
+VIR_ENUM_IMPL(virDomainFSSecurityModel, VIR_DOMAIN_FS_SECURITY_LAST,
+ "passthrough",
+ "mapped",
+ "none")
+
+
VIR_ENUM_IMPL(virDomainNet, VIR_DOMAIN_NET_TYPE_LAST,
"user",
"ethernet",
@@ -1847,6 +1853,7 @@ virDomainFSDefParseXML(xmlNodePtr node,
char *type = NULL;
char *source = NULL;
char *target = NULL;
+ char *security_model;
if (VIR_ALLOC(def) < 0) {
virReportOOMError();
@@ -1864,6 +1871,17 @@ virDomainFSDefParseXML(xmlNodePtr node,
def->type = VIR_DOMAIN_FS_TYPE_MOUNT;
}
+ security_model = virXMLPropString(node, "security_model");
+ if (security_model) {
+ if ((def->security_model = virDomainFSSecurityModelTypeFromString(security_model)) < 0) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unknown security model '%s'"), security_model);
+ goto error;
+ }
+ } else {
+ def->security_model = VIR_DOMAIN_FS_SECURITY_PASSTHROUGH;
+ }
+
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
@@ -5602,6 +5620,7 @@ virDomainFSDefFormat(virBufferPtr buf,
int flags)
{
const char *type = virDomainFSTypeToString(def->type);
+ const char *sec_model = virDomainFSSecurityModelTypeToString(def->security_model);
if (!type) {
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
@@ -5609,9 +5628,16 @@ virDomainFSDefFormat(virBufferPtr buf,
return -1;
}
+ if (!sec_model) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unexpected security model %d"), def->security_model);
+ return -1;
+ }
+
+
virBufferVSprintf(buf,
- " <filesystem type='%s'>\n",
- type);
+ " <filesystem type='%s' security_model='%s'>\n",
+ type, sec_model);
if (def->src) {
switch (def->type) {
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 7195c04..6adf027 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -236,10 +236,20 @@ enum virDomainFSType {
VIR_DOMAIN_FS_TYPE_LAST
};
+/* Filesystem mount security model */
+enum virDomainFSSecurityModel {
+ VIR_DOMAIN_FS_SECURITY_PASSTHROUGH,
+ VIR_DOMAIN_FS_SECURITY_MAPPED,
+ VIR_DOMAIN_FS_SECURITY_NONE,
+
+ VIR_DOMAIN_FS_SECURITY_LAST
+};
+
typedef struct _virDomainFSDef virDomainFSDef;
typedef virDomainFSDef *virDomainFSDefPtr;
struct _virDomainFSDef {
int type;
+ int security_model;
char *src;
char *dst;
unsigned int readonly : 1;
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 18a302a..6b96d2f 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -2014,6 +2014,7 @@ qemuAssignDeviceAliases(virDomainDefPtr def, unsigned long long qemuCmdFlags)
if (virAsprintf(&def->fss[i]->info.alias, "fs%d", i) < 0)
goto no_memory;
}
+
for (i = 0; i < def->nsounds ; i++) {
if (virAsprintf(&def->sounds[i]->info.alias, "sound%d", i) < 0)
goto no_memory;
@@ -2783,11 +2784,17 @@ char *qemuBuildFSStr(virDomainFSDefPtr fs,
if (fs->type != VIR_DOMAIN_FS_TYPE_MOUNT) {
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("can only passthrough directories"));
+ _("only supports mount filesystem type"));
goto error;
}
- virBufferAddLit(&opt, "local,security_model=passthrough");
+ virBufferAddLit(&opt, "local");
+ if (fs->security_model == VIR_DOMAIN_FS_SECURITY_PASSTHROUGH)
+ virBufferAddLit(&opt, ",security_model=passthrough");
+ else if (fs->security_model == VIR_DOMAIN_FS_SECURITY_MAPPED)
+ virBufferAddLit(&opt, ",security_model=mapped");
+ else if (fs->security_model == VIR_DOMAIN_FS_SECURITY_NONE)
+ virBufferAddLit(&opt, ",security_model=none");
virBufferVSprintf(&opt, ",id=%s%s", QEMU_FSDEV_HOST_PREFIX, fs->info.alias);
virBufferVSprintf(&opt, ",path=%s", fs->src);
--
1.7.1.1
14 years, 2 months
[libvirt] [PATCH v2 0/5] nwfilter: Support comment attribute in filter rule descriptions
by Stefan Berger
V2:
- work on the iptables instantiation patch (2/5)
- work on the parser patch (1/5)
- small changes to the test cases (5/5)
The following patch series adds support for a comment node to the XML
attributes of all protocols. If possible, as for example in case of iptables,
the comments are instantiated (iptables ... -m comment --comment ...).
The patches do the following:
- extend the parser and XML generator to parse and create XML with the
comment attribute
- instantiate the comment in case of ip(6)tables
- extend the nwfilter.rng schema with the comment attribute
- add the information to the web docs
- add a test case for the XML parser/generator to be run during 'make check'
Regards,
Stefan
14 years, 2 months
[libvirt] libvirt and nested pagind
by Eduardo
Good afternoon!
Searching on the web, I joint some codes and produced those patches.
Now I have a server running perfectly with the following scenario:
AMD Phenom 8400 x3;
Slackware64 13.1 on a slim and custom 2.6.35.2 Linux;
qemu-kvm 0.12.5;
libvirt 0.8.4.
Patch of libvirt 0.8.3:
diff -Naur ../libvirt-0.8.3//docs/schemas/domain.rng
./docs/schemas/domain.rng
--- ../libvirt-0.8.3//docs/schemas/domain.rng 2010-07-29
06:48:30.000000000 -0300
+++ ./docs/schemas/domain.rng 2010-09-01 16:51:57.710851479 -0300
@@ -1595,6 +1595,11 @@
<empty/>
</element>
</optional>
+ <optional>
+ <element name="nesting">
+ <empty/>
+ </element>
+ </optional>
</interleave>
</element>
</optional>
diff -Naur ../libvirt-0.8.3//src/conf/domain_conf.c ./src/conf/domain_conf.c
--- ../libvirt-0.8.3//src/conf/domain_conf.c 2010-08-02
16:16:42.000000000 -0300
+++ ./src/conf/domain_conf.c 2010-09-01 16:51:57.710851479 -0300
@@ -75,7 +75,8 @@
VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
"acpi",
"apic",
- "pae")
+ "pae",
+ "nesting")
VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_LAST,
"destroy",
diff -Naur ../libvirt-0.8.3//src/conf/domain_conf.h ./src/conf/domain_conf.h
--- ../libvirt-0.8.3//src/conf/domain_conf.h 2010-07-29
06:48:30.000000000 -0300
+++ ./src/conf/domain_conf.h 2010-09-01 16:51:57.710851479 -0300
@@ -649,6 +649,7 @@
VIR_DOMAIN_FEATURE_ACPI,
VIR_DOMAIN_FEATURE_APIC,
VIR_DOMAIN_FEATURE_PAE,
+ VIR_DOMAIN_FEATURE_NESTING,
VIR_DOMAIN_FEATURE_LAST
};
diff -Naur ../libvirt-0.8.3//src/qemu/qemu_conf.c ./src/qemu/qemu_conf.c
--- ../libvirt-0.8.3//src/qemu/qemu_conf.c 2010-08-04
09:21:27.000000000 -0300
+++ ./src/qemu/qemu_conf.c 2010-09-01 16:57:47.485469640 -0300
@@ -1190,6 +1190,8 @@
flags |= QEMUD_CMD_FLAG_MEM_PATH;
if (strstr(help, "-chardev"))
flags |= QEMUD_CMD_FLAG_CHARDEV;
+ if (strstr(help, "-enable-nesting"))
+ flags |= QEMUD_CMD_FLAG_NESTING;
if (strstr(help, "-balloon"))
flags |= QEMUD_CMD_FLAG_BALLOON;
if (strstr(help, "-device"))
@@ -3907,6 +3909,9 @@
goto error;
}
}
+ if ((qemuCmdFlags & QEMUD_CMD_FLAG_NESTING) &&
+ (def->features & (1 << VIR_DOMAIN_FEATURE_NESTING)))
+ ADD_ARG_LIT("-enable-nesting");
/*
* NB, -nographic *MUST* come before any serial, or monitor
@@ -6265,6 +6270,8 @@
fullscreen = 1;
} else if (STREQ(arg, "-localtime")) {
def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME;
+ } else if (STREQ(arg, "-enable-nesting")) {
+ def->features |= (1 << VIR_DOMAIN_FEATURE_NESTING);
} else if (STREQ(arg, "-kernel")) {
WANT_VALUE();
if (!(def->os.kernel = strdup(val)))
diff -Naur ../libvirt-0.8.3//src/qemu/qemu_conf.h ./src/qemu/qemu_conf.h
--- ../libvirt-0.8.3//src/qemu/qemu_conf.h 2010-07-28
11:18:15.000000000 -0300
+++ ./src/qemu/qemu_conf.h 2010-09-01 16:58:29.900876561 -0300
@@ -92,6 +92,7 @@
QEMUD_CMD_FLAG_PCI_CONFIGFD = (1LL << 36), /* pci-assign.configfd */
QEMUD_CMD_FLAG_NODEFCONFIG = (1LL << 37), /* -nodefconfig */
QEMUD_CMD_FLAG_BOOT_MENU = (1LL << 38), /* -boot menu=on
support */
+ QEMUD_CMD_FLAG_NESTING = (1LL << 39), /* Is the
-enable-nesting flag available */
};
/* Main driver state */
Patch of libvirt 0.8.4:
diff -Naur libvirt-0.8.4/docs/schemas/domain.rng
libvirt-0.8.4.edu/docs/schemas/domain.rng
--- libvirt-0.8.4/docs/schemas/domain.rng 2010-08-31
10:44:13.000000000 -0300
+++ libvirt-0.8.4.edu/docs/schemas/domain.rng 2010-09-28
14:34:40.626234752 -0300
@@ -1619,6 +1619,11 @@
<empty/>
</element>
</optional>
+ <optional>
+ <element name="nesting">
+ <empty/>
+ </element>
+ </optional>
</interleave>
</element>
</optional>
diff -Naur libvirt-0.8.4/src/conf/domain_conf.c
libvirt-0.8.4.edu/src/conf/domain_conf.c
--- libvirt-0.8.4/src/conf/domain_conf.c 2010-08-31
10:44:13.000000000 -0300
+++ libvirt-0.8.4.edu/src/conf/domain_conf.c 2010-09-28
14:35:36.069149447 -0300
@@ -75,7 +75,8 @@
VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
"acpi",
"apic",
- "pae")
+ "pae",
+ "nesting")
VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_LAST,
"destroy",
diff -Naur libvirt-0.8.4/src/conf/domain_conf.h
libvirt-0.8.4.edu/src/conf/domain_conf.h
--- libvirt-0.8.4/src/conf/domain_conf.h 2010-08-31
10:44:13.000000000 -0300
+++ libvirt-0.8.4.edu/src/conf/domain_conf.h 2010-09-28
14:36:11.931054102 -0300
@@ -650,6 +650,7 @@
VIR_DOMAIN_FEATURE_ACPI,
VIR_DOMAIN_FEATURE_APIC,
VIR_DOMAIN_FEATURE_PAE,
+ VIR_DOMAIN_FEATURE_NESTING,
VIR_DOMAIN_FEATURE_LAST
};
diff -Naur libvirt-0.8.4/src/qemu/qemu_conf.c
libvirt-0.8.4.edu/src/qemu/qemu_conf.c
--- libvirt-0.8.4/src/qemu/qemu_conf.c 2010-09-10 09:38:13.000000000 -0300
+++ libvirt-0.8.4.edu/src/qemu/qemu_conf.c 2010-09-28
14:38:36.218612249 -0300
@@ -1192,6 +1192,8 @@
flags |= QEMUD_CMD_FLAG_MEM_PATH;
if (strstr(help, "-chardev"))
flags |= QEMUD_CMD_FLAG_CHARDEV;
+ if (strstr(help, "-enable-nesting"))
+ flags |= QEMUD_CMD_FLAG_NESTING;
if (strstr(help, "-balloon"))
flags |= QEMUD_CMD_FLAG_BALLOON;
if (strstr(help, "-device"))
@@ -3944,6 +3946,9 @@
goto error;
}
}
+ if ((qemuCmdFlags & QEMUD_CMD_FLAG_NESTING) &&
+ (def->features & (1 << VIR_DOMAIN_FEATURE_NESTING)))
+ ADD_ARG_LIT("-enable-nesting");
/*
* NB, -nographic *MUST* come before any serial, or monitor
@@ -6303,6 +6308,8 @@
fullscreen = 1;
} else if (STREQ(arg, "-localtime")) {
def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME;
+ } else if (STREQ(arg, "-enable-nesting")) {
+ def->features |= (1 << VIR_DOMAIN_FEATURE_NESTING);
} else if (STREQ(arg, "-kernel")) {
WANT_VALUE();
if (!(def->os.kernel = strdup(val)))
diff -Naur libvirt-0.8.4/src/qemu/qemu_conf.h
libvirt-0.8.4.edu/src/qemu/qemu_conf.h
--- libvirt-0.8.4/src/qemu/qemu_conf.h 2010-08-31 10:44:13.000000000 -0300
+++ libvirt-0.8.4.edu/src/qemu/qemu_conf.h 2010-09-28
14:38:58.739788135 -0300
@@ -93,6 +93,8 @@
QEMUD_CMD_FLAG_NODEFCONFIG = (1LL << 37), /* -nodefconfig */
QEMUD_CMD_FLAG_BOOT_MENU = (1LL << 38), /* -boot menu=on
support */
QEMUD_CMD_FLAG_ENABLE_KQEMU = (1LL << 39), /* -enable-kqemu flag */
+ QEMUD_CMD_FLAG_NESTING = (1LL << 39), /* Is the
-enable-nesting flag available */
+
};
/* Main driver state */
--
*Eduardo Ramos*
www.freedominterface.org
+55 12 91051687
exten=>eduardo,1,hangup()
14 years, 2 months
[libvirt] [PATCH] Added new attribute exportfs_type to filesystem element
by Harsh Prateek Bora
This patch introduces a new attribute export_fs to the filesystem
element which specifies the type of export. Currently only 'local'
type of exported filesystem is supported. More types like NFS, clusterFS, etc.
can be added later as required.
Note: This patch is based on the following two patches:
1) Daniel's patch to support 9pfs:
https://www.redhat.com/archives/libvir-list/2010-September/msg00358.html
2) Another related patch to support 'security_model' attribute:
https://www.redhat.com/archives/libvir-list/2010-September/msg00435.html
Signed-off-by: Harsh Prateek Bora <harsh(a)linux.vnet.ibm.com>
---
docs/schemas/domain.rng | 5 +++++
src/conf/domain_conf.c | 24 ++++++++++++++++++++++--
src/conf/domain_conf.h | 9 +++++++++
src/qemu/qemu_conf.c | 3 ++-
4 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 43a292d..5b7563a 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -768,6 +768,11 @@
<value>none</value>
</choice>
</attribute>
+ <attribute name="exportfs_type">
+ <choice>
+ <value>local</value>
+ </choice>
+ </attribute>
</optional>
</element>
</define>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a9881d1..6d728a7 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -166,6 +166,8 @@ VIR_ENUM_IMPL(virDomainFSSecurityModel, VIR_DOMAIN_FS_SECURITY_LAST,
"mapped",
"none")
+VIR_ENUM_IMPL(virDomainFSExportType, VIR_DOMAIN_FS_EXPORT_TYPE_LAST,
+ "local")
VIR_ENUM_IMPL(virDomainNet, VIR_DOMAIN_NET_TYPE_LAST,
"user",
@@ -1851,6 +1853,7 @@ virDomainFSDefParseXML(xmlNodePtr node,
virDomainFSDefPtr def;
xmlNodePtr cur;
char *type = NULL;
+ char *exportfs_type = NULL;
char *source = NULL;
char *target = NULL;
char *security_model;
@@ -1871,6 +1874,17 @@ virDomainFSDefParseXML(xmlNodePtr node,
def->type = VIR_DOMAIN_FS_TYPE_MOUNT;
}
+ exportfs_type = virXMLPropString(node, "exportfs_type");
+ if (exportfs_type) {
+ if ((def->exportfs_type = virDomainFSExportTypeTypeFromString(exportfs_type)) < 0) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unknown exportfs type '%s'"), exportfs_type);
+ goto error;
+ }
+ } else {
+ def->exportfs_type = VIR_DOMAIN_FS_EXPORT_TYPE_LOCAL;
+ }
+
security_model = virXMLPropString(node, "security_model");
if (security_model) {
if ((def->security_model = virDomainFSSecurityModelTypeFromString(security_model)) < 0) {
@@ -5621,6 +5635,7 @@ virDomainFSDefFormat(virBufferPtr buf,
{
const char *type = virDomainFSTypeToString(def->type);
const char *sec_model = virDomainFSSecurityModelTypeToString(def->security_model);
+ const char *expfs_type = virDomainFSExportTypeTypeToString(def->exportfs_type);
if (!type) {
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
@@ -5628,6 +5643,11 @@ virDomainFSDefFormat(virBufferPtr buf,
return -1;
}
+ if (!expfs_type) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unexpected exportfs type %d"), def->type);
+ }
+
if (!sec_model) {
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected security model %d"), def->security_model);
@@ -5636,8 +5656,8 @@ virDomainFSDefFormat(virBufferPtr buf,
virBufferVSprintf(buf,
- " <filesystem type='%s' security_model='%s'>\n",
- type, sec_model);
+ " <filesystem type='%s' exportfs_type='%s' security_model='%s'>\n",
+ type, expfs_type, sec_model);
if (def->src) {
switch (def->type) {
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 6adf027..956cac0 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -245,10 +245,18 @@ enum virDomainFSSecurityModel {
VIR_DOMAIN_FS_SECURITY_LAST
};
+/* Export Filesystem Type */
+enum virDomainFSExportType {
+ VIR_DOMAIN_FS_EXPORT_TYPE_LOCAL,
+
+ VIR_DOMAIN_FS_EXPORT_TYPE_LAST
+};
+
typedef struct _virDomainFSDef virDomainFSDef;
typedef virDomainFSDef *virDomainFSDefPtr;
struct _virDomainFSDef {
int type;
+ int exportfs_type;
int security_model;
char *src;
char *dst;
@@ -1177,6 +1185,7 @@ VIR_ENUM_DECL(virDomainDiskErrorPolicy)
VIR_ENUM_DECL(virDomainController)
VIR_ENUM_DECL(virDomainControllerModel)
VIR_ENUM_DECL(virDomainFS)
+VIR_ENUM_DECL(virDomainFSExportType)
VIR_ENUM_DECL(virDomainNet)
VIR_ENUM_DECL(virDomainChrDevice)
VIR_ENUM_DECL(virDomainChrChannelTarget)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 6b96d2f..458beab 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -2788,7 +2788,8 @@ char *qemuBuildFSStr(virDomainFSDefPtr fs,
goto error;
}
- virBufferAddLit(&opt, "local");
+ if (fs->exportfs_type == VIR_DOMAIN_FS_EXPORT_TYPE_LOCAL)
+ virBufferAddLit(&opt, "local");
if (fs->security_model == VIR_DOMAIN_FS_SECURITY_PASSTHROUGH)
virBufferAddLit(&opt, ",security_model=passthrough");
else if (fs->security_model == VIR_DOMAIN_FS_SECURITY_MAPPED)
--
1.7.1.1
14 years, 2 months
[libvirt] The last two remaining "out of the box" build failures for OS X
by Justin Clift
Hi all,
On the home straight getting libvirt to work "out of the box" on MacOS
X. (ideal scenario: it's "good enough" today. :>)
With the very latest git snapshot, to get a working compile requires
these options to be used:
./configure --without-network --without-storage-fs
Leaving either of the network or storage-fs options not explicitly
disabled, causes failure during compilation.
Wondering if these two or fundamentally Linux specific things, so we
should update our configure.ac to not attempt them on non-Linux, or do
they indicate actual problem(s)?
***********************************************************************
***********************************************************************
The remainder of this email is kind of lengthy, giving info on the
specific errors caused by each of the above options. Feel free to
ignore this if it's of no interest. :)
+ Leaving off --without-network gives
***********************************************************************
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gnulib/lib -I../gnulib/lib
-I../include -I../src/util -I../include -I/usr/include/libxml2
-DLIBDIR=\"/opt/libvirt/lib\" -DBINDIR=\"/opt/libvirt/libexec\"
-DSBINDIR=\"/opt/libvirt/sbin\" -DSYSCONF_DIR=\"/opt/libvirt/etc\"
-DLOCALEBASEDIR=\"/opt/libvirt/share/locale\"
-DPKGDATADIR=\"/opt/libvirt/share/libvirt\"
-DLOCAL_STATE_DIR=\"/opt/libvirt/var\" -DGETTEXT_PACKAGE=\"libvirt\"
-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables -fdiagnostics-show-option -DIN_LIBVIRT -g
-O2 -MT libvirt_util_la-bridge.lo -MD -MP -MF
.deps/libvirt_util_la-bridge.Tpo -c util/bridge.c -fno-common -DPIC -o
.libs/libvirt_util_la-bridge.o
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gnulib/lib -I../gnulib/lib
-I../include -I../src/util -I../include -I/usr/include/libxml2
-DLIBDIR=\"/opt/libvirt/lib\" -DBINDIR=\"/opt/libvirt/libexec\"
-DSBINDIR=\"/opt/libvirt/sbin\" -DSYSCONF_DIR=\"/opt/libvirt/etc\"
-DLOCALEBASEDIR=\"/opt/libvirt/share/locale\"
-DPKGDATADIR=\"/opt/libvirt/share/libvirt\"
-DLOCAL_STATE_DIR=\"/opt/libvirt/var\" -DGETTEXT_PACKAGE=\"libvirt\"
-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables -fdiagnostics-show-option -DIN_LIBVIRT -g
-O2 -MT libvirt_util_la-buf.lo -MD -MP -MF .deps/libvirt_util_la-buf.Tpo
-c util/buf.c -fno-common -DPIC -o .libs/libvirt_util_la-buf.o
In file included from util/bridge.h:29,
from util/bridge.c:26:
/usr/include/net/if.h:264: error: field 'ifru_addr' has incomplete type
/usr/include/net/if.h:265: error: field 'ifru_dstaddr' has incomplete type
/usr/include/net/if.h:266: error: field 'ifru_broadaddr' has incomplete type
/usr/include/net/if.h:305: error: field 'ifra_addr' has incomplete type
/usr/include/net/if.h:306: error: field 'ifra_broadaddr' has incomplete type
/usr/include/net/if.h:307: error: field 'ifra_mask' has incomplete type
/usr/include/net/if.h:379: error: field 'addr' has incomplete type
/usr/include/net/if.h:380: error: field 'dstaddr' has incomplete type
util/bridge.c:41:55: error: linux/param.h: No such file or directory
util/bridge.c:42:55: error: linux/sockios.h: No such file or directory
util/bridge.c:43:55: error: linux/if_bridge.h: No such file or directory
util/bridge.c:44:55: error: linux/if_tun.h: No such file or directory
util/bridge.c: In function 'ifSetInterfaceMac':
util/bridge.c:311: error: 'SIOCGIFHWADDR' undeclared (first use in this
function)
util/bridge.c:311: error: (Each undeclared identifier is reported only once
util/bridge.c:311: error: for each function it appears in.)
util/bridge.c:314: error: 'struct ifreq' has no member named 'ifr_hwaddr'
util/bridge.c:314: error: 'struct ifreq' has no member named 'ifr_hwaddr'
util/bridge.c:314: error: 'struct ifreq' has no member named 'ifr_hwaddr'
util/bridge.c:314: error: 'struct ifreq' has no member named 'ifr_hwaddr'
util/bridge.c:316: error: 'SIOCSIFHWADDR' undeclared (first use in this
function)
util/bridge.c: In function 'brAddTap':
util/bridge.c:498: error: 'IFF_TAP' undeclared (first use in this function)
util/bridge.c:498: error: 'IFF_NO_PI' undeclared (first use in this
function)
util/bridge.c:512: error: 'TUNSETIFF' undeclared (first use in this
function)
util/bridge.c:534: error: 'TUNSETPERSIST' undeclared (first use in this
function)
util/bridge.c: In function 'brDeleteTap':
util/bridge.c:564: error: 'IFF_TAP' undeclared (first use in this function)
util/bridge.c:564: error: 'IFF_NO_PI' undeclared (first use in this
function)
util/bridge.c:571: error: 'TUNSETIFF' undeclared (first use in this
function)
util/bridge.c:572: error: 'TUNSETPERSIST' undeclared (first use in this
function)
make[3]: *** [libvirt_util_la-bridge.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gnulib/lib -I../gnulib/lib
-I../include -I../src/util -I../include -I/usr/include/libxml2
-DLIBDIR=\"/opt/libvirt/lib\" -DBINDIR=\"/opt/libvirt/libexec\"
-DSBINDIR=\"/opt/libvirt/sbin\" -DSYSCONF_DIR=\"/opt/libvirt/etc\"
-DLOCALEBASEDIR=\"/opt/libvirt/share/locale\"
-DPKGDATADIR=\"/opt/libvirt/share/libvirt\"
-DLOCAL_STATE_DIR=\"/opt/libvirt/var\" -DGETTEXT_PACKAGE=\"libvirt\"
-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables -fdiagnostics-show-option -DIN_LIBVIRT -g
-O2 -MT libvirt_util_la-buf.lo -MD -MP -MF .deps/libvirt_util_la-buf.Tpo
-c util/buf.c -o libvirt_util_la-buf.o >/dev/null 2>&1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
$
***********************************************************************
+ Leaving off --without-storage-fs gives
***********************************************************************
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gnulib/lib -I../gnulib/lib
-I../include -I../src/util -I../include -I/usr/include/libxml2
-DLIBDIR=\"/opt/libvirt/lib\" -DBINDIR=\"/opt/libvirt/libexec\"
-DSBINDIR=\"/opt/libvirt/sbin\" -DSYSCONF_DIR=\"/opt/libvirt/etc\"
-DLOCALEBASEDIR=\"/opt/libvirt/share/locale\"
-DPKGDATADIR=\"/opt/libvirt/share/libvirt\"
-DLOCAL_STATE_DIR=\"/opt/libvirt/var\" -DGETTEXT_PACKAGE=\"libvirt\"
-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables -fdiagnostics-show-option -DIN_LIBVIRT
-I../src/conf -g -O2 -MT libvirt_driver_storage_la-storage_backend_fs.lo
-MD -MP -MF .deps/libvirt_driver_storage_la-storage_backend_fs.Tpo -c
storage/storage_backend_fs.c -fno-common -DPIC -o
.libs/libvirt_driver_storage_la-storage_backend_fs.o
storage/storage_backend_fs.c:145:21: error: mntent.h: No such file or
directory
storage/storage_backend_fs.c: In function
'virStorageBackendFileSystemIsMounted':
storage/storage_backend_fs.c:274: error: storage size of 'ent' isn't known
storage/storage_backend_fs.c:277: error: '_PATH_MOUNTED' undeclared
(first use in this function)
storage/storage_backend_fs.c:277: error: (Each undeclared identifier is
reported only once
storage/storage_backend_fs.c:277: error: for each function it appears in.)
storage/storage_backend_fs.c:284: warning: implicit declaration of
function 'getmntent_r'
storage/storage_backend_fs.c:284: warning: nested extern declaration of
'getmntent_r' [-Wnested-externs]
storage/storage_backend_fs.c:284: warning: comparison between pointer
and integer
storage/storage_backend_fs.c:274: warning: unused variable 'ent'
[-Wunused-variable]
make[3]: *** [libvirt_driver_storage_la-storage_backend_fs.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
$
This one kind of looked like it almost got through the compile stage. ;)
***********************************************************************
14 years, 2 months