Nicolas Ecarnot
2014-Nov-19 21:44 UTC
Re: [Libguestfs] virt-v2v: Died at /usr/bin/virt-p2v-server line 411
Le 19/11/2014 22:19, Richard W.M. Jones a écrit :> On Wed, Nov 19, 2014 at 10:05:53PM +0100, Nicolas Ecarnot wrote: >> Nov 19 21:54:52 serv-p2v-adm1 sshd[2727]: pam_unix(sshd:session): >> session opened for user root by (uid=0) >> Nov 19 21:54:53 serv-p2v-adm1 sshd[2725]: channel 2: open failed: >> connect failed: Connection refused >> Nov 19 21:54:53 serv-p2v-adm1 sshd[2727]: Received disconnect from >> 192.168.49.5: 11: disconnected by user >> Nov 19 21:54:53 serv-p2v-adm1 sshd[2725]: Received disconnect from >> 192.168.49.5: 11: disconnected by user > [...] >> >> Indeed, I see "Connection refused". >> Let's investigate on this. >> >> On the conversion server (serv-p2v-adm1), before running all this, I >> did a "iptables -F" (and a restart of NFS - not knowing if it was >> needed), so I have no rule in iptables now. >> >> Do I have to find a way to increase the verbosity of sshd in >> /var/log/secure? > > You might want to check that sshd allows port forwarding > ('AllowTcpForwarding yes' in /etc/ssh/sshd_config).This is the next thing I tried after posting my previous reply. It was commented, and the man page says it is enable by default. Anyway, I forced it on yes, restarted sshd and tried again but with no success. I'm trying the same operation after increasing the sshd log verbosity. -- Nicolas Ecarnot
Nicolas Ecarnot
2014-Nov-19 22:47 UTC
Re: [Libguestfs] virt-v2v: Died at /usr/bin/virt-p2v-server line 411
Richard W.M. Jones
2014-Nov-20 10:28 UTC
Re: [Libguestfs] virt-v2v: Died at /usr/bin/virt-p2v-server line 411
On Wed, Nov 19, 2014 at 11:47:11PM +0100, Nicolas Ecarnot wrote:> OK, I'm progressing : the ssh issue seems to be gone. > I changed some parameters but not sure which one are relevant. > When comparing with a fresh install, here are the diffs : > > root:/etc# diff /etc/ssh/sshd_config /tmp/sshd_config > 43a44 > > LogLevel DEBUG3 > 48c49 > < #PermitRootLogin yes > --- > > PermitRootLogin yes > 114,115c115,116 > < #AllowTcpForwarding yes > < #GatewayPorts no > --- > > AllowTcpForwarding yes > > GatewayPorts yes > > The man page specifically says that the -R option won't work unless > GatewayPorts is set to yes, and it is NOT able by default. > But i don't remember if this was sufficient, because I may have > change PermitRootLogin in the same time.My understanding is that GatewayPorts should not be necessary. Does it still work if you set it back to 'no'?> What is sure is that AllowTcpForwading set to yes did not change anything. > > Anyway, now, I can see things running for some times. Then failing. > > The log file is attached. I have read it quickly. I'm tired. See you > tomorrow. > > Relevant parts : > > -------------------------------------------- > libguestfs: trace: hivex_node_get_child = 968144 > libguestfs: trace: hivex_node_get_child 968144 "firstboot" > guestfsd: main_loop: new request, len 0x40^M > guestfsd: error: failed: Argument list too long^M > guestfsd: main_loop: proc 355 (hivex_node_get_child) took 0.00 seconds^M > libguestfs: trace: hivex_node_get_child = -1 (error) > virt-v2v: error: libguestfs error: hivex_node_get_child: failed: Argument > list too longThat would indicate some problem with the guest registry. You could grab it and post it somewhere (but note that registries contain sensitive data such as passwords): mkdir /tmp/registry virt-copy-out -a /path/to/guest.img 'win:C:\windows\system32\config' /tmp/registry (I only need to see the files 'SYSTEM' and 'SOFTWARE') 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
Richard W.M. Jones
2014-Nov-20 11:13 UTC
Re: [Libguestfs] virt-v2v: Died at /usr/bin/virt-p2v-server line 411
On Thu, Nov 20, 2014 at 12:03:43PM +0100, Nicolas Ecarnot wrote:> Just to be sure : I attached the complete log file into a compressed > attachement. Did you get it?Yes, I got the log file. [...]> >You could grab it and post it somewhere (but note that registries > >contain sensitive data such as passwords): > > > > mkdir /tmp/registry > > virt-copy-out -a /path/to/guest.img 'win:C:\windows\system32\config' /tmp/registry > > > >(I only need to see the files 'SYSTEM' and 'SOFTWARE') > > I don't how to get the guest.img, I guess it would be available at > some point during the conversion, but I just have a physical server. > > And about the two files, is it OK if I provide you the files > directly coming from the real physical server?>From the server which is the source of the P2V conversion, yes.Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Richard W.M. Jones
2014-Nov-20 21:25 UTC
Re: [Libguestfs] virt-v2v: Died at /usr/bin/virt-p2v-server line 411
Thanks for providing the SOFTWARE and SYSTEM hives. Firstly the SOFTWARE hive has an unusually large 'nk' node, which required me to increase one of the limits in hivex: https://github.com/libguestfs/hivex/commit/bec3f0bb632c4b84a1dfb73eb6333c2ba9834ffb The SYSTEM hive was even more interesting: $ hivexsh system Welcome to hivexsh, the hivex interactive shell for examining Windows Registry binary hive files. Type: 'help' for help summary 'quit' to quit the shell system\> ls ControlSet001 ControlSet002 LastKnownGoodRecovery MountedDevices Select Setup WPA system\> cd ControlSet001\Services system\ControlSet001\Services> cd Firstboot hivexsh: cd: Argument list too long This was the error seen in the conversion, and it turned out to be caused by the hive containing a node which contains a French name, encoded in UTF-8. This is a bit more complicated to solve .. 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/