Discussion:
[PacketFence-users] Packetfence in virtual environment
Primož Marinšek
2012-10-18 08:40:17 UTC
Permalink
Dear All

I hope I'll not get shut down too fast here, but I've hit a wall.

I'm testing (or would like to) PF to evaluate it and see if we can
implement it into some of our solutions. It looks great on paper so I
thought I'd give it a try.

I've installed PF running on VirtualBox thinking "what could go wrong", but
I found out soon enough that VLANs are the problem. I've been reading of
some workarounds for this, but it seem a waste of time for this.

Is VMware Player any better that VirtualBox at this or is the ESXi the only
solution for this?

I just want to run PF on my ubuntu to give it a try with our WLAN network.
--
Primoş Marinšek
Brian Candler
2012-10-18 09:38:12 UTC
Permalink
Post by Primož Marinšek
I've installed PF running on VirtualBox thinking "what could go wrong",
but I found out soon enough that VLANs are the problem. I've been
reading of some workarounds for this, but it seem a waste of time for
this.
Is VMware Player any better that VirtualBox at this or is the ESXi the
only solution for this?
I just want to run PF on my ubuntu to give it a try with our WLAN network.
If the virtualisation host is running Linux, you can use KVM.

Otherwise: create virtual interfaces eth0, eth1, eth2 for the PF guest VM.
Then ideally you would bridge those to VLAN subinterfaces on the VM host,
but if that doesn't work, at worst you can bridge them to separate physical
interfaces (plug in some USB-ethernet adapters if necessary)
Rachid Zarouali
2012-10-18 16:44:39 UTC
Permalink
Post by Primož Marinšek
Is VMware Player any better that VirtualBox at this or is the ESXi the
only solution for this?
I would highly recommend using ESXi (hypervisor is "free") instead of
vmware player.
We Currently use PF in a vmware environnment (pf is hosted on a debian 6.0
vm) and it works perfectly.

Feel free to ask if needed :)

Regards,
Randy Prothero
2012-10-18 18:14:53 UTC
Permalink
I have VirtualBox working with the PacketFence zen VM that is downloadable from the PacketFence site.

It took a little tweaking to get the VLANs to show up in the guest VM.

Here is a sloppy bunch of notes that may help if you are determined to stick with VirtualBox.
---

I needed vlans 290,291,292,390,391 and 392 to be available in the guest VM.

eth0 is the default interface for the VirtualBox host.

On the host that runs VirtualBox, I added the interfaces:
vi ifcfg-eth0.290
vi ifcfg-eth0.291
vi ifcfg-eth0.292
vi ifcfg-eth0.390
vi ifcfg-eth0.391
vi ifcfg-eth0.392
ifup eth0.290
ifup eth0.291
ifup eth0.292
ifup eth0.390
ifup eth0.391
ifup eth0.392

ifcfg-eth0.290 looks like this:
[***@vhost network-scripts]# more ifcfg-eth0.290
DEVICE=eth0.290
VLAN=yes
ONBOOT=yes
BOOTPROTO=dhcp

just edit and copy that to the other ifcfg-eth0.XXX files (these live in /etc/sysconfig/network-scripts folder)

(does not matter what the IP is on the host for that vlan interface, as long as it is UP and running)

Then, I attached them to new interfaces on the VirtualBox guest VM (packetfence). They show up as unique interfaces in the guest VM.

(nic1 is the default nic -> management IP)

VBoxManage modifyvm "PacketFence" --nic2 bridged --bridgeadapter2 eth0.290
VBoxManage modifyvm "PacketFence" --nic3 bridged --bridgeadapter3 eth0.291
VBoxManage modifyvm "PacketFence" --nic4 bridged --bridgeadapter4 eth0.292
VBoxManage modifyvm "PacketFence" --nic5 bridged --bridgeadapter5 eth0.390
VBoxManage modifyvm "PacketFence" --nic6 bridged --bridgeadapter6 eth0.391
VBoxManage modifyvm "PacketFence" --nic7 bridged --bridgeadapter7 eth0.392

boot the Guest VM (packetfence) and log in as root (to the shell prompt)

I added the interfaces (eth2 thru eth7) to the guest VM. In my case, I wanted a static IP assigned to each of the vlan interfaces.
example:
[***@pf-zen-desktop network-scripts]# more ifcfg-eth3
DEVICE=eth3
# was ifcfg-eth2.290
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
IPADDR=10.200.1.10
NETMASK=255.255.0.0

(repeat for each VLAN interface)

Once that is done, edit the packetfence config and change all the vlan "eth0.290" or whatever vlan references to match the new interfaces
example:
vi /usr/local/pf/conf/pf.conf
(change [interface eth2.290] )
to:
[interface eth3]
ip=10.200.1.10
.
.
.
mask=255.255.0.0

repeat that for each of the VLAN interfaces.

I have been using this setup and it works great with VirtualBox.
----- Original Message -----

From: "Primoş Marinšek" <***@gmail.com>
To: packetfence-***@lists.sourceforge.net
Sent: Thursday, October 18, 2012 4:40:17 AM
Subject: [PacketFence-users] Packetfence in virtual environment

Dear All

I hope I'll not get shut down too fast here, but I've hit a wall.

I'm testing (or would like to) PF to evaluate it and see if we can implement it into some of our solutions. It looks great on paper so I thought I'd give it a try.

I've installed PF running on VirtualBox thinking "what could go wrong", but I found out soon enough that VLANs are the problem. I've been reading of some workarounds for this, but it seem a waste of time for this.

Is VMware Player any better that VirtualBox at this or is the ESXi the only solution for this?

I just want to run PF on my ubuntu to give it a try with our WLAN network.
--
Primoş Marinšek


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
PacketFence-users mailing list
PacketFence-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/packetfence-users
Brian Candler
2012-10-19 19:31:07 UTC
Permalink
Post by Randy Prothero
DEVICE=eth0.290
VLAN=yes
ONBOOT=yes
BOOTPROTO=dhcp
I think the OP said they were running Ubuntu for the host. In that case
you need:
apt-get install vlan
and you edit /etc/network/interfaces to add interfaces like eth0.XXX

http://ubuntuforums.org/showthread.php?t=703387
Maciej Uhlig
2012-10-21 16:00:29 UTC
Permalink
Post by Randy Prothero
I have VirtualBox working with the PacketFence zen VM that is
downloadable from the PacketFence site.
I'm trying to go your way. I use Windows 7, VirtualBox 4.2.2 and
PacketFence ZEN 3.5.1 for VMware. My problem is as follows:

PF VM boots with one network interface which is eth3 instead of eth0.
eth3 is down and doesn't get IP address from VB DHCP server.

Why not the intended interface is assigned by VB? Any hints?

MU
Maciej Uhlig
2012-10-29 08:39:49 UTC
Permalink
Post by Maciej Uhlig
PF VM boots with one network interface which is eth3 instead of eth0.
eth3 is down and doesn't get IP address from VB DHCP server.
Why not the intended interface is assigned by VB? Any hints?
Actually I'm able to answer this question. There is a file in
PacketFence VMware image:

/etc/udev/rules.d/70-persistent-net.rules

which contains descriptions of ethernet interfaces eth0, eth1, eth2 and
eth3. VirtualBox assigns ethernet interface to eth3. One need to delete
eth0, eth1, and eth2 descriptions and edit eth3 description to be eth0.
Then shutdown VM. After reboot, eth0 only is present.

As far as lack of eth0 IP address is concerned, this is due to a bug in
OS /sbin/dhclient.

These remarks are of minor importance, for the records only, I'll even
don't file bug reports, developers eventually may take it into account.

MU

Randy Prothero
2012-10-22 12:49:14 UTC
Permalink
My host is running CentOS, not Windows 7.

I am not sure if Windows 7 can 'add' virtual adapters for each VLAN you want to access... IF it can, add the VLAN interfaces and then map them through using VBoxManage commands to the Packetfence guest VM.

The interfaces are all 'bridge' mode, not NAT. They should all get IP from each VLAN dhcp server.

----- Original Message -----

From: "Maciej Uhlig" <***@us.edu.pl>
To: packetfence-***@lists.sourceforge.net
Sent: Sunday, October 21, 2012 12:00:29 PM
Subject: Re: [PacketFence-users] Packetfence in virtual environment


Randy Prothero:



I have VirtualBox working with the PacketFence zen VM that is downloadable from the PacketFence site.



I'm trying to go your way. I use Windows 7, VirtualBox 4.2.2 and PacketFence ZEN 3.5.1 for VMware. My problem is as follows:

PF VM boots with one network interface which is eth3 instead of eth0. eth3 is down and doesn't get IP address from VB DHCP server.

Why not the intended interface is assigned by VB? Any hints?

MU

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
PacketFence-users mailing list
PacketFence-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/packetfence-users
Loading...