[libvirt] [PATCH] spec: Yet another permission fix for qemu dirs
by Martin Kletzander
Since we autogenerate path for QEMU guest agent into
LOCALSTATEDIR /lib/libvirt/qemu/channel/target/, the process should be
able to access that socket no matter under what user/group it is
running co you can set the user/group in qemu.conf.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146886
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
libvirt.spec.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 7f8be38..f300423 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1960,9 +1960,9 @@ exit 0
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
-%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
-%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/
-%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/target/
+%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
+%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/
+%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/target/
%dir %attr(0711, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/nvram/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
--
2.3.0
9 years, 8 months
[libvirt] [PATCH] Fix typos in messages
by Yuri Chornoivan
---
src/parallels/parallels_sdk.c | 2 +-
src/qemu/qemu_monitor_json.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index bbc26ef..36c6c5f 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -2307,7 +2307,7 @@ static int
prlsdkCheckDiskUnsupportedParams(virDomainDiskDefPtr disk)
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Only hard disks and cdroms are supported "
- "supported by parallels driver."));
+ "by parallels driver."));
return -1;
}
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index da5c14d..832f589 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1320,7 +1320,7 @@ qemuMonitorJSONUpdateVideoMemorySize(qemuMonitorPtr
mon,
case VIR_DOMAIN_VIDEO_TYPE_VGA:
if (qemuMonitorJSONGetObjectProperty(mon, path, "vgamem_mb",
&prop) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("QOM Objext '%s' has no property
'vgamem_mb'"),
+ _("QOM Object '%s' has no property
'vgamem_mb'"),
path);
return -1;
}
@@ -1329,21 +1329,21 @@
qemuMonitorJSONUpdateVideoMemorySize(qemuMonitorPtr mon,
case VIR_DOMAIN_VIDEO_TYPE_QXL:
if (qemuMonitorJSONGetObjectProperty(mon, path, "vram_size",
&prop) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("QOM Objext '%s' has no property
'vram_size'"),
+ _("QOM Object '%s' has no property
'vram_size'"),
path);
return -1;
}
video->vram = prop.val.ul / 1024;
if (qemuMonitorJSONGetObjectProperty(mon, path, "ram_size",
&prop) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("QOM Objext '%s' has no property
'ram_size'"),
+ _("QOM Object '%s' has no property
'ram_size'"),
path);
return -1;
}
video->ram = prop.val.ul / 1024;
if (qemuMonitorJSONGetObjectProperty(mon, path, "vgamem_mb",
&prop) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("QOM Objext '%s' has no property
'vgamem_mb'"),
+ _("QOM Object '%s' has no property
'vgamem_mb'"),
path);
return -1;
}
@@ -1352,7 +1352,7 @@ qemuMonitorJSONUpdateVideoMemorySize(qemuMonitorPtr
mon,
case VIR_DOMAIN_VIDEO_TYPE_VMVGA:
if (qemuMonitorJSONGetObjectProperty(mon, path, "vgamem_mb",
&prop) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("QOM Objext '%s' has no property
'vgamem_mb'"),
+ _("QOM Object '%s' has no property
'vgamem_mb'"),
path);
return -1;
}
--
1.8.5.6
9 years, 8 months
[libvirt] Reopening file descriptors
by Christopher Pereira
Hi,
I'm chasing a bug related with libvirt not being able to resume a VM
paused because of an IO Error for images stored on a gluster volume.
The bug was reported in oVirt here:
https://bugzilla.redhat.com/show_bug.cgi?id=1058300#c39
To reproduce:
1) Run a VM on a gluster volume
2) Stop the gluser volume (VM will be paused)
3) Start the gluster volume
4) virsh resume VM (will fail)
QEMU logs will say:
block I/O error in device 'drive-virtio-disk0': Transport endpoint is
not connected (107)
And VM will not be resumed.
My guess is that libvirt is not telling QEMU to reopen its file descriptors.
Can someone please confirm or fix?
9 years, 8 months
[libvirt] [PATCH 0/9] Make capacity optional when creating volumes
by Ján Tomko
If the volume has a <backingStore> or we are cloning a volume,
we don't need to know the capacity upfront.
https://bugzilla.redhat.com/show_bug.cgi?id=958510
Ján Tomko (9):
Add flags argument to virStorageVolDefParse*
Parse backingStore before capacity in volume XML
Allow parsing volumes without specifying the capacity
Allow cloning volumes with no capacity specified
Fix error messages in virStorageFileGetMetadataFromFD
Probe for capacity in virStorageBackendUpdateVolTargetInfo
Revert "Restore skipping of setting capacity"
Allow omitting volume capacity when backing store is specified
Allow creating volumes with a backing store but no capacity
src/conf/storage_conf.c | 99 ++++++++++++----------
src/conf/storage_conf.h | 15 +++-
src/esx/esx_storage_backend_vmfs.c | 4 +-
src/parallels/parallels_storage.c | 6 +-
src/phyp/phyp_driver.c | 2 +-
src/storage/storage_backend.c | 60 +++++++++----
src/storage/storage_backend.h | 5 +-
src/storage/storage_backend_disk.c | 4 +-
src/storage/storage_backend_fs.c | 17 ++--
src/storage/storage_backend_gluster.c | 2 +-
src/storage/storage_backend_logical.c | 2 +-
src/storage/storage_backend_mpath.c | 2 +-
src/storage/storage_backend_rbd.c | 6 ++
src/storage/storage_backend_scsi.c | 2 +-
src/storage/storage_backend_sheepdog.c | 6 ++
src/storage/storage_driver.c | 17 +++-
src/test/test_driver.c | 6 +-
src/util/virstoragefile.c | 4 +-
src/vbox/vbox_storage.c | 2 +-
tests/storagebackendsheepdogtest.c | 2 +-
.../qcow2-nocapacity-convert-prealloc.argv | 4 +
tests/storagevolxml2argvdata/qcow2-nocapacity.argv | 5 ++
tests/storagevolxml2argvtest.c | 29 +++++--
.../vol-qcow2-nocapacity-backing.xml | 23 +++++
tests/storagevolxml2xmlin/vol-qcow2-nocapacity.xml | 19 +++++
.../storagevolxml2xmlout/vol-qcow2-nocapacity.xml | 21 +++++
tests/storagevolxml2xmltest.c | 15 ++--
27 files changed, 269 insertions(+), 110 deletions(-)
create mode 100644 tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv
create mode 100644 tests/storagevolxml2argvdata/qcow2-nocapacity.argv
create mode 100644 tests/storagevolxml2xmlin/vol-qcow2-nocapacity-backing.xml
create mode 100644 tests/storagevolxml2xmlin/vol-qcow2-nocapacity.xml
create mode 100644 tests/storagevolxml2xmlout/vol-qcow2-nocapacity.xml
--
2.0.5
9 years, 8 months
[libvirt] [PATCH] virsh: Add missing parenthesis into man page
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Pushed as trivial.
tools/virsh.pod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index cdcb862..a7e0bb0 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -736,7 +736,7 @@ Get network interface stats for a running domain.
=item B<domif-setlink> I<domain> I<interface-device> I<state> [I<--config>]
Modify link state of the domain's virtual interface. Possible values for
-state are "up" and "down. If I<--config> is specified, only the persistent
+state are "up" and "down". If I<--config> is specified, only the persistent
configuration of the domain is modified, for compatibility purposes,
I<--persistent> is alias of I<--config>.
I<interface-device> can be the interface's target name or the MAC address.
--
2.3.0
9 years, 8 months
[libvirt] [PATCH for 1.2.13] schema: Add virtio-mmio address type into RNG
by Martin Kletzander
The "virtio-mmio" is perfectly valid address type which we parse and
format correctly, but it's missing in our RNG schemas, hence editing a
domain with device having such address fails the validation.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
docs/schemas/domaincommon.rng | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index f41ca43..6e73e7c 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4415,6 +4415,11 @@
</attribute>
<ref name="isaaddress"/>
</group>
+ <group>
+ <attribute name="type">
+ <value>virtio-mmio</value>
+ </attribute>
+ </group>
</choice>
</element>
</define>
--
2.3.0
9 years, 8 months
[libvirt] QEMU's File Descriptors
by Christopher Pereira
Dear Martin,
Does libvirt currently reopen image files when resuming a VM?
There is an issue of an IO Error after restarting a gluster volume and probably doing other maintenance tasks (VM will not resume) which probably invalidates QEMU's File Descriptors.
It's an old BZ.
Martin Kletzander <mkletzan(a)redhat.com> wrote:
>On Tue, Feb 24, 2015 at 09:24:51AM -0500, Stefan Berger wrote:
>>On 02/24/2015 08:34 AM, Martin Kletzander wrote:
>>>On Mon, Feb 23, 2015 at 06:50:46AM -0500, Stefan Berger wrote:
>>>>Implement virCommandPassFDGetFDIndex to determine the index a given
>>>>file descriptor will have when passed to the child process. When this
>>>>function is called, a flag is set to prevent the reordering of the
>>>>file descriptors.
>>>>
>>>>Signed-off-by: Stefan Berger <stefanb(a)linux.vnet.ibm.com>
>>>>---
>>>>src/libvirt_private.syms | 1 +
>>>>src/util/vircommand.c | 33 +++++++++++++++++++++++++++++++++
>>>>src/util/vircommand.h | 3 +++
>>>>3 files changed, 37 insertions(+)
>>>>
>>>>diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
>>>>index c156b40..aadb833 100644
>>>>--- a/src/libvirt_private.syms
>>>>+++ b/src/libvirt_private.syms
>>>>@@ -1213,6 +1213,7 @@ virCommandNewArgList;
>>>>virCommandNewArgs;
>>>>virCommandNonblockingFDs;
>>>>virCommandPassFD;
>>>>+virCommandPassFDGetFDIndex;
>>>>virCommandPassListenFDs;
>>>>virCommandRawStatus;
>>>>virCommandRequireHandshake;
>>>>diff --git a/src/util/vircommand.c b/src/util/vircommand.c
>>>>index 6527d85..2616446 100644
>>>>--- a/src/util/vircommand.c
>>>>+++ b/src/util/vircommand.c
>>>>@@ -67,6 +67,7 @@ enum {
>>>> VIR_EXEC_RUN_SYNC = (1 << 3),
>>>> VIR_EXEC_ASYNC_IO = (1 << 4),
>>>> VIR_EXEC_LISTEN_FDS = (1 << 5),
>>>>+ VIR_EXEC_FIXED_FDS = (1 << 6),
>>>
>>>The descriptors shouldn't get reordered *unless* there is
>>>VIR_EXEC_LISTEN_FDS flag added, so FIXED_FDS shouldn't be necessary.
>>>Or is there a bug in that approach that needs fixing?
>>
>>Hm, it depends on the order in which APIs are called where we either
>>need to protect against re-ordering (if we use indices) or we cannot
>>allow indices to be used if we need to reorder them. So, actually the
>>way the patch is, it isn't correct, either.
>>
>>The problem of having to prevent the reordering of file descriptors
>>when we are building the QEMU command line with file descriptors
>>already exists today. So maybe I could just remove this flag and the
>>related check knowing that reordering of file descriptors and building
>>the QEMU command line that contains file descriptor (from before the
>>order) would not be allowed today without any of the patches I am
>>trying to add.
>>
>
>You surely and safely can. The point behind reordering FDs was that
>when you're using FD passing as done by systemd, those FDs passed must
>start from number 3. However, because we are already passing a bunch
>of file descriptors to QEMU and other commands, we *must not* reorder
>any file descriptors because it wouldn't work, of course.
>
>Martin
>
>--
>libvir-list mailing list
>libvir-list(a)redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
9 years, 8 months
[libvirt] Unattended guest installation fails
by ChandraShekar Shastri
Hi,
I am following the below link to install a Fedora19 guest on Fedora19 Host.
http://kashyapc.com/2011/08/18/unattended-guest-install-with-a-local-kick...
Version :
libvirtd (libvirt) 1.0.5.1,
QEMU emulator version 1.4.2, Copyright (c) 2003-2008 Fabrice Bellard
I have the iso which I loop mounted and created a http repo using python
module "python -m SimpleHTTPServer". This repo is properly accessible and
the guest is able to pull the initrd.img and vmlinuz but further it fails.
Please find the attached xml and console messages and let me know how to
proceed further.
Thanks,
Chandrashekar
9 years, 8 months