Nicolas Ecarnot
2014-Nov-19 21:05 UTC
Re: [Libguestfs] virt-v2v: Died at /usr/bin/virt-p2v-server line 411
Le 19/11/2014 18:12, Richard W.M. Jones a écrit :> On Wed, Nov 19, 2014 at 04:42:23PM +0100, Nicolas Ecarnot wrote: >> disks: >> nbd:localhost:33363 (raw) [sda] >> nbd:localhost:49584 (raw) [sdb] >> nbd:localhost:41988 (raw) [sdc] >> removable media: >> >> NICs: >> >> [ 0.0] Creating an overlay to protect the source from being modified >> qemu-img create -q -f qcow2 -b 'nbd:localhost:33363' -o >> 'compat=1.1,backing_fmt=raw' /var/tmp/v2vovl636444.qcow2 >> nbd.c:nbd_receive_negotiate():L501: read failed >> qemu-img: /var/tmp/v2vovl636444.qcow2: Could not open >> 'nbd:localhost:33363': Could not open image: Invalid argument: >> Invalid argument > > What is supposed to happen is that qemu-nbd is started (3 times) on > the virt-p2v machine. Then 3 x ssh connections are made which reverse > proxy the nbd connection from virt-v2v back to virt-p2v, the > equivalent of: > > ssh -R 33363:localhost:<hostport> virt-v2v-server > > Somehow that's not happening. > > I'm not sure what. Is this reproducible? Do you have an unusual > firewall configuration on the virt-v2v conversion server? > > Rich. >It is 100% reproductible. Your interesting comment lead me to keep a better look at /var/log/secure on the conversion server : The "test" button succeed in connecting. I see it in the logs. Nov 19 21:48:23 serv-p2v-adm1 sshd[2654]: Accepted password for root from 192.168.49.5 port 36574 ssh2 Nov 19 21:48:23 serv-p2v-adm1 sshd[2654]: pam_unix(sshd:session): session opened for user root by (uid=0) Nov 19 21:48:23 serv-p2v-adm1 sshd[2654]: Received disconnect from 192.168.49.5: 11: disconnected by user Nov 19 21:48:23 serv-p2v-adm1 sshd[2654]: pam_unix(sshd:session): session closed for user root Here I wait on purpose a long time to distinguish what is happening in the log files. I'm filling in the different fields in the conversion screen, the I launch the conversion, and I see that : (192.168.49.5 is the source machine) Nov 19 21:54:52 serv-p2v-adm1 sshd[2725]: Accepted password for root from 192.168.49.5 port 36575 ssh2 Nov 19 21:54:52 serv-p2v-adm1 sshd[2725]: pam_unix(sshd:session): session opened for user root by (uid=0) Nov 19 21:54:52 serv-p2v-adm1 sshd[2727]: Accepted password for root from 192.168.49.5 port 36576 ssh2 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 Nov 19 21:54:53 serv-p2v-adm1 sshd[2725]: pam_unix(sshd:session): session closed for user root Nov 19 21:54:53 serv-p2v-adm1 sshd[2727]: pam_unix(sshd:session): session closed for user root 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? Another point : as I wrote it before, I have no way to get a shell prompt on the source machine, because alt-F1 leads to a blinking screen trying to run virt-p2v and failing and respawning. I nmap'd this source host, and saw that ssh was open. In order to run the action step by step, is there a way to connect to this root account? What password? (already tried secret/p2v/root/password/PASSWORD/redhatrulez but that did not the trick) Regards, -- Nicolas Ecarnot
Richard W.M. Jones
2014-Nov-19 21:19 UTC
Re: [Libguestfs] virt-v2v: Died at /usr/bin/virt-p2v-server line 411
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). It would be useful to know what the actual sshd failure is. This is how ssh is invoked on the virt-p2v side: https://github.com/libguestfs/libguestfs/blob/master/p2v/ssh.c#L174 plus https://github.com/libguestfs/libguestfs/blob/master/p2v/ssh.c#L595> Another point : as I wrote it before, I have no way to get a shell > prompt on the source machine, because alt-F1 leads to a blinking > screen trying to run virt-p2v and failing and respawning. > I nmap'd this source host, and saw that ssh was open. > In order to run the action step by step, is there a way to connect > to this root account? What password? (already tried > secret/p2v/root/password/PASSWORD/redhatrulez but that did not the > trick)I'm fairly sure the root account is disabled, and sshd isn't supposed to be running, but apparently it is (a bug). It's also a bug that there is no shell on another other virtual console, but TBH I don't know how to fix that ... Rich. -- 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
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
Possibly Parallel Threads
- Re: virt-v2v: Died at /usr/bin/virt-p2v-server line 411
- Re: virt-v2v: Died at /usr/bin/virt-p2v-server line 411
- Re: virt-v2v: Died at /usr/bin/virt-p2v-server line 411
- Re: virt-v2v: Died at /usr/bin/virt-p2v-server line 411
- Re: virt-v2v: Died at /usr/bin/virt-p2v-server line 411