Posts tagged LAN

VirtualBox Windows Vista – Host Network Bridge and Tap

This entire post is no longer applicable to the most recent version of VirtualBox. Here is a more recent post.

VirtualBox is well equipped for a Windows environment. Most of its features have a mechanism for automatic installation and setup. To get your guest OS, in Windows Vista, to have a real IP address from your router you first need a network bridge and tap. Open the VirtualBox manager:

VirtualBox manager screenshot

Then select a guest OS and open its settings. Then click the network tab:
VirtualBox manager network tab

Then click the add network tap button:
Add network tap button

It doesn’t matter what the name is :) Then adjust your guest OS networking adapter accordingly.

Enable host network

Now open your Windows Vista network configurations manager:

Microsoft Vista network configuration

This screenshot is what your network configurations should be after everything is done. To achieve this simply select both the VirtualBox tap, that was previously created, and bridge it to your LAN connection. Select both by click on each adapter while pressing the shift key. Then right click on either of the two highlighted icons and select “bridge”. This will automatically create a bridge between the tap and your real host networking adapter. Wham bam, now you can select a real static IP in your VirtualBox guest OS on a Windows Vista system :)

Update (12/4/2009); At the top of this post I say that the information here is outdated. You can view the post listed above if you want, but here are the pertinent screenshots also:

Here is a screen from Windows Vista. Go to the network tab of the virtual machine settings:

Network settings

Then select the attach to drop down menu:

Attach

Then change the attach to, drop down menu, to bridged adapter:

Bridged adapter

Cron Server Backup Scripts

Update: Don’t configure cron.hourly etc. manually. Configure it with crontab.

I use three scripts that completely backup my entire server. Two scripts I place in my cron.hourly folder, and one I use in my cron.daily. For hourly backup I export all my databases, and then transfer them via an automated ssh connection to another computer on my local area network. For Mysql database export I use a wonderful script that I found on sourceforge http://sourceforge.net/projects/automysqlbackup/. It has a couple of configurations, and all is self explanatory when you open the file in a text editor. Once your done editing the file to suit your mysql parameters, and desired backup folder location, just plop the file in your /etc/cron.hourly to have it run every hour. Then you can use ssh to transfer the mysql backup folder to another computer!! Make a simple script as follows:

scp /home/user/mysqlbackup/* user@othercomputerip:mysqlbackup/

Use this format to make an automated script to transfer your mysqlbackup folder to another computer via ssh. As with the mysql export script, when your done with the ssh transfer script just plop it in your /etc/cron.hourly folder for automated hourly operation. I also use a daily backup script to transfer, via ssh, my entire website directory. Since I have about 10 GB on the directory, due to the file repository, the ssh over LAN connection comes in handy due to its relatively high speed. Getting speed around 7.7 Mb/s the entire root server directory is backed up in about 15 minutes. To do this just use the same formatting as the ssh transfer script above, but set the directory to be your root server directory. You can place the script in your /etc/cron.daily folder, or any other for that matter :)