qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1414466] Re: -net user, hostfwd=... is not working(qem


From: P.Constantine
Subject: [Qemu-devel] [Bug 1414466] Re: -net user, hostfwd=... is not working(qemu-system-aarch64)
Date: Tue, 17 Jan 2017 20:02:41 -0000

Redirect does happen, but no packets appear on guest interface: checked
by iptables rule for `NEW` on `tcpport 22` inside guest.

On host:

$ sudo lsof -itcp | grep 2851
packer    24233      kit    6u  IPv4 1532725      0t0  TCP 
localhost:52822->localhost:2851 (ESTABLISHED)
qemu-syst 24286      kit   12u  IPv4 1530169      0t0  TCP *:2851 (LISTEN)
qemu-syst 24286      kit   21u  IPv4 1575945      0t0  TCP 
localhost:2851->localhost:52820 (CLOSE_WAIT)
qemu-syst 24286      kit   22u  IPv4 1532726      0t0  TCP 
localhost:2851->localhost:52822 (ESTABLISHED)
qemu-syst 24286      kit   23u  IPv4 1532645      0t0  TCP 
localhost:2851->localhost:52812 (CLOSE_WAIT)
qemu-syst 24286      kit   24u  IPv4 1532646      0t0  TCP 
localhost:2851->localhost:52814 (CLOSE_WAIT)

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1414466

Title:
  -net user,hostfwd=... is not working(qemu-system-aarch64)

Status in QEMU:
  Confirmed

Bug description:
  QEMU version: git a46b3aaf6bb038d4f6f192a84df204f10929e75c

   /opt/qemu.git/bin/qemu-system-aarch64 --version
  QEMU emulator version 2.2.50, Copyright (c) 2003-2008 Fabrice Bellard

  Hosts:
  ovs - host machine (Ubuntu 14.04.1, x86_64)
  debian8-arm64 - guest 

  Guest start:
  address@hidden:~$ /opt/qemu.git/bin/qemu-system-aarch64 -machine virt -cpu 
cortex-a57 -nographic -smp 1 -m 512 -kernel vmlinuz-run -initrd initrd-run.img 
-append "root=/dev/sda2 console=ttyAMA0" -global virtio-blk-device.scsi=off 
-device virtio-scsi-device,id=scsi -drive 
file=debian8-arm64.img,id=rootimg,cache=unsafe,if=none -device 
scsi-hd,drive=rootimg -netdev user,id=unet -device 
virtio-net-device,netdev=unet -net user,hostfwd=tcp:127.0.0.1:1122-:22

  address@hidden:~# netstat -ntplu | grep ssh
  tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN    
  410/sshd        
  tcp6       0      0 :::22                   :::*                    LISTEN    
  410/sshd       

  (no firewall in guest vm)

  address@hidden:~$ netstat -ntplu | grep 1122
  tcp        0      0 127.0.0.1:1122          0.0.0.0:*               LISTEN    
  18722/qemu-system-a

  address@hidden:~$ time ssh address@hidden -p 1122
  ssh_exchange_identification: read: Connection reset by peer

  real  1m29.341s
  user  0m0.005s
  sys   0m0.000s

  Inside guest vm sshd works fine:
  address@hidden:~# ssh address@hidden -p 22
  address@hidden's password: 
  ....
  address@hidden:~$ exit
  logout
  Connection to 127.0.0.1 closed.

  address@hidden:~# ssh address@hidden -p 22
  address@hidden's password: 
  ...
  address@hidden:~$ exit
  logout
  Connection to 10.0.2.15 closed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1414466/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]