[libvirt] [PATCH v2 for 1.2.6] build: link libvirt_conf with libxml
by Martin Kletzander
Since there is code using functions from the libxml library,
libvirt_conf should have that in LIBADD so it can be linked against
even without libvirt_util (which usually deals with the error itself,
since libvirt_util has libxml in LIBADD). The same applies to
storage_backend.c.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
This is a v2 of:
https://www.redhat.com/archives/libvir-list/2014-June/msg01322.html
If this gets ACKed for th 1.2.6 release, please push this as well
since I won't be available before DV makes the release, thank you.
---
src/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 35720be..047d4c6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -991,6 +991,7 @@ libvirt_la_BUILT_LIBADD += libvirt_conf.la
libvirt_conf_la_SOURCES = $(CONF_SOURCES)
libvirt_conf_la_CFLAGS = $(AM_CFLAGS)
libvirt_conf_la_LDFLAGS = $(AM_LDFLAGS)
+libvirt_conf_la_LIBADD = $(LIBXML_LIBS)
noinst_LTLIBRARIES += libvirt_cpu.la
libvirt_la_BUILT_LIBADD += libvirt_cpu.la
@@ -1452,7 +1453,7 @@ libvirt_driver_storage_impl_la_CFLAGS = \
$(AM_CFLAGS)
libvirt_driver_storage_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_storage_impl_la_LIBADD =
-libvirt_driver_storage_impl_la_LIBADD += $(SECDRIVER_LIBS)
+libvirt_driver_storage_impl_la_LIBADD += $(SECDRIVER_LIBS) $(LIBXML_LIBS)
if WITH_BLKID
libvirt_driver_storage_impl_la_CFLAGS += $(BLKID_CFLAGS)
libvirt_driver_storage_impl_la_LIBADD += $(BLKID_LIBS)
--
2.0.0
10 years, 4 months
[libvirt] [PATCH 0/4] Report less errors
by Ján Tomko
Some are distracting and not really helpful.
Ján Tomko (4):
Track privileged state in udev nodedev driver
Only detect PCI Express devices as root in udev nodedev driver
Introduce virFileReadAllQuiet
Report one error less when getting net dev speed
src/libvirt_private.syms | 1 +
src/node_device/node_device_udev.c | 10 ++++++++--
src/util/virfile.c | 15 +++++++++++++++
src/util/virfile.h | 2 ++
src/util/virnetdev.c | 7 ++++---
5 files changed, 30 insertions(+), 5 deletions(-)
--
1.8.5.5
10 years, 4 months
[libvirt] [PATCH for 1.2.6] vboxsnapshotxmltest: Don't write to a file in abs_srcdir
by Michal Privoznik
In the test, the snapshot XML is written into a file that's located
under:
abs_srcdir/vboxsnapshotxmldata/testResult.vbox
However, the abs_srcdir doesn't have to be necessarily writable. It
should have been abs_builddir instead. Moreover, the label in the func
creating the file is called 'fail' while it fulfils the duty of
'cleanup' label.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/vboxsnapshotxmltest.c | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/tests/vboxsnapshotxmltest.c b/tests/vboxsnapshotxmltest.c
index 7795688..85ef96a 100644
--- a/tests/vboxsnapshotxmltest.c
+++ b/tests/vboxsnapshotxmltest.c
@@ -59,42 +59,47 @@ testCompareXMLtoXMLFiles(const char *xml)
char *pathResult = NULL;
int ret = -1;
virVBoxSnapshotConfMachinePtr machine = NULL;
- if (virAsprintf(&pathResult, "%s/vboxsnapshotxmldata/testResult.vbox",
- abs_srcdir) < 0)
+
+ if (VIR_STRDUP(pathResult,
+ abs_builddir "/vboxsnapshotxmldata/testResult.vbox") < 0)
return -1;
+ if (virFileMakePath(abs_builddir "/vboxsnapshotxmldata") < 0)
+ goto cleanup;
+
if (virtTestLoadFile(xml, &xmlData) < 0)
- goto fail;
+ goto cleanup;
if (!(machine = virVBoxSnapshotConfLoadVboxFile(xml, (char*)"")))
- goto fail;
+ goto cleanup;
if (virVBoxSnapshotConfSaveVboxFile(machine, pathResult) < 0)
- goto fail;
+ goto cleanup;
if (virtTestLoadFile(pathResult, &actual) < 0)
- goto fail;
+ goto cleanup;
if (unlink(pathResult) < 0)
- goto fail;
+ goto cleanup;
if (!(actual = testFilterXML(actual)))
- goto fail;
+ goto cleanup;
if (!(xmlData = testFilterXML(xmlData)))
- goto fail;
+ goto cleanup;
if (STRNEQ(actual, xmlData)) {
virtTestDifference(stderr, xmlData, actual);
- goto fail;
+ goto cleanup;
}
ret = 0;
- fail:
+ cleanup:
VIR_FREE(xmlData);
VIR_FREE(actual);
virVBoxSnapshotConfMachineFree(machine);
VIR_FREE(pathResult);
+ rmdir(abs_builddir "/vboxsnapshotxmldata");
return ret;
}
--
1.8.5.5
10 years, 4 months
[libvirt] run domain in paused state
by Vasiliy Tolstov
Hi all. I need to construct domain, run it in paused state , attach
some devices and unpause it.
How can i do that in libvirt api (i'm use ruby).
As i see virsh have start --paused option, but how can i specify state
in domain xml?
--
Vasiliy Tolstov,
e-mail: v.tolstov(a)selfip.ru
jabber: vase(a)selfip.ru
10 years, 4 months
[libvirt] [PATCH for 1.2.6] securityselinuxlabeltest: Don't create dummy file in the srcdir
by Michal Privoznik
At the very beginning of the test we check if the underlying
filesystem supports extended attributes as they are used to store fake
SELinux labels. In order to check that, a dummy file is created and
semi-random attribute is set. However, the file is created under:
abs_srcdir "/securityselinuxlabeldata/testxattr"
which has two problems: abs_srcdir is not required to be writable, so
it should have been abs_builddir. The second one is - there's no
"securityselinuxlabeldata" folder under abs_builddir. The problem was
introduced in caf164f1.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/securityselinuxlabeltest.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c
index 3699d89..455eb74 100644
--- a/tests/securityselinuxlabeltest.c
+++ b/tests/securityselinuxlabeltest.c
@@ -65,10 +65,11 @@ testUserXattrEnabled(void)
const char *con_value = "system_u:object_r:svirt_image_t:s0:c41,c264";
char *path = NULL;
if (virAsprintf(&path, "%s/securityselinuxlabeldata/testxattr",
- abs_srcdir) < 0)
+ abs_builddir) < 0)
goto cleanup;
- if (virFileTouch(path, 0600) < 0)
+ if (virFileMakePath(abs_builddir "/securityselinuxlabeldata") < 0 ||
+ virFileTouch(path, 0600) < 0)
goto cleanup;
len = setxattr(path, "user.libvirt.selinux", con_value,
@@ -83,6 +84,7 @@ testUserXattrEnabled(void)
cleanup:
unlink(path);
+ rmdir(abs_builddir "/securityselinuxlabeldata");
VIR_FREE(path);
return ret;
}
--
1.8.5.5
10 years, 4 months
[libvirt] Facing problems in running QEMU guest agents in Windows 2008 guest machine.
by Puneet Bakshi
Hi,
I have a CenOS host machine running KVM and a Windows 2008 guest machine. I
am able to run "qemu-monitor-command" but not "qemu-agent-command".
[root@sdsr720-14 Windows_ISO]# virsh qemu-monitor-command --hmp vm_win_05
'info network'
Devices not on any VLAN:
hostnet0: fd=23 peer=net0
net0: model=virtio-net-pci,macaddr=52:54:00:7f:4a:5b peer=hostnet0
[root@sdsr720-14 Windows_ISO]# virsh qemu-agent-command vm_win_05
'{"execute":"guest-ping"}'
[root@sdsr720-14 Windows_ISO]#
[QEMU guest installation]
To install QEMU guest agent, I followed steps mentioned at following URL
http://wiki.qemu.org/Features/QAPI/GuestAgent#Example_usage
[Problem-1]
"qemu-ga.exe -s install" runs silently, "net start qemu-ga" gave error.
Following is the snippet from Windows shell.
PS C:\puneet> .\qemu-ga.exe -s install
PS C:\puneet> net start qemu-ga
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
PS C:\puneet>[root@sdsr720-14 Windows_ISO]#
[Problem-2]
When I double click the "qemu-ga.exe", it gives the following error.
"The application was unable to start correctly (0xc000007b). Click Ok to
close the application."
I tried some other possible ways also but could not get them working.
Regards,
~Puneet
10 years, 4 months
[libvirt] [PATCH] virsh: enable list inactive domain when using 'list --[no-]autostart
by Chen Hanxiao
This patch could let us know which domains are marked
as [no]autostart without starting them.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
tools/virsh-domain-monitor.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 8bd58ad..779b67b 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1869,8 +1869,10 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
FILTER("with-managed-save", VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE);
FILTER("without-managed-save", VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE);
- FILTER("autostart", VIR_CONNECT_LIST_DOMAINS_AUTOSTART);
- FILTER("no-autostart", VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART);
+ FILTER("autostart", VIR_CONNECT_LIST_DOMAINS_AUTOSTART |
+ VIR_CONNECT_LIST_DOMAINS_INACTIVE);
+ FILTER("no-autostart", VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART |
+ VIR_CONNECT_LIST_DOMAINS_INACTIVE);
FILTER("with-snapshot", VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT);
FILTER("without-snapshot", VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT);
--
1.9.0
10 years, 4 months
[libvirt] [PATCH] qemu: raise an error when trying to use readonly ide disks
by Giuseppe Scrivano
The IDE bus doesn't support readonly disks, so inform the user with an
error message instead of let qemu fail with a more obscure "Device
'ide-hd' could not be initialized" error message.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1112939
Signed-off-by: Giuseppe Scrivano <gscrivan(a)redhat.com>
---
src/qemu/qemu_command.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 63f322a..4829176 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3385,8 +3385,15 @@ qemuBuildDriveStr(virConnectPtr conn,
disk->bus != VIR_DOMAIN_DISK_BUS_IDE)
virBufferAddLit(&opt, ",boot=on");
if (disk->readonly &&
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_READONLY))
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_READONLY)) {
+ if (disk->bus == VIR_DOMAIN_DISK_BUS_IDE &&
+ disk->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("readonly ide disks are not supported"));
+ goto error;
+ }
virBufferAddLit(&opt, ",readonly=on");
+ }
if (disk->transient) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("transient disks not supported yet"));
--
1.9.3
10 years, 4 months
[libvirt] [PATCHv4 00/29] (for 1.2.7) qemu: Refactor handling of disk image metadata
by Peter Krempa
This is meant for the 1.2.7 release as we are currently in freeze for 1.2.6.
This version incorporates feedback from Eric's review and adds a ton of new stuff.
Peter Krempa (29):
storage: Implement virStorageFileCreate for local and gluster files
qemu: Don't propagate whole disk definition into qemuDomainGetImageIds
qemu: Add helper to initialize storage file backend with correct
uid/gid
storage: file: Tolerate NULL src when uninitializing the backend
conf: Don't output seclabels for backingStore elements
storage: Move readonly and shared flags to disk source from disk def
util: storagefile: Add deep copy for struct virStorageSource
util: storage: Add helper to determine whether storage is local
util: storage: Add function to transfer config parts to new chain
element
util: storage: Copy parent's disk metadata to backing chain elements
util: cgroup: Add helper to convert device mode to string
qemu: cgroup: Add functions to set cgroup image stuff on individual
imgs
qemu: cgroup: Setup only the top level disk image for read-write
access
locking: Add APIs to lock individual image files
security: Introduce APIs to label single images
security: selinux: Implement per-image seclabel restore
security: selinux: Implement per-image seclabel set
security: DAC: Implement per-image seclabel restore
security: DAC: Implement per-image seclabel set
security: AppArmor: Implement per-image seclabel restore
security: AppArmor: Implement per-image seclabel set
util: storage: Make virStorageFileChainLookup more network storage
aware
util: storage: Return complete parent info from
virStorageFileChainLookup
qemu: blockcopy: Use the mirror disk source to label the files
qemu: block: Properly track disk source while pivotting to new image
qemu: snapshot: Improve approach to deal with snapshot metadata
qemu: Refactor qemuDomainPrepareDiskChainElement
qemu: snapshot: Refactor image labelling of new snapshot files
qemu: snapshot: Use storage driver to pre-create snapshot file
src/conf/domain_conf.c | 77 +++++---
src/conf/domain_conf.h | 2 -
src/libvirt_private.syms | 8 +
src/libxl/libxl_conf.c | 2 +-
src/locking/domain_lock.c | 65 ++++---
src/locking/domain_lock.h | 8 +
src/lxc/lxc_cgroup.c | 2 +-
src/lxc/lxc_controller.c | 2 +-
src/lxc/lxc_driver.c | 2 +-
src/qemu/qemu_cgroup.c | 109 ++++++-----
src/qemu/qemu_cgroup.h | 3 +
src/qemu/qemu_command.c | 14 +-
src/qemu/qemu_conf.c | 4 +-
src/qemu/qemu_domain.c | 29 ++-
src/qemu/qemu_domain.h | 4 +
src/qemu/qemu_driver.c | 349 +++++++++++-----------------------
src/qemu/qemu_migration.c | 16 +-
src/security/security_apparmor.c | 55 ++++--
src/security/security_dac.c | 111 +++++------
src/security/security_driver.h | 10 +
src/security/security_manager.c | 56 ++++++
src/security/security_manager.h | 7 +
src/security/security_nop.c | 19 ++
src/security/security_selinux.c | 150 +++++++++------
src/security/security_stack.c | 38 ++++
src/security/virt-aa-helper.c | 2 +-
src/storage/storage_backend_fs.c | 17 ++
src/storage/storage_backend_gluster.c | 28 +++
src/storage/storage_driver.c | 2 +-
src/util/vircgroup.c | 62 ++++--
src/util/vircgroup.h | 2 +
src/util/virstoragefile.c | 300 ++++++++++++++++++++++++++---
src/util/virstoragefile.h | 15 +-
src/vbox/vbox_tmpl.c | 30 +--
src/xenxs/xen_sxpr.c | 10 +-
src/xenxs/xen_xm.c | 10 +-
tests/virstoragetest.c | 86 ++++-----
37 files changed, 1097 insertions(+), 609 deletions(-)
--
1.9.3
10 years, 4 months
[libvirt] Build failed in Jenkins: libvirt-syntax-check #2434
by Jenkins CI
See <http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/2434/>
------------------------------------------
Started by upstream project "libvirt-build" build number 2747
Building on master in workspace <http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/ws/>
[workspace] $ /bin/sh -xe /tmp/hudson2596201862121310184.sh
+ make syntax-check
GEN bracket-spacing-check
GFDL_version
0.53 GFDL_version
TAB_in_indentation
0.51 TAB_in_indentation
Wundef_boolean
0.22 Wundef_boolean
avoid_attribute_unused_in_header
0.31 avoid_attribute_unused_in_header
avoid_ctype_macros
0.69 avoid_ctype_macros
avoid_if_before_free
6.16 avoid_if_before_free
avoid_strcase
0.79 avoid_strcase
avoid_write
0.33 avoid_write
bindtextdomain
0.27 bindtextdomain
cast_of_argument_to_free
0.61 cast_of_argument_to_free
cast_of_x_alloc_return_value
0.55 cast_of_x_alloc_return_value
changelog
0.21 changelog
const_long_option
0.53 const_long_option
copyright_check
0.69 copyright_check
copyright_format
1.77 copyright_format
copyright_usage
1.46 copyright_usage
correct_id_types
0.68 correct_id_types
curly_braces_style
0.85 curly_braces_style
error_message_period
0.44 error_message_period
error_message_warn_fatal
0.45 error_message_warn_fatal
flags_debug
1.12 flags_debug
flags_usage
1.09 flags_usage
forbid_const_pointer_typedef
1.15 forbid_const_pointer_typedef
forbid_manual_xml_indent
0.53 forbid_manual_xml_indent
libvirt_unmarked_diagnostics
1.72 libvirt_unmarked_diagnostics
m4_quote_check
0.24 m4_quote_check
makefile_TAB_only_indentation
0.26 makefile_TAB_only_indentation
makefile_at_at_check
0.20 makefile_at_at_check
makefile_conditionals
0.26 makefile_conditionals
po_check
14.88 po_check
preprocessor_indentation
0.65 preprocessor_indentation
prohibit_HAVE_MBRTOWC
0.74 prohibit_HAVE_MBRTOWC
prohibit_PATH_MAX
0.60 prohibit_PATH_MAX
prohibit_VIR_ERR_NO_MEMORY
0.57 prohibit_VIR_ERR_NO_MEMORY
prohibit_access_xok
0.59 prohibit_access_xok
prohibit_always-defined_macros
1.99 prohibit_always-defined_macros
prohibit_always_true_header_tests
0.83 prohibit_always_true_header_tests
prohibit_argmatch_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 25 items to stdout: Broken pipe
sed: couldn't write 57 items to stdout: Broken pipe
0.44 prohibit_argmatch_without_use
prohibit_asprintf
1.39 prohibit_asprintf
prohibit_assert_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 51 items to stdout: Broken pipe
sed: couldn't write 65 items to stdout: Broken pipe
0.48 prohibit_assert_without_use
prohibit_atoi
0.76 prohibit_atoi
prohibit_backup_files
0.16 prohibit_backup_files
prohibit_c_ctype_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 25 items to stdout: Broken pipe
sed: couldn't write 57 items to stdout: Broken pipe
0.45 prohibit_c_ctype_without_use
prohibit_canonicalize_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 25 items to stdout: Broken pipe
sed: couldn't write 57 items to stdout: Broken pipe
0.49 prohibit_canonicalize_without_use
prohibit_cloexec_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 38 items to stdout: Broken pipe
sed: couldn't write 54 items to stdout: Broken pipe
0.85 prohibit_cloexec_without_use
prohibit_close
1.58 prohibit_close
prohibit_close_stream_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 25 items to stdout: Broken pipe
sed: couldn't write 57 items to stdout: Broken pipe
0.43 prohibit_close_stream_without_use
prohibit_config_h_in_headers
0.32 prohibit_config_h_in_headers
prohibit_cross_inclusion
8.51 prohibit_cross_inclusion
prohibit_ctype_h
0.67 prohibit_ctype_h
prohibit_cvs_keyword
0.66 prohibit_cvs_keyword
prohibit_defined_have_decl_tests
0.79 prohibit_defined_have_decl_tests
prohibit_diagnostic_without_format
1.72 prohibit_diagnostic_without_format
prohibit_dirent_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 57 items to stdout: Broken pipe
sed: couldn't write 52 items to stdout: Broken pipe
0.50 prohibit_dirent_without_use
prohibit_doubled_word
6.65 prohibit_doubled_word
prohibit_duplicate_header
13.42 prohibit_duplicate_header
prohibit_empty_first_line
1.95 prohibit_empty_first_line
prohibit_empty_lines_at_EOF
0.95 prohibit_empty_lines_at_EOF
prohibit_error_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 69 items to stdout: Broken pipe
sed: couldn't write 64 items to stdout: Broken pipe
0.95 prohibit_error_without_use
prohibit_exit_in_tests
0.85 prohibit_exit_in_tests
prohibit_fork_wrappers
1.20 prohibit_fork_wrappers
prohibit_getenv
0.70 prohibit_getenv
prohibit_gethostby
0.64 prohibit_gethostby
prohibit_gethostname
0.67 prohibit_gethostname
prohibit_getopt_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 25 items to stdout: Broken pipe
sed: couldn't write 57 items to stdout: Broken pipe
0.46 prohibit_getopt_without_use
prohibit_gettext_markup
0.70 prohibit_gettext_markup
prohibit_gettext_noop
0.68 prohibit_gettext_noop
prohibit_hash_pjw_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 25 items to stdout: Broken pipe
sed: couldn't write 57 items to stdout: Broken pipe
0.41 prohibit_hash_pjw_without_use
prohibit_have_config_h
0.64 prohibit_have_config_h
prohibit_ignore_value_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 25 items to stdout: Broken pipe
sed: couldn't write 57 items to stdout: Broken pipe
0.45 prohibit_ignore_value_without_use
prohibit_include_public_headers_brackets
0.49 prohibit_include_public_headers_brackets
prohibit_include_public_headers_quote
0.46 prohibit_include_public_headers_quote
prohibit_int_ijk
0.93 prohibit_int_ijk
prohibit_internal_functions
0.82 prohibit_internal_functions
prohibit_intprops_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 25 items to stdout: Broken pipe
sed: couldn't write 57 items to stdout: Broken pipe
0.47 prohibit_intprops_without_use
prohibit_inttostr_without_use
grep: write error
grep: write error
/bin/sed: couldn't write 51 items to stdout: Broken pipe
sed: couldn't write 65 items to stdout: Broken pipe
0.41 prohibit_inttostr_without_use
prohibit_libgen
0.95 prohibit_libgen
prohibit_long_lines
src/Makefile.am:1146:libvirt_driver_vbox_impl_la_LIBADD = $(DLOPEN_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS)
maint.mk: Wrap long lines in Makefiles
make: *** [sc_prohibit_long_lines] Error 1
Build step 'Execute shell' marked build as failure
10 years, 4 months