VirtualBox: Windows XP Guest in Linux Fedora 7 Host
As my previous plan to review the using of Windows XP guest in Linux host over VirtualBox, I decided to choose my existing Fedora 7 as the 2nd OS boot from my laptop as the host OS. Actually, my priority subjected to this than the previous. The main purpose is to make simply my coding time when I have a web based project & also the debugging sessions. It’s important for me to keep a maximum compatibility cross browser looks & functionality between Internet Explorer, Firefox, Opera compared to the native Linux internet browser such as Konqueror. Now, I don’t have to wasting time to test & re-code the source between browser on separated systems. Switching the OS are more faster than have a dual boot systems. It’s also more easy when you need to carry 2 systems on a single PC or laptop. Again, think about it!
To did this, I used the older VirtualBox 1.3.8 downloaded from the website. Even that the latest 1.4.0 version are equipped with pre built-in networking bridging tools, but I was too curious about what happened inside the bridging process over Linux using User Model Linux (UML) utilities. That’s the reason why I choose the older version. Okay, let assumed that you have already a Windows XP system fresh installed as the guest OS or simply using the VDI image file created from the VirtualBox Windows based likes I described before. FYI, my laptop is dual booted with Windows XP & Fedora 7. Each of it are installed with VirtualBox (1.4.0 in Windows XP & 1.3.8 in Fedora 7) which using the same Windows XP VDI image file. It’s saving the space enough! So, logically now I have 4 systems in a single laptop.
The critical point to create a network emulated adapter device in Linux is that you have to provide the bridging tools. The good news is that the brctl tool to makes it are already provided with Fedora 7. The bad is, the tunctl utility doesn’t seems exist since it’s not available as the Fedora repositories. Not to worry, because I have already found an universal architecture UML (tunctl) RPM packaged by crosewarne from a trusted source over the internet. You can downloaded it from here (40 Kb) & install it manually. First of all, make sure that the Linux host OS IP address are 192.168.1.1 & default subnet mask to 255.255.255.0. It’s important way to keep the VDI plug & play if you decided to using my scenario (4 systems in a single laptop).
Next, to simplify the TUN/TAP process, create an executable bash script & stored it in /bin folder. Named it with tuntap. Below is the value of the file.
Note:
Replace the line “ifconfig br0 192.168.1.10” with “dhclient br0” (w/o apostrophe) if you are in a DHCP environment or you can read here for more detail.
Run the script by typing tuntap on terminal. If everything is good, now you already have a networking bridged from the primary network adapter.
Next, open the VirtualBox VM settings, click on a Network session. On the Host Interface Settings group box, fill the Interface Name with tap1. Press OK to confirm.
Then, let’s start the guest OS.
Skip below configuration if you are using the VDI file from Windows host like I described earlier. Set the guest OS IP address with 192.168.1.11 & default subnet mask to 255.255.255.0. Note that this configuration becomes the guest OS IP address. Now, back to host OS, from Linux terminal, ping to the guest OS. It should now responding.
Make sure that the guest OS also brings the same reply with pinging to the host OS.
That’s the sign that your both host & guest systems are being operating well. Now, it’s up to you, whether you like to create a map network drive or something else to support your own jobs.
It’s done. Now you have both Windows XP & Linux system runs simultaneously with active networking right on a single computer.
To did this, I used the older VirtualBox 1.3.8 downloaded from the website. Even that the latest 1.4.0 version are equipped with pre built-in networking bridging tools, but I was too curious about what happened inside the bridging process over Linux using User Model Linux (UML) utilities. That’s the reason why I choose the older version. Okay, let assumed that you have already a Windows XP system fresh installed as the guest OS or simply using the VDI image file created from the VirtualBox Windows based likes I described before. FYI, my laptop is dual booted with Windows XP & Fedora 7. Each of it are installed with VirtualBox (1.4.0 in Windows XP & 1.3.8 in Fedora 7) which using the same Windows XP VDI image file. It’s saving the space enough! So, logically now I have 4 systems in a single laptop.
The critical point to create a network emulated adapter device in Linux is that you have to provide the bridging tools. The good news is that the brctl tool to makes it are already provided with Fedora 7. The bad is, the tunctl utility doesn’t seems exist since it’s not available as the Fedora repositories. Not to worry, because I have already found an universal architecture UML (tunctl) RPM packaged by crosewarne from a trusted source over the internet. You can downloaded it from here (40 Kb) & install it manually. First of all, make sure that the Linux host OS IP address are 192.168.1.1 & default subnet mask to 255.255.255.0. It’s important way to keep the VDI plug & play if you decided to using my scenario (4 systems in a single laptop).
[root@tuxbook ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1B:24:37:AA:DC
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
[root@tuxbook ~]# service network status
Configured devices:
lo eth0 wlan0
Currently active devices:
lo eth0
Next, to simplify the TUN/TAP process, create an executable bash script & stored it in /bin folder. Named it with tuntap. Below is the value of the file.
#!/bin/bash
tunctl -t tap1 -u root
brctl addbr br0
ifconfig eth0 0.0.0.0 promisc
brctl addif br0 eth0
ifconfig br0 192.168.1.10
brctl addif br0 tap1
ifconfig tap1 up
exit
Note:
Replace the line “ifconfig br0 192.168.1.10” with “dhclient br0” (w/o apostrophe) if you are in a DHCP environment or you can read here for more detail.
Run the script by typing tuntap on terminal. If everything is good, now you already have a networking bridged from the primary network adapter.
[root@tuxbook ~]# ifconfig
br0 Link encap:Ethernet HWaddr 00:1B:24:37:AA:DC
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21b:24ff:fe37:aadc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:9391 (9.1 KiB)
eth0 Link encap:Ethernet HWaddr 00:1B:24:37:AA:DC
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
tap1 Link encap:Ethernet HWaddr 1E:A4:7A:4C:E8:49
inet6 addr: fe80::1ca4:7aff:fe4c:e849/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:70 (70.0 b)
[root@tuxbook ~]# service network status
Configured devices:
lo eth0 wlan0
Currently active devices:
lo eth0 tap1 br0
Next, open the VirtualBox VM settings, click on a Network session. On the Host Interface Settings group box, fill the Interface Name with tap1. Press OK to confirm.
Then, let’s start the guest OS.
Skip below configuration if you are using the VDI file from Windows host like I described earlier. Set the guest OS IP address with 192.168.1.11 & default subnet mask to 255.255.255.0. Note that this configuration becomes the guest OS IP address. Now, back to host OS, from Linux terminal, ping to the guest OS. It should now responding.
Make sure that the guest OS also brings the same reply with pinging to the host OS.
That’s the sign that your both host & guest systems are being operating well. Now, it’s up to you, whether you like to create a map network drive or something else to support your own jobs.
It’s done. Now you have both Windows XP & Linux system runs simultaneously with active networking right on a single computer.
Labels: VirtualBox
PS: If you've benefit from this blog, you can support it by making a small contribution. |
Anonymous said,
Sunday, April 18, 2010 2:09:00 PM
I liked your blog paparadit.blogspot.com. I found your blog recently and was reading it for a few days. I appreciate your time and effort. Keep it that way.
Eko Wahyudiharto said,
Sunday, April 18, 2010 8:45:00 PM
@Anonymous: Thanks for your attention Mr.X. Anyway, if you forgot the address of this blog, you can visit http://www.wahyudiharto.com, this is the home base of my site & you can found blog link from there.