Thank you very much :-) I used:
-redir tcp:5555::22 And was able to: <OSX host>$ ssh -p 5555 root@localhost Last login: Thu Jan 28 17:13:49 2016 from 10.0.2.2 root@qemux86-64:~# In full, the options are: /usr/local/bin/qemu-system-x86_64 -kernel images/bzImage-qemux86-64.bin -usb -redir tcp:5555::22 -drive file=images/core-image-full-cmdline-qemux86-64.ext4,if=virtio,format=raw -show-cursor -no-reboot -m 256 -serial mon:vc -serial null --append "vga=0 uvesafb.mode_option=640x480-32 root=/dev/vda rw mem=256M oprofile.timer=1 rootfstype=ext4 “ I also noted that there should be a means to use a qemu-bridge-helper which would, it is said, automate a bridged connection. But the qemu-bridge-helper does not seem to be present with the Homebrew install of qemu on OSX. I may have to figure that out later. Regards Nathan > On 28 Jan 2016, at 18:01, Peter Maydell <[email protected]> wrote: > > On 28 January 2016 at 16:35, Nathan Sowatskey <[email protected]> wrote: >> What I would like is to have a DHCP assigned address for the VM so that I >> can reach it from the host. I have tried the startup options below: >> >> /usr/local/bin/qemu-system-x86_64 -kernel images/bzImage-qemux86-64.bin -usb >> -netdev user,id=user.0 -device usb-net,netdev=user.0 -drive >> file=images/core-image-full-cmdline-qemux86-64.ext4,if=virtio,format=raw >> -show-cursor -no-reboot -m 256 -serial mon:vc -serial null --append "vga=0 >> uvesafb.mode_option=640x480-32 root=/dev/vda rw mem=256M oprofile.timer=1 >> rootfstype=ext4 “ >> >> The options above, which I understood to equivalent to not specifying >> anything at all for netdev, do not give me a configured eth0. So, not what I >> need it seems. > > The default network card for qemu-system-x86_64's PC model is not usb-net > (it's e1000), which is probably why you see this difference. > >> And, with no netted options at all: > >> The options above do give me a configured eth0, with an address >> taken from the Qemu DHCP address pool. That address, of 10.0.2.15 >> as it happens, is not reachable from the OSX host though. So, close, >> but no cookie yet. > > This is expected for usermode networking. > >> Can anyone help me wth closing the gap so I can reach the VM from >> the OSX host please? > > If you just need access to one or two ports (eg ssh) it may be > simplest just to use the user-mode networking's hostfwd option, > which will cause QEMU to forward connections from your host's > port X to guest port Y. > > Otherwise you need to use a backend other than 'user'. This means > 'tap', but this is largely tested and intended for a Linux host, > so you will have to do some googling to try to find out how to > set up tun/tap on OSX hosts and it might not work. (Even tun/tap > on Linux hosts requires a bit of setup.) > > QEMU networking docs: > http://wiki.qemu.org/Documentation/Networking > > thanks > -- PMM >
