- 论坛徽章:
- 1
|
回复 4# oily1314
谢谢楼上的各位。
不过这样的方法也无法自动抓取IP地址,原因还是因为Hyper-V的网卡对于FreeBSD来说不太兼容。
有个老外和我遇见的问题一样。
http://cncc.bingj.com/cache.aspx ... h-CN&w=8e4166db,1f5409a7
FreeBSD under Hyper-V
OK. I'm playing with FreeBSD 8.0 under Hyper-V R2. I looked at FreeBSD 7.0 under Hyper-V R1 about this time last year and without a kernel patch, it had issues shutting down (and starting, and running...). Well, the shutdown bug and the starting bug and all others seem to have been addressed fully aside from one slight networking issue. So here's the lowdown on this one remaining issue...
As there's no synthetic network adapter driver for the "good" NIC in Hyper-V for FreeBSD (nor OpenBSD nor Linux), then you need to use the "bad" NIC - the Legacy Network Adapter. The issue with this is that it is slow - only 100 Mbps. Under FreeBSD it is detected as a "de" NIC - the first one being "de0".
You can either configure this during the initial setup of FreeBSD using sysinstall, or by manually editing the /etc/rc.conf file and adding ifconfig_de0="DHCP" to that file.
There seems to be an issue with the way Microsoft built this adapter as under FreeBSD it doesn't properly obtain a DHCP-assigned address no matter where the DHCP server is - on a Windows box, a *nix box or a firewall/router/modem device. Real, physical "de" NICs work fine. At least there's a workaround that allows the DHCP-assigned address to work - you need to stop, start and re-acquire the DHCP-assigned address by running:
ifconfig de0 down
ifconfig de0 up
dhclient de0
Now, you can run this manually every time after you reboot the box, however that means that the box is offline until you log into it using Hyper-V Manager. A better way to handle this is to create an /etc/rc.local file, add these commands to it, then chmod 755 /etc/rc.local to make it an executable file for root.
Obviously, once this has been done, a portsnap fetch then portsnap extract is a good idea. (Or whatever way you want to keep your FreeBSD ports up to date.) And then installing any updated portss that are available using ports, portmanager or portupgrade or whatever method floats your boat.
Regards,
The Outspoken Wookie |
|