My first nic (e1000g0) is a NAT and that looks like it is working fine. I can ssh into my guest from my host (using the three external data settings) and I can ping my host from my guest. My ifconfig looks like this:
Now I would like to set up an hostonly adapter so that I can use create a samba share in my guest that I can access from my host.$ ifconfig e1000g0
e1000g0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
inet 10.0.2.15 netmask ffffff00 broadcast 10.0.2.255
$ ifconfig e1000g1
ifconfig: status: SIOCGLIFFLAGS: e1000g1: no such interface
I have made exactly two changes to support this. First, I added a second nic (e1000g1) configured for hostonly:
My local XP ipconfig looks (partially) like this:
VBoxManage modifyvm "$VMName" --nic2 hostonly
VBoxManage modifyvm "$VMName" --hostonlyadapter2 'VirtualBox Host-Only Ethernet Adapter'
When I start my VM, my ifconfig looks like this:ipconfig
...
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
[/b]
Now I'm a little confused. My hostonly adapter already had an IP address as shown in XP's ipconfig above. Shouldn't that interface in OpenSolaris also have an IP address? Well, it does not, so I try giving it one. First I try the same one as XP (192.168.56.1), but that doesn't work. So I try the next one (192.168.56.2):$ ifconfig e1000g1
e1000g1: flags=4001000842<BROADCAST,RUNNING,MULTICAST,IPv4,DUPLICATE> mtu 1500 index 3
inet 0.0.0.0 netmask ff000000 broadcast 192.255.255.255
Well, hallelujah, that worked! I can even see 192.168.56.2 from my host.# ifconfig e1000g1 192.168.56.2 netmask 0xffffff00 broadcast 192.168.56.255 up
e1000g1: flags=4001000842<BROADCAST,RUNNING,MULTICAST,IPv4,DUPLICATE> mtu 1500 index 3
inet 192.168.56.2 netmask ffffff00 broadcast 192.168.56.255
Still, why can't I use dhcp to configure the address on e1000g1? I had tried ifconfig e1000g1 dhcp start without success. Dhcp is working on my NAT interface. Why not the hostonly one?