[PATCH] hivexsh: Add missing documentation for -u switch
by Hilko Bengen
---
sh/hivexsh.pod | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sh/hivexsh.pod b/sh/hivexsh.pod
index 7d7fc0a..8b10a6a 100644
--- a/sh/hivexsh.pod
+++ b/sh/hivexsh.pod
@@ -61,6 +61,13 @@ script, use:
#!/usr/bin/hivexsh -f
+=item B<-u>
+
+Use heuristics to tolerate certain levels of corruption within hives.
+
+This is unsafe but may allow to export/merge valid keys/values in an
+othewise corrupted hive.
+
=item B<-w>
If this option is given, then writes are allowed to the hive
--
2.13.2
7 years, 5 months
[PATCH] hivexml: Add -u flag for HIVEX_OPEN_UNSAFE
by Hilko Bengen
---
xml/hivexml.c | 5 ++++-
xml/hivexml.pod | 7 +++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/xml/hivexml.c b/xml/hivexml.c
index b496bb6..8ba6594 100644
--- a/xml/hivexml.c
+++ b/xml/hivexml.c
@@ -95,7 +95,7 @@ main (int argc, char *argv[])
int open_flags = 0;
int visit_flags = 0;
- while ((c = getopt (argc, argv, "dk")) != EOF) {
+ while ((c = getopt (argc, argv, "dku")) != EOF) {
switch (c) {
case 'd':
open_flags |= HIVEX_OPEN_DEBUG;
@@ -103,6 +103,9 @@ main (int argc, char *argv[])
case 'k':
visit_flags |= HIVEX_VISIT_SKIP_BAD;
break;
+ case 'u':
+ open_flags |= HIVEX_OPEN_UNSAFE;
+ break;
default:
fprintf (stderr, "hivexml [-dk] regfile > output.xml\n");
exit (EXIT_FAILURE);
diff --git a/xml/hivexml.pod b/xml/hivexml.pod
index 257257c..afab80b 100644
--- a/xml/hivexml.pod
+++ b/xml/hivexml.pod
@@ -29,6 +29,13 @@ bug report.
Keep going even if we find errors in the Registry file. This
skips over any parts of the Registry that we cannot read.
+=item B<-u>
+
+Use heuristics to tolerate certain levels of corruption within hives.
+
+This is unsafe but may allow to export/merge valid keys/values in an
+othewise corrupted hive.
+
=back
=head1 SEE ALSO
--
2.13.2
7 years, 5 months
[PATCH 0/5] various improvements for make-template.mk
by Pino Toscano
Hi,
this series improves the generation of Debian templates, automating
basically almost all the steps needed.
Also, it fixes the generation of aarch64 images with NVRAM, which is
currently removed too soon, and thus not saved and compressed.
Thanks,
Pino Toscano (5):
builder: templates: update Debian preseed from Stretch
builder: templates: generalize debian location
builder: templates: improve debian.preseed
builder: templates: save NVRAM before removing guest
builder: templates: pass empty proxy to d-i when not set
builder/templates/debian.preseed | 80 ++++++++++++++++++++++++++++++--------
builder/templates/make-template.ml | 59 +++++++++++++++++-----------
2 files changed, 99 insertions(+), 40 deletions(-)
--
2.9.4
7 years, 5 months
virt-v2v import from KVM without storage-pool ?
by Matthias Leopold
hi,
i'm trying to import a VM in oVirt from a KVM host that doesn't use
storage pools. this fails with the following message in
/var/log/vdsm/vdsm.log:
2017-07-05 09:34:20,513+0200 ERROR (jsonrpc/5) [root] Error getting disk
size (v2v:1089)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1078, in
_get_disk_info
vol = conn.storageVolLookupByPath(disk['alias'])
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 4770, in
storageVolLookupByPath
if ret is None:raise libvirtError('virStorageVolLookupByPath()
failed', conn=self)
libvirtError: Storage volume not found: no storage vol with matching path
the disks in the origin VM are defined as
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='writethrough'/>
<source file='/dev/kvm108/kvm108_img'/>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/some/path/CentOS-7-x86_64-Minimal-1611.iso'/>
is this a virt-v2v or oVirt problem?
thx
matthias
7 years, 5 months
[PATCH v3] v2v: docs: VDSM location of virt-v2v log file.
by Richard W.M. Jones
See this bug for background information:
https://bugzilla.redhat.com/show_bug.cgi?id=1350465
Thanks: Tomáš Golembiovský
---
v2v/virt-v2v.pod | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
index e68d75cf8..87dba240b 100644
--- a/v2v/virt-v2v.pod
+++ b/v2v/virt-v2v.pod
@@ -1909,18 +1909,32 @@ that guest through the RHV-M UI, you may encounter an import failure.
Diagnosing these failures is infuriatingly difficult as the UI
generally hides the true reason for the failure.
-There are two log files of interest. The first is stored on the
-RHV-M server itself, and is called
-F</var/log/ovirt-engine/engine.log>
-
-The second file, which is the most useful, is found on the SPM host
-(SPM stands for "Storage Pool Manager"). This is a RHV node that is
-elected to do all metadata modifications in the data center, such as
-image or snapshot creation. You can find out which host is the
-current SPM from the "Hosts" tab "Spm Status" column. Once you have
-located the SPM, log into it and grab the file
-F</var/log/vdsm/vdsm.log> which will contain detailed error messages
-from low-level commands.
+There are several log files of interest:
+
+=over 4
+
+=item F</var/log/vdsm/import/>
+
+In oVirt E<ge> 4.1.0, VDSM preserves the virt-v2v log file for
+30 days in this directory.
+
+This directory is found on the host which performed the conversion.
+The host can be selected in the import dialog, or can be found under
+the C<Events> tab in oVirt administration.
+
+=item F</var/log/vdsm/vdsm.log>
+
+As above, this file is present on the host which performed the
+conversion. It contains detailed error messages from low-level
+operations executed by VDSM, and is useful if the error was not caused
+by virt-v2v, but by VDSM.
+
+=item F</var/log/ovirt-engine/engine.log>
+
+This log file is stored on the RHV-M server. It contains more detail
+for any errors caused by the oVirt GUI.
+
+=back
=head1 MINIMAL XML FOR -i libvirtxml OPTION
--
2.13.2
7 years, 5 months
[PATCH v2] v2v: docs: VDSM location of virt-v2v log file.
by Richard W.M. Jones
See this bug for background information:
https://bugzilla.redhat.com/show_bug.cgi?id=1350465
Thanks: Tomáš Golembiovský
---
v2v/virt-v2v.pod | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
index e68d75cf8..0943bf305 100644
--- a/v2v/virt-v2v.pod
+++ b/v2v/virt-v2v.pod
@@ -1909,18 +1909,32 @@ that guest through the RHV-M UI, you may encounter an import failure.
Diagnosing these failures is infuriatingly difficult as the UI
generally hides the true reason for the failure.
-There are two log files of interest. The first is stored on the
-RHV-M server itself, and is called
-F</var/log/ovirt-engine/engine.log>
-
-The second file, which is the most useful, is found on the SPM host
-(SPM stands for "Storage Pool Manager"). This is a RHV node that is
-elected to do all metadata modifications in the data center, such as
-image or snapshot creation. You can find out which host is the
-current SPM from the "Hosts" tab "Spm Status" column. Once you have
-located the SPM, log into it and grab the file
-F</var/log/vdsm/vdsm.log> which will contain detailed error messages
-from low-level commands.
+There are three log files of interest:
+
+=over 4
+
+=item F</var/log/vdsm/import/>
+
+In oVirt E<ge> 4.1.0, vdsm preserves the virt-v2v log file for
+30 days in this directory.
+
+This directory is found on the host which performed the conversion.
+The host can be selected in the import dialog, or can be found under
+the C<Events> tab in oVirt administration.
+
+=item F</var/log/vdsm/vdsm.log>
+
+As above, this file is present on the host which performed the
+conversion. It contains detailed error messages from low-level
+operations executed by VDSM, and is useful if the error was not caused
+by virt-v2v, but by VDSM.
+
+=item F</var/log/ovirt-engine/engine.log>
+
+This log file is stored on the RHV-M server. It contains more detail
+for any errors caused by the oVirt GUI.
+
+=back
=head1 MINIMAL XML FOR -i libvirtxml OPTION
--
2.13.2
7 years, 5 months
[PATCH] v2v: docs: VDSM location of virt-v2v log file.
by Richard W.M. Jones
See this bug for background information:
https://bugzilla.redhat.com/show_bug.cgi?id=1350465
---
v2v/virt-v2v.pod | 39 +++++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
index e68d75cf8..93d1a9ecd 100644
--- a/v2v/virt-v2v.pod
+++ b/v2v/virt-v2v.pod
@@ -1909,18 +1909,33 @@ that guest through the RHV-M UI, you may encounter an import failure.
Diagnosing these failures is infuriatingly difficult as the UI
generally hides the true reason for the failure.
-There are two log files of interest. The first is stored on the
-RHV-M server itself, and is called
-F</var/log/ovirt-engine/engine.log>
-
-The second file, which is the most useful, is found on the SPM host
-(SPM stands for "Storage Pool Manager"). This is a RHV node that is
-elected to do all metadata modifications in the data center, such as
-image or snapshot creation. You can find out which host is the
-current SPM from the "Hosts" tab "Spm Status" column. Once you have
-located the SPM, log into it and grab the file
-F</var/log/vdsm/vdsm.log> which will contain detailed error messages
-from low-level commands.
+There are three log files of interest:
+
+=over 4
+
+=item F</var/log/vdsm/import/>
+
+In oVirt E<ge> 4.1.0, vdsm preserves the virt-v2v log file for
+30 days in this directory.
+
+This directory is found on the SPM host (SPM stands for "Storage Pool
+Manager"). This is a RHV node that is elected to do all metadata
+modifications in the data center, such as image or snapshot creation.
+You can find out which host is the current SPM from the "Hosts" tab
+"Spm Status" column.
+
+=item F</var/log/vdsm/vdsm.log>
+
+As above, this file is present on the SPM host. It contains detailed
+error messages from low-level operations executed by VDSM, and is
+useful if the error was not caused by virt-v2v, but by VDSM or the
+oVirt GUI.
+
+=item F</var/log/ovirt-engine/engine.log>
+
+This log file is stored on the RHV-M server.
+
+=back
=head1 MINIMAL XML FOR -i libvirtxml OPTION
--
2.13.2
7 years, 5 months
[PATCH] libvirt: disallow non-local connections (RHBZ#1347830)
by Pino Toscano
If the connection is not local, paths of disks will refer to the remote
host, which were mistakenly handled as local paths (in the best case
failing to open a non-existing disk, and in the worst case opening a
different disk!).
In case the disks are remote resources like ssh or ceph, nothing
guarantees that the hostname can be reached from the local machine, or
even that it is actually the same on both machines.
For these reasons, just forbit outright the addition of disks from
non-local libvirt connections for now.
---
lib/libvirt-domain.c | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/lib/libvirt-domain.c b/lib/libvirt-domain.c
index 37c0b49..6b9467b 100644
--- a/lib/libvirt-domain.c
+++ b/lib/libvirt-domain.c
@@ -32,6 +32,7 @@
#include <libxml/xpath.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
+#include <libxml/uri.h>
#include "base64.h"
@@ -203,7 +204,9 @@ guestfs_impl_add_libvirt_dom (guestfs_h *g, void *domvp,
size_t ckp;
struct add_disk_data data;
CLEANUP_XMLFREEDOC xmlDocPtr doc = NULL;
- CLEANUP_FREE char *label = NULL, *imagelabel = NULL;
+ CLEANUP_FREE char *label = NULL, *imagelabel = NULL, *uristr = NULL;
+ virConnectPtr conn;
+ CLEANUP_XMLFREEURI xmlURIPtr uri = NULL;
readonly =
optargs->bitmask & GUESTFS_ADD_LIBVIRT_DOM_READONLY_BITMASK
@@ -247,6 +250,37 @@ guestfs_impl_add_libvirt_dom (guestfs_h *g, void *domvp,
return -1;
}
+ conn = virDomainGetConnect (dom);
+ if (conn == NULL) {
+ virErrorPtr err;
+ err = virGetLastError ();
+ error (g, _("cannot get the libvirt connection of the domain ‘%s’: %s"),
+ virDomainGetName (dom), err ? err->message : "");
+ return -1;
+ }
+
+ uristr = virConnectGetURI (conn);
+ if (uristr == NULL) {
+ virErrorPtr err;
+ err = virGetLastError ();
+ error (g, _("cannot get the URI of the libvirt connection: %s"),
+ err ? err->message : "");
+ return -1;
+ }
+
+ uri = xmlParseURI (uristr);
+ if (uri == NULL) {
+ error (g, _("cannot parse the URI of the libvirt connection: %s"),
+ uristr);
+ return -1;
+ }
+
+ if (uri->server && uri->server[0] != '\0') {
+ error (g, _("cannot add a non-local libvirt connection: %s"),
+ uristr);
+ return -1;
+ }
+
if (!readonly) {
virDomainInfo info;
virErrorPtr err;
@@ -320,7 +354,7 @@ guestfs_impl_add_libvirt_dom (guestfs_h *g, void *domvp,
* all disks are added or none are added.
*/
ckp = guestfs_int_checkpoint_drives (g);
- r = for_each_disk (g, virDomainGetConnect (dom), doc, add_disk, &data);
+ r = for_each_disk (g, conn, doc, add_disk, &data);
if (r == -1)
guestfs_int_rollback_drives (g, ckp);
--
2.9.4
7 years, 5 months