OpenIndiana, NFS and VirtualBox slow network solution
Posted: 16. Oct 2011, 09:53
Hi all,
I was having issues with VirtualBox 4.1.4 on OpenIndiana, when ever a VM with Bridged networking was running NFS performance (using ZFS NFS sharing) was terrible (7Mb/s as apposed to around 700Mb/s when no VM was running).
But using Crossbow I was able to workaround the problem and have everything working well, so I though I would post my findings in the hope it helps others, another solution is the bridge VM's to a dedicated NIC as I found on this site... http://www.mobygeek.net/blog/2011/09/19 ... x-and-nfs/, I was unable to use this solution as my server has a single NIC (its a HP Microserver).
I used Crossbow to create a virtual NIC, then bridge the VM to that. There are some limitations though, you need to use one VNIC per virtual machine and the MAC address of the VNIC must be used as the MAC address on the virtual machine.
So on my machine the one NIC is bge0 and the VM is called server, so these are the commands I used:
Note: The MAC address doesn't have leading zero's
At this point I noted down the MAC address for vnic1 (padding it with zeros where required, then ran the command below to modify the VM and bridge it to vnic1.
These configuration changes survive a reboot so there is nothing more to do to keep it working long term.
I then started up the virtual machine and my NFS was flying along at 700Mb/s and the VM was also working well, although the first few minutes after a reboot tend to be very slow, then it picks up.
I haven't done extensive testing but so far so good.
I was having issues with VirtualBox 4.1.4 on OpenIndiana, when ever a VM with Bridged networking was running NFS performance (using ZFS NFS sharing) was terrible (7Mb/s as apposed to around 700Mb/s when no VM was running).
But using Crossbow I was able to workaround the problem and have everything working well, so I though I would post my findings in the hope it helps others, another solution is the bridge VM's to a dedicated NIC as I found on this site... http://www.mobygeek.net/blog/2011/09/19 ... x-and-nfs/, I was unable to use this solution as my server has a single NIC (its a HP Microserver).
I used Crossbow to create a virtual NIC, then bridge the VM to that. There are some limitations though, you need to use one VNIC per virtual machine and the MAC address of the VNIC must be used as the MAC address on the virtual machine.
So on my machine the one NIC is bge0 and the VM is called server, so these are the commands I used:
Code: Select all
dladm create-vnic -l bge0 vnic1
dladm show-vnic
Code: Select all
LINK OVER SPEED MACADDRESS MACADDRTYPE VID
vnic1 bge0 1000 2:8:20:7a:f7:42 random 0
At this point I noted down the MAC address for vnic1 (padding it with zeros where required, then ran the command below to modify the VM and bridge it to vnic1.
Code: Select all
VBoxManage modifyvm server --nic1 bridged --bridgeadapter1 vnic1 --macaddress1 0208207af742
I then started up the virtual machine and my NFS was flying along at 700Mb/s and the VM was also working well, although the first few minutes after a reboot tend to be very slow, then it picks up.
I haven't done extensive testing but so far so good.