Re: Virtual Box MS Win 7 guest no NAT issue now understood

2016-04-06 Thread Tom H
On Wed, Apr 6, 2016 at 7:19 AM, Yasha Karant  wrote:
>
> I have now resolved the cause of the lack of NAT Internet connection
> on a Virtual Box MS Win 7 guest.  After I installed SL 7.2 on my
> wife's new laptop, I restored (via a cp from an external USB hard
> drive that held all of the files that were not SL installed, including
> all of the Virtual Box guest files) the Virtual Box guest files from
> her previous laptop to the new machine.  I installed the Virtual Box
> EL7 RPM, configured VirtualBox to recognize the restored guest files,
> and the NAT network functioned over the 802.11 WNIC controlled by SL 7
> Network Manager -- everything worked (indeed, any statements that NAT
> would not work with 802.11 in "new" kernels were indeed red herrings).

Not at all. I even posted the kernel code where bridging's disabled for wifi.

VirtualBox doesn't use the Linux kernel's bridging.

This is from the VirtualBox documentation:

Bridging to a wireless interface is done differently from bridging to
a wired interface, because most wireless adapters do not support
promiscuous mode. All traffic has to use the MAC address of the host's
wireless adapter, and therefore VirtualBox needs to replace the source
MAC address in the Ethernet header of an outgoing packet to make sure
the reply will be sent to the host interface. When VirtualBox sees an
incoming packet with a destination IP address that belongs to one of
the virtual machine adapters it replaces the destination MAC address
in the Ethernet header with the VM adapter's MAC address and passes it
on. VirtualBox examines ARP and DHCP packets in order to learn the IP
addresses of virtual machines.

And this is from a laptop with a running VirtualBox VM. There's no
Linux bridge on the host (or a tun/tap interface either):

th@localhost:~$ VBoxManage list runningvms
"lubuntu" {65a3e709-e368-4717-8cd2-41e8751449ce}

th@localhost:~$ VBoxManage showvminfo lubuntu | grep "NIC 1"
NIC 1:   MAC: 080027A018CE, Attachment: Bridged Interface
'wlp18s0', Cable connected: on, Trace: off (file: none), Type:
82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy:
deny, Bandwidth group: none

th@localhost:~$ VBoxManage list bridgedifs
Name:wlp18s0
GUID:31706c77-7338-4030-8000-c0cb380f865a
DHCP:Disabled
IPAddress:   192.168.1.223
NetworkMask: 255.255.255.0
IPV6Address: 2a02:1205:c6a3:b7d0:c2cb:38ff:fe0f:865a
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: c0:cb:38:0f:86:5a
MediumType:  Ethernet
Status:  Up
VBoxNetworkName: HostInterfaceNetworking-wlp18s0

th@localhost:~$ sudo ip l
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: wlp18s0:  mtu 1500 qdisc
pfifo_fast state UP mode DORMANT group default qlen 1000
link/ether c0:cb:38:0f:86:5a brd ff:ff:ff:ff:ff:ff

th@localhost:~$ sudo bridge l

th@localhost:~$ sudo ip -4 a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
3: wlp18s0:  mtu 1500 qdisc
pfifo_fast state UP group default qlen 1000
inet 192.168.1.223/24 brd 192.168.1.255 scope global wlp18s0
   valid_lft forever preferred_lft forever

th@localhost:~$ ssh 192.168.1.224

th@yasha:~$ sudo ip l
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3:  mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:a0:18:ce brd ff:ff:ff:ff:ff:ff

So "lubuntu" is running with an interface bridged using VirtualBox's
internal bridging and accessible from the host.

You were pointed at various ways to do this with Linux and KVM but
you'd have had to install and configure extra software to do so and it
never seemed to interest you.


Virtual Box MS Win 7 guest no NAT issue now understood

2016-04-05 Thread Yasha Karant
I have now resolved the cause of the lack of NAT Internet connection on 
a Virtual Box MS Win 7 guest.  After I installed SL 7.2 on my wife's new 
laptop,
I restored (via a cp from an external USB hard drive that held all of 
the files that were not SL installed, including all of the Virtual Box 
guest files) the Virtual Box
guest files from her previous laptop to the new machine.  I installed 
the Virtual Box EL7 RPM, configured VirtualBox to recognize the restored 
guest files, and the
NAT network functioned over the 802.11 WNIC controlled by SL 7 Network 
Manager -- everything worked (indeed, any statements that NAT would not 
work with 802.11 in
"new" kernels were indeed red herrings).  When I then restored her guest 
machine (MS Win 7 Pro as well) to my SL 7 laptop, again, NAT worked.  
Thus, I have determined that
(somehow) the MS Win device NIC device driver that Virtual Box uses to 
connect to the NIC supplied by Virtual Box to the MS Win 7 guest was 
"broken".


I have created a second virtual disk and have attached this to the MS 
Win 7 system that "works", and am in the process of doing a MS Win 7 
backup (not a Linux backup) to this additional
virtual disk that the MS Win 7 guest "sees" now as drive E: .  I do not 
know MS Win very well at all, using it as an appliance, and real source 
code and OS architectural details are not readily available (several of 
my students who worked in MS Win "shops" have access to material 
licensed only to such "shops", not to persons such as myself, and even 
these have large limitations according to my students.)


 I know that I may remove said virtual disk from the working MS Win guest
and attach it, via Virtual Box, to the non-working MS Win guest.  I am 
not asking for a response to the SL list, but if anyone on this list 
knows how I can use this "backup" virtual hard drive to restore
just the MS Win systems files (specifically, just this NIC driver and 
whatever associated MS Win 7 systems files it "needs"), I would greatly 
appreciate off-list (via my private email, ykar...@gmail.com
if possible) as to what to do -- or a URL with the necessary 
instructions.  Any help greatly would be appreciated.


All of the guests in question are MS Win 7 Pro SP 1, and all have the 
necessary MS Win
license.  If at all possible, I do *NOT* want to "smash" the 
applications installed into the MS Win guest when I restore just the MS 
Win OS files.


Yasha Karant