Virtualbox and TFTP
-
Hi all. I’m trying to build a FOG 1.1.2 test setup using Virtualbox. Unfortunately TFTP isn’t working right, which is perhaps symptomatic of deeper problems.
Here’s my setup:
Host: Win8.1 laptop; 192.168.56.1 on host-only network
FOG VM: Ubuntu 14.04 LTS server, with DHCP server enabled
eth0: NAT network with Virtualbox DHCP server disabled; static IP 10.0.2.2
eth1: Host-only network with DHCP disabled; static IP 192.168.56.240
Test VM: NAT network; PXE boot enabled; temporarily running Linux; DHCP-served address is 10.0.2.10I’m using the NAT network so the VMs can access the internet as well as each other; the Host-only network is so I can ssh to the FOG VM. (I know I’m supposed to be able to do port forwarding over the NAT network, but it too doesn’t work; perhaps this is related?)
When I skip the PXE boot on the test VM, it correctly receives IP configuration from the FOG server. I can ping back and forth between the two VMs, although ping from the FOG VM to the Test VM has initial packet loss if it hasn’t been done in a while.
The TFTP server is running on the FOG VM. I can successfully do tftp -v 10.0.2.2 -c get undionly.kpxe on the Test VM, but only after pinging the Test VM from the FOG server. Similarly I can ssh from the Test VM to the FOG VM only after pinging the Test VM.
ssh from the host works perfectly. tftp from the host does not work, timing out.
When try booting the Test VM using PXE, I get the error PXE-E32: TFTP open timeout.
Any suggestions?
TIA
THeo
-
To work properly over tftp, You should really but the Network in bridged adaptor mode.
-
[quote=“Tom Elliott, post: 31716, member: 7271”]To work properly over tftp, You should really but the Network in bridged adaptor mode.[/quote]
I was hoping not to have to do that I’d like to tinker with the VM system at home and at work (hence installation on my laptop) and the differing IP address ranges will likely make this difficult. Not to mention at work I haven’t figured out how to get an IP address via DHCP over a bridged wireless card.
Does PXE booting with NAT (Section 6.3.2 in the Virtualbox manual) work?
THeo
-
I don’t think it does, not well at least.
-
[quote=“Tom Elliott, post: 31716, member: 7271”]To work properly over tftp, You should really but the Network in bridged adaptor mode.[/quote]
Well, it’s a brute-force approach, but I was able to get tftp booting to work without having to bridge. It turns out that it also works on a Virtualbox host-only network. I ended up putting the host, FOG VM and test VM on a host-only network with the FOG VM as the DHCP server. For internet connectivity I added a third VM running pfSense with one network interface on the host-only network and one bridged interface.
THeo
-
you could try having a pfsense VM do your routing.
pfsense VM with 2 NICs, one NAT, one internal.
other VMs have internal NICs, pfsense can handle your DHCP easily enough.I do this with bridged NIC instead of NAT… but might work.
if your serious, drop the wireless and get Ethernet.