|
||||
It looks like your QEMUed FreeBSD is behind a nat. You can use portforwarding in that nat to allow you to SSH in.
I don't know if QEMU allows you to, but you could also give an IP address to your QEMUed FreeBSD directly on the same subnet as your other machines.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." |
|
||||
From http://people.redhat.com/berrange/ol...k-bridge.html:
Quote:
Good luck.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." |
|
|||
The default -net user is essentially a "wrapper", tcp/udp traffic from within the emulator is essentially just wrapped around the user-land "socket/send/recv" functions.
The only way to "forward a port" is via a command line argument: $ qemu ... -redir tcp:9000::22 In this example, The "host" port 9000 is open, any connections to localhost:9000 would get redirected to the guest OS, port 22. (SSH). Hope that helps. Last edited by BSDfan666; 13th May 2008 at 02:23 PM. |
|
|||
Why manually configure your QEMU guest? most operating systems have DHCP clients.. but if you insist.
Subnet: 10.0.2.0/24 Default Gateway: 10.0.2.2 Name Server: 10.0.2.3 You can pick any static IP within that subnet for the guest.. but the document suggests 10.0.2.15. Have fun... |
|
||||
Qemu, like VirtualBox, does NAT by default. This means that the virtual machine will have an addresss of 10.2. x.x.
Ping and UDP don't work. Maho's document is VERY dated, and various threads on the emulation list suggest that it be removed as a source. If you look at /usr/ports/qemu/pkg-message, you'll see that Juergen has a link to my howto on bsdnexus. However, I haven't tried it in a long time, and it may no longer work. (Nor can I help, as these days I use Linux for a host system, as it can use KVM-Qemu, VMware server and VirtualBox.) I don't know of any more current bridging howtos for FreeBSD, though one is probably necessary now. Mine was written when 7.0 was CURRENT, and some things may have changed. However, the basic concepts would still be there. Last edited by scottro; 19th May 2008 at 05:45 AM. Reason: typo |
|
|||
That's not correct scottro, both TCP and UDP are supported in the "user" emulation, ICMP is not..
|
|
||||
Quote:
|
|
|||
Did you actually read what was said above?
The network inside QEMU is emulated... you cannot access the 10.0.2.0/24 range.. (Without setting up a tun interface, read qemu faq..). So, adding "-redir tcp:9000::22" to the QEMU evocation line allows you to connect to the SSH daemon "within" the emulated environment. How do you connect? You connect via localhost... $ ssh localhost -p 9000 Do you understand now? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
qemu sound | Oko | OpenBSD Packages and Ports | 2 | 7th May 2009 06:59 AM |
HOWTO: QEMU on FreeBSD | vermaden | Guides | 10 | 9th March 2009 07:10 PM |
qemu & kqemu | adamk | FreeBSD General | 10 | 9th October 2008 03:27 PM |
Jailed QEMU + other OS | revzalot | FreeBSD Installation and Upgrading | 3 | 29th May 2008 06:00 PM |