Re: [Libguestfs] [PATCH] p2v: Allow virt-v2v input and output drivers containing '-' (RHBZ#1590220).
On Tuesday, 12 June 2018 11:27:56 CEST Richard W.M. Jones wrote: > The new ‘-o rhv-upload’ output mode contains a '-' character in the > name, but the regular expression which matched the output of the > virt-v2v command did not recognize '-' as a valid character. It ended > up mapping this to just "rhv" meaning two "rhv" entries would appear > in the list of output drivers. > > Thanks: Ming Xie. > --- > p2v/ssh.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/p2v/ssh.c b/p2v/ssh.c > index d2699fffd..2fcf0ef3e 100644 > --- a/p2v/ssh.c > +++ b/p2v/ssh.c > @@ -181,8 +181,8 @@ compile_regexps (void) > 0); >COMPILE (feature_libguestfs_rewrite_re, "libguestfs-rewrite", 0); >COMPILE (feature_colours_option_re, "colours-option", 0); > - COMPILE (feature_input_re, "input:((?:\\w)*)", 0); > - COMPILE (feature_output_re, "output:((?:\\w)*)", 0); > + COMPILE (feature_input_re, "input:((?:[-\\w])*)", 0); > + COMPILE (feature_output_re, "output:((?:[-\\w])*)", 0); What about making them a bit more loose, e.g.: input:((?:[^\\n])+) so there are no further changes to do, in case other non-word characters are used in the names of input, and output modes? -- Pino Toscano signature.asc Description: This is a digitally signed message part. ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
[Libguestfs] Fwd: virt-v2v-copy-to-local failed if dd does not support status=progress
On Tue, Jun 12, 2018 at 04:51:57AM -0700, zhujinhe wrote: > If dd does not support status=progress, copy process will abort at the > end. This is totally misguided. > We can use -q as a workaround in this circumstance, but it is frightening to > newbee like me. Maybe we should improve this. > > suspicion: > ``` >if shell_command cmd <> 0 then > error (f_"ssh copy command failed, see earlier errors"); > ``` > > detail: > ``` > shell > virt-v2v-copy-to-local -v -ic xen+ssh://myxen_server guest > [ 0.0] Fetching the remote libvirt XML metadata ... > [ 1.6] Parsing the remote libvirt XML metadata ... > [ 1.6] Copying remote disk 1/2 to guest-disk1 > dd: invalid status flag: ‘progress’ > Try 'dd --help' for more information. > 40960+0 records in > 40960+0 records out > 42949672960 bytes (43 GB) copied, 876.05 seconds, 49.0 MB/s > virt-v2v-copy-to-local: error: ssh copy command failed, see earlier errors > > ``` -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/ ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Fwd: virt-v2v-copy-to-local failed if dd does not support status=progress
On Tue, Jun 12, 2018 at 04:51:57AM -0700, zhujinhe wrote: > If dd does not support status=progress, copy process will abort at the > end. This is totally misguided. > We can use -q as a workaround in this circumstance, but it is frightening to > newbee like me. Maybe we should improve this. > > suspicion: > ``` >if shell_command cmd <> 0 then > error (f_"ssh copy command failed, see earlier errors"); > ``` > > detail: > ``` > shell > virt-v2v-copy-to-local -v -ic xen+ssh://myxen_server guest > [ 0.0] Fetching the remote libvirt XML metadata ... > [ 1.6] Parsing the remote libvirt XML metadata ... > [ 1.6] Copying remote disk 1/2 to guest-disk1 > dd: invalid status flag: ‘progress’ > Try 'dd --help' for more information. > 40960+0 records in > 40960+0 records out > 42949672960 bytes (43 GB) copied, 876.05 seconds, 49.0 MB/s > virt-v2v-copy-to-local: error: ssh copy command failed, see earlier errors > > ``` This feature was added to the dd command in coreutils in Sept 2014, nearly 4 years ago. Which Linux distribution are you using? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/ ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] [PATCH] p2v: Allow virt-v2v input and output drivers containing '-' (RHBZ#1590220).
On Tue, Jun 12, 2018 at 12:13:32PM +0200, Pino Toscano wrote: > On Tuesday, 12 June 2018 11:27:56 CEST Richard W.M. Jones wrote: > > The new ‘-o rhv-upload’ output mode contains a '-' character in the > > name, but the regular expression which matched the output of the > > virt-v2v command did not recognize '-' as a valid character. It ended > > up mapping this to just "rhv" meaning two "rhv" entries would appear > > in the list of output drivers. > > > > Thanks: Ming Xie. > > --- > > p2v/ssh.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/p2v/ssh.c b/p2v/ssh.c > > index d2699fffd..2fcf0ef3e 100644 > > --- a/p2v/ssh.c > > +++ b/p2v/ssh.c > > @@ -181,8 +181,8 @@ compile_regexps (void) > >0); > >COMPILE (feature_libguestfs_rewrite_re, "libguestfs-rewrite", 0); > >COMPILE (feature_colours_option_re, "colours-option", 0); > > - COMPILE (feature_input_re, "input:((?:\\w)*)", 0); > > - COMPILE (feature_output_re, "output:((?:\\w)*)", 0); > > + COMPILE (feature_input_re, "input:((?:[-\\w])*)", 0); > > + COMPILE (feature_output_re, "output:((?:[-\\w])*)", 0); > > What about making them a bit more loose, e.g.: > > input:((?:[^\\n])+) > > so there are no further changes to do, in case other non-word > characters are used in the names of input, and output modes? I was actually thinking about tightening up the v2v side. Do we imagine that there will be input or output modes using characters outside the set '-', a-z, A-Z, 0-9? Given that it's part of the command line too. 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 ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs