Re: [Libguestfs] libguestfs compilation
by Richard W.M. Jones
On Thu, Jun 28, 2018 at 03:55:32PM +0200, Pascal wrote:
> hello,
>
> I'd like to have "juste" guestmount in my toolkit to mount hvd/vhdx images,
> so I try to compile libguestfs with a minimum of dependencies : where can i
> get help to get there without polluting github etc ?
You can email libguestfs(a)redhat.com (no need to subscribe).
The instructions for compiling from source are here:
http://libguestfs.org/guestfs-building.1.html
although libguestfs is included in most Linux distros.
Not sure what an "hvd" image is, but qemu (which we use to access disk
images) supports vhdx, although it may be that writing to vhdx is not
very reliable because it won't be well tested. I would keep backups
of your disk images while trying it out anyhow.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
6 years, 4 months
Libguestfs for RHEL 7.6 preview
by Richard W.M. Jones
As in the past, we have an unofficial, unsupported, unsigned yum
repository containing a preview of the libguestfs and virt-v2v RHEL 7.6
packages:
https://people.redhat.com/~rjones/libguestfs-RHEL-7.6-preview/
PLEASE DO NOT CONTACT RED HAT SUPPORT ABOUT THESE PACKAGES. If you
find any problems, contact the upstream mailing list directly by
emailing <libguestfs(a)redhat.com>
** To install **
(1) Create a file called /etc/yum.repos.d/libguestfs-RHEL-7.6-preview.repo
with the following content:
[libguestfs-RHEL-7.6-preview]
name=libguestfs RHEL 7.6 preview
baseurl=https://people.redhat.com/~rjones/libguestfs-RHEL-7.6-preview/
enabled=1
gpgcheck=0
(2) Install or upgrade libguestfs, virt-v2v etc:
# yum install libguestfs libguestfs-tools-c virt-v2v
** To go back to the supported packages **
(1) Uninstall libguestfs:
# yum remove libguestfs
(2) Delete /etc/yum.repos.d/libguestfs-RHEL-7.6-preview.repo
# rm /etc/yum.repos.d/libguestfs-RHEL-7.6-preview.repo
(3) Reinstall libguestfs from the ordinary RHN channels:
# yum install libguestfs libguestfs-tools-c virt-v2v
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
6 years, 4 months
[PATCH] v2v: -o local: print libvirt XML
by Pino Toscano
In verbose mode, print the generated libvirt XML to stderr for
debugging, just like -o libvirt does.
---
v2v/output_local.ml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/v2v/output_local.ml b/v2v/output_local.ml
index 4e1088afc..c70428134 100644
--- a/v2v/output_local.ml
+++ b/v2v/output_local.ml
@@ -68,7 +68,13 @@ class output_local dir = object
let name = source.s_name in
let file = dir // name ^ ".xml" in
- with_open_out file (fun chan -> DOM.doc_to_chan chan doc)
+ with_open_out file (fun chan -> DOM.doc_to_chan chan doc);
+
+ if verbose () then (
+ eprintf "resulting local libvirt XML:\n%!";
+ DOM.doc_to_chan stderr doc;
+ eprintf "\n%!";
+ )
end
let output_local = new output_local
--
2.17.1
6 years, 4 months
[PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
by Richard W.M. Jones
v2 was here:
https://www.redhat.com/archives/libguestfs/2018-June/msg00109.html
v3:
- Added/fixed all suggestions from Nir in previous review.
Q: I wasn't sure if we still need the "UnsupportedError" class so I
left it in.
Q: Does the Unix socket always have the same name? What happens if
there's more than one transfer happening?
I tested this both ways, and it worked both ways. The output when the
optimization is used looks like this:
disk.id = '45d1a30c-82c0-4b00-8bfb-c4d628dbf72d'
hw_id = '81F716C4-4D19-CB35-82F7-94C691189FEB'
host.id = '87daa64d-b27e-4336-a156-973544be708b'
transfer.id = '5ffea7fa-966c-42a4-a77a-3efd6dc45c34'
imageio features: flush=True trim=False zero=True unix_socket='\x00/org/ovirt/imageio'
optimizing connection using unix socket '\x00/org/ovirt/imageio'
Rich.
6 years, 4 months
Re: [Libguestfs] virt-v2v
by Richard W.M. Jones
[Copying to the public mailing list]
On Wed, Jun 27, 2018 at 11:27:41AM +0000, SOUTHWICK Matthew wrote:
> Regarding virt-v2v
>
> CentOS Linux release 7.5.1804 (Core)
> virt-v2v-1.36.10-6.el7_5.2.x86_64
>
> I have to use virt-v2v-copy-to-local and then convert and squirt into my export domain, we do not have vSphere.
You should be able to use the SSH method. It's faster and easier to
use than virt-v2v-copy-to-local, but you have to make a small
configuration change to ESXi to enable SSH access:
http://libguestfs.org/virt-v2v.1.html#input-from-vmware-vmx
Even better than that would be the NFS method, but that's not always
possible.
> I am in the process of converting/migrating from ESXi 5.5 to
> oVirt. Things were working fine, until I updated the OS, at which
> point:
>
> 1. no matter what I do to my "password" file, virt-v2v will not
> read it, prompts twice per virtual disk.
Usually would indicate that the password in the file is wrong.
You might want to try:
echo -n 'the-password' > password-file
> 2. Times out if copy to local takes longer than 33 minutes on the
> first disk. Cant find the second or subsequent disks. I did notice
> that you had included a timeout of 2000 which I assume to be
> seconds? And would equate to the 33 minute issues I have.
Indeed, but you should never hit this timeout.
I think better not to use virt-v2v-copy-to-local and try the SSH
method instead, it's just easier all round.
If virt-v2v still fails, then run
virt-v2v -v -x [... rest of the parameters ...] |& tee /tmp/log
and upload the /tmp/log file to a pastebin somewhere and post the link
on the mailing list.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
6 years, 4 months
v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
by Richard W.M. Jones
These two patches add support for using a Unix domain socket to
directly access imageio in the case where imageio is running on the
conversion host (usually that means virt-v2v is running on the RHV
node and something else -- eg. CFME scripts -- arranges that the RHV
node is the same one running imageio).
Conversions in the normal case are not affected - they happen over TCP
as usual.
This was extremely hard to test, but I did eventually manage to test
it both ways. The log from the Unix domain socket case is here:
https://paste.fedoraproject.org/paste/RDhnpSaoUGI-jccIKy2e-g
You can tell that the optimization was used because you will see this
in the debug output:
disk.id = 'c5bb72bf-b9ab-4797-9ecf-fcbf79679742'
host.id = '87daa64d-b27e-4336-a156-973544be708b'
transfer.id = '2207ddda-00fd-4caf-b02c-e025e8173da9'
imageio features: flush=True trim=False zero=True unix_socket='\x00/org/ovirt/imageio'
optimizing connection using unix socket '\x00/org/ovirt/imageio'
(Note are the references to the unix socket.)
This requires the absolute latest versions of imageio (1.4.0) and
ovirt-engine (4.2.4-5) in order to get the optimization. However it
should work (without optimization) with older versions.
Thanks Nir Soffer and Daniel Erez in particular for help with this.
Rich.
6 years, 4 months
[PATCH] v2v: rhv-upload-plugin: Remove unused variables
by Nir Soffer
Remove some instances of "transfer" and "transfer_service" that are not
used in current code.
---
v2v/rhv-upload-plugin.py | 4 ----
1 file changed, 4 deletions(-)
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index 10887c031..5c036c46a 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -263,7 +263,6 @@ def request_failed(h, r, msg):
def pread(h, count, offset):
http = h['http']
transfer = h['transfer']
- transfer_service = h['transfer_service']
headers = {"Range", "bytes=%d-%d" % (offset, offset+count-1)}
# Authorization is only needed for old imageio.
@@ -309,7 +308,6 @@ def pwrite(h, buf, offset):
def zero(h, count, offset, may_trim):
http = h['http']
- transfer = h['transfer']
# Unlike the trim and flush calls, there is no 'can_zero' method
# so nbdkit could call this even if the server doesn't support
@@ -371,7 +369,6 @@ def emulate_zero(h, count, offset):
def trim(h, count, offset):
http = h['http']
- transfer = h['transfer']
# Construct the JSON request for trimming.
buf = json.dumps({'op': "trim",
@@ -394,7 +391,6 @@ def trim(h, count, offset):
def flush(h):
http = h['http']
- transfer = h['transfer']
# Construct the JSON request for flushing.
buf = json.dumps({'op': "flush"}).encode()
--
2.17.1
6 years, 4 months