<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Edward Stafford&#187; virtualization</title>
	<atom:link href="http://www.edwardstafford.com/tag/virtualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edwardstafford.com</link>
	<description>Technologist, Artist, and Geek</description>
	<lastBuildDate>Wed, 24 Nov 2010 00:37:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>VirtualBox and Bridged Networking on a Headless Ubuntu Server Host</title>
		<link>http://www.edwardstafford.com/2009/09/13/virtualbox-and-bridged-networking-on-a-headless-ubuntu-server-host/</link>
		<comments>http://www.edwardstafford.com/2009/09/13/virtualbox-and-bridged-networking-on-a-headless-ubuntu-server-host/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 00:06:04 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/?p=195</guid>
		<description><![CDATA[In the previous VirtualBox post, I explained how (and how not) to set up bridged networking with LAN access to a Virtual Machine running on a Windows XP Host. Today I will explain how to do the same thing (without the How Not To part) using a virtual Machine running on a Headless Ubuntu Server. For this [...]]]></description>
			<content:encoded><![CDATA[<p>In the previous VirtualBox post, I explained <a href="http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/" target="_blank">how (and how not) to set up bridged networking with LAN access to a Virtual Machine</a> running on a Windows XP Host. Today I will explain how to do the same thing (without the How Not To part) using a virtual Machine running on a Headless Ubuntu Server.</p>
<p>For this example we can assume a few things:</p>
<ol>
<li>You have already set up a headless VirtualBox server</li>
<li>You have already created a Virtual Machine instance. For this sample, we will call the Virtual Machine &#8220;MyVM&#8221;.</li>
</ol>
<p>Believe it or not, setting up bridged networking to allow your VM to access your network is pretty simple and completed by issuing the following VBoxManage command in a terminal window.</p>
<p><strong>Command</strong>: VBoxManage modifyvm &#8220;MyVM&#8221; &#8211;nic1 bridged &#8211;nictype1 82540OEM &#8211;bridgeadapter eth0</p>
<p><strong>Break it down</strong></p>
<p>To understand a bit more about what&#8217;s happening here, let&#8217;s break down the command string from the beginning.</p>
<p><strong>VBoxManage </strong>- This is the command line utility used to access, control, configure and manage your VirtualBox Virtual Machines.</p>
<p><strong>modifyvm </strong>- This command allows you to make changes to the properties of a Virtual Machine, including the amount of memory assigned, nic interfaces, Virtual device boot sequence, number of CPUs, etc. It can be compared to the Settings dialog of the VirtualBox Graphical user Interface. The command line version, however, offers additional advanced options not found in the GUI.</p>
<p>Note: the VM must be registered within VirtualBox, but must not be running</p>
<p>&#8220;<strong>MyVM</strong>&#8221; &#8211; This is simply the name of the VM you want to modify.</p>
<p><strong>&#8211;nic1 bridged </strong>- The &#8211;nic1 parameter is used to set the type of networking your VM should use for each of the it&#8217;s virtual network cards. You can have more than one network card in use for a VM so the paramater is written as &#8211;nic<strong>X</strong> where <strong>X</strong> is the network card being targeted. Here, &#8220;&#8211;nic1&#8243; is the first network interface, &#8211;nic2 would be the second and so on. This portion of the command string is setting the type of networking on the first interface to &#8220;bridged&#8221;.</p>
<p><strong>&#8211;nictype1 82540OEM</strong> &#8211; The &#8211;nictype1 parameter allows you to specify which networking hardware VirtualBox should emulate for the VM&#8217;s virtual network cards. Here we set the networking hardware to emulate an Intel PRO/1000 MT Desktop card or 82540EM.</p>
<p>&#8211;nictype<strong>X</strong> follows the same sequence numbering and &#8211;nic<strong>X</strong> for multiple interfaces where &#8211;nictype1 is the first virtual card, &#8211;nictype2 is the second and so on.</p>
<p>Note:  The following is a list of the available nic hardware types and the associated ID recognized in VirtualBox.</p>
<ul>
<li>AMD PCNet PCI II = Am79C970A</li>
<li>AMD PCNet FAST III = Am79C973 (the default)</li>
<li>Intel PRO/1000 MT Desktop = 82540EM</li>
<li>Intel PRO/1000 T Server = 82543GC</li>
<li>Intel PRO/1000 MT Server = 82545EM</li>
<li>Paravirtualized network adapter = virtio-net</li>
</ul>
<p><strong>&#8211;bridgeadapter1 eth0</strong> &#8211; Finally we have the &#8211;bridgeadapter paramater. This is the only part of the command string that references a part of the VirtualBox host and tells your VM which physical host adapter to pass it&#8217;s traffic through.</p>
<p>Again, this uses the same sequence numbering as nicX and nictypeX for multiple interfaces. Here, we are setting the bridgeadapter for our first virtual network card to use the eth0  interface on the host. Note that is eth zero, as in the number and not the letter O.</p>
<p>And that&#8217;s it. Restart your VM and you should now have a working bridged network interface for you VM with full network and internet access.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2009/09/13/virtualbox-and-bridged-networking-on-a-headless-ubuntu-server-host/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VirtualBox 3.0.4 and Bridged Networking on XP Host with GUI</title>
		<link>http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/</link>
		<comments>http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 23:09:11 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/?p=130</guid>
		<description><![CDATA[Editors Note: While I was writing this, the solution to my problem struck me unexpectedly. Click here to skip the drama and jump right ot the solution. Originally, this article started out as a complete rant and cry for help. I started to write about the failure and frustration of the installation and network configuration [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_182" class="wp-caption alignleft" style="width: 250px"><img class="size-full wp-image-182" title="Queensboro Bridge" src="http://www.edwardstafford.com/wp-content/uploads/152454397_2adf0b67f5_m.jpg" alt="Photo: Wally Gobetz" width="240" height="160" /><p class="wp-caption-text">Photo: Wally Gobetz</p></div>
<h2>Editors Note:</h2>
<p>While I was writing this, the solution to my problem struck me unexpectedly. <a href="http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/#solution">Click here to skip the drama and jump right ot the solution.</a></p>
<p>Originally, this article started out as a complete rant and cry for help. I started to write about the failure and frustration of the installation and network configuration of a virtual machine in VirtualBox 3.0.4.  It just would not work. The problem, as it turned out, was that I was over thinking the process. BUT, that is not completely my own fault.</p>
<p><span id="more-130"></span></p>
<p>See, here&#8217;s the problem. Before starting anything new, I read, research, and read some more to get as much of an understanding as I can on the subject. In this case, the official documentation of VirtualBox 3.0.4 in my opinion is incomplete and did not include some of the specific details that would have made this setup much less painful. Combine that with the piles of information regarding networking configuration in previous versions, and it&#8217;s easy to get some wires crossed. Networking in version 3.0.4 was largely improved and simplified, meaning a lot of the information available online, in forums, on blogs, etc, is irrelevant to the new version and the current documentation does not do a great job of explaining the changes and how to set up networking, specifically bridging, in the new version.</p>
<p>In my research and troubleshooting I&#8217;ve seen many others who describe the same problems I had while trying to set this up under version 3.0.4, so in the spirit of passing on my experience and what I learned from it, I am going to keep my original writing here so you can see what I was doing and why it was wrong. If you want to skip to the solution, please <a href="#solution">click here.</a></p>
<div style="padding: 15px; border: 1px solid black; background-color: #dcdcdc; margin-bottom: 20px;">
<h2>The Original Post (the wrong way)</h2>
<p>Ok, here it is. Frustration has finally gotten the best of me and I have no  idea where to go from here. What am I talking about, you ask? I&#8217;m talking about setting up a Virtual Machine (VM) using VirtualBox 3.0.4 on a Windows XP Host.</p>
<p>Let&#8217;s take a look at what has brought me to this state of utter frustration.</p>
<p>A while back, I downloaded and installed VirtualBox to set up VMs to test and play around with some different Operating Systems and Software. To be honest, it works Great for that purpose. But now, I want to take my virtualization experience to the next level and have been thinking about installing FreeNAS in a VM to serve as a NAS solution and making it available to all PCs  across a production LAN.</p>
<h2>The Parts:</h2>
<p>I have a Windows XP sp2 machine sitting at home that is not getting much use that would be perfect for trying this out.</p>
<h3>Specs:</h3>
<ul>
<li>Windows XP sp2</li>
<li>4 Gigs of RAM</li>
<li>500 Gig HD</li>
<li>Intel Quad Core Processor</li>
<li>Single on-board G-bit network adapter.</li>
</ul>
<p>I know there is a bit to cover and become familiar with when setting out to connect a Local LAN to a VM in the same address space, so I did my research first.</p>
<p>I downloaded and printed the VirtualBox user manual. Reading through it I highlighting the parts that I thought were important or significant. The documentation seems a little incomplete and is NOT all that well written for someone just getting started.  There are no guides or instruction that specifically marks the steps for setting up the different types of network options. So I figure, fine! After reading the manual, I should have some idea of the basic requirements. I can just do a search on the net and piece together the rest of the information.</p>
<p>That sounded like a good idea a first, but in practice..not so much. The web served up a LOT of information related to VirtualBox network bridging and configuration. The problem is that a lot of it was contradictory and there is almost no information specific to version 3.0.4. I read through forums, blogs, papers and anything else that looks like it might help. In the end, nothing was extraordinarily helpful.</p>
<h2>Host OS (Windows XP)</h2>
<p><strong>Physical Network Adapter</strong>: Local Area Connection (2)  NVidia NForce Network Controller (Bridged /Connected)</p>
<p><strong>Virtual Host Adapter</strong>: VirtualBox Host-Only Network</p>
<p><strong>Bridged Adapter (Local Area Connection (2) + VirtualBox Host-Only Network)</strong>:  Network Bridge (Network Bridge)</p>
<p>Note that the Host adapters were set to <em>Compatible Mode</em> as recommended by several forum posts and blogs.</p>
<div id="attachment_131" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-131" title="virtualboxinstallseries-11" src="http://www.edwardstafford.com/wp-content/uploads/virtualboxinstallseries-11-300x45.png" alt="Screen netsh bridge compatmode" width="300" height="45" /><p class="wp-caption-text">Screen netsh bridge compatmode</p></div>
<h2>Guest OS (FreeNAS/ Linux Based)</h2>
<p>Network settings for the guest were set up using</p>
<p><strong>Adapter Type</strong>: IntelPRO/1000 MT Desktop. This was selected based on recommendations that appeared repeatedly in forums and blogs.</p>
<p><strong>Attached to</strong>: Bridged Adapter</p>
<p><strong>Name</strong>: MAC Bridge Miniport &#8211; This was the only selection available in the menu.</p>
<div id="attachment_133" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-133" title="virtualboxinstallseries-8" src="http://www.edwardstafford.com/wp-content/uploads/virtualboxinstallseries-8-300x266.png" alt="VM Network Configuration" width="300" height="266" /><p class="wp-caption-text">VM Network Configuration</p></div>
<p>Installing the Guest</p>
<p>During the installation of  FreeNAS, I used static IP information</p>
<ul>
<li>IP Address: 192.168.15.115</li>
<li>Netmask: 255.255.255.0</li>
<li>Gateway: 192.168.15.3 (LAN Router private IP)</li>
<li>DNS Server: ISP DNS IP</li>
</ul>
</div>
<h1>Errrrrrttttttt&#8230;.</h1>
<p>(that&#8217;s my best screatching to a stop text effect).</p>
<p>It&#8217;s amazing how when you step away from a problem and look at it from another angle, how easy the solution comes to you. By writing out my thoughts here and stepping through all the little details, something hit me and it is THE key piece of information that is missing between setting up older versions of VirtualBox and Version 3.0.4.</p>
<p>There were a number of references that said networking and bridging in the new version was completely refigured and the process was very simple. Basically, just create a bridge &#8211; But no details were ever provided on what that meant exactly. Based on all the &#8220;old&#8221; information and lack of new detailed explainations, I figured it meant to create bridged connections on the host and use that as the Guest bridged adapter. What if the solution is even simpler  than that. It&#8217;s worth a try&#8230;Soooo</p>
<p>I went back to my Host settings (Windows XP Network settings) and tore down the bridge and restored my original adapters and IP information. Now I only have<strong> Local Area Connection (2)</strong> and <strong>VirtualBox Host-Only Network </strong>shown. From here I went back to the VirtualMachine Network settings and listed in the &#8220;<strong>Name</strong>&#8221; menu instead of  &#8220;<strong>MAC Bridge Miniport</strong>&#8221; I now had the two Host adapters listed. (Local Area Connection (2)  and VirtualBox Host-Only Network).</p>
<p>I selected the physical Host Adapter (Local Area Connection (2)), restarted the VM and to my amazement.. It all worked.</p>
<h1><a name="solution"></a> (the right way)</h1>
<p>In the end, this is how you set up bridged networking between Virtual Machines and the LAN with VirtualBox 3.0.4</p>
<h3>Windows XP Hosted VirtualBox &#8211; using the GUI:</h3>
<h4>Host Network Settings:</h4>
<p>This part is easy. <strong>Do nothing</strong>. That&#8217;s right, <span style="text-decoration: underline;">nothing!</span> No changes are necessary for the host&#8217;s interfaces or network settings (as long as you already have a working interface). <span style="text-decoration: underline;"><strong> </strong></span></p>
<p><span style="text-decoration: underline;"><strong>DO NOT</strong></span> create or bridge any interfaces on the host system. Leave the network interfaces on your host OS (physical) alone.</p>
<h4>Guest Network Settings:</h4>
<p>Start VirtualBox and highlight the Virtual Machine you want to modify from the list on the left. Once highlighted, select &#8220;network&#8221; under the &#8220;details&#8221; tab on the right.</p>
<p style="text-align: center;">
<div id="attachment_175" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-175" title="VirtualBox_VM_select" src="http://www.edwardstafford.com/wp-content/uploads/VirtualBox_VM_select-300x275.png" alt="Select VM" width="300" height="275" /><p class="wp-caption-text">Select VM</p></div>
<p>You should now see a window displaying the Network settings for your VM.  From here, the Adapter 1 tab and make sure the &#8220;Enable Network adapter&#8221; checkbox is selected.</p>
<p><img class="aligncenter size-medium wp-image-174" title="Virtual_FreeNAS_Network_settings_1" src="http://www.edwardstafford.com/wp-content/uploads/Virtual_FreeNAS_Network_settings_1-300x265.png" alt="Virtual_FreeNAS_Network_settings_1" width="300" height="265" /></p>
<p>Next to &#8220;Adapter Type&#8221; select &#8220;Intel Pro/1000 MT Desktop&#8221; or &#8220;Intel Pro/1000 MT Server&#8221; from the menu. These have a higher rate of success when used in this way. I had some trouble with the PCnet II and PCnet III adapter Types.</p>
<div id="attachment_177" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-177" title="0055_2009" src="http://www.edwardstafford.com/wp-content/uploads/0055_2009-300x193.png" alt="Select Adapter Type" width="300" height="193" /><p class="wp-caption-text">Select Adapter Type</p></div>
<p>Next to &#8220;Attached to&#8221; select &#8220;Bridged Adapter&#8221; from the menu.</p>
<div id="attachment_178" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-178" title="0056_2009" src="http://www.edwardstafford.com/wp-content/uploads/0056_2009-300x196.png" alt="Select Bridged Adapter" width="300" height="196" /><p class="wp-caption-text">Select Bridged Adapter</p></div>
<p>Finally, next to &#8220;Name&#8221; select your Host system&#8217;s network interface from the menu. In this case, my host system interface is the on-board &#8220;NVIDIA nForce Networking Controller&#8221;. Your options will likely be different based on the interface installed of in use.</p>
<div id="attachment_176" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-176" title="Host Interface Selection" src="http://www.edwardstafford.com/wp-content/uploads/0057_2009-300x196.png" alt="Select Host System interface to be bridged." width="300" height="196" /><p class="wp-caption-text">Select Host System interface to be bridged.</p></div>
<p>That is all there is to it. Just hit the &#8220;OK&#8221; button in the main settings window and start your VM. As long as the Guest OS on your VM hs been configured with the correct IP/network information for your LAN, you should now be able to ping and access it from any PC on your network.</p>
<h2>Conclusion: So simple, even a Caveman can do it!</h2>
<p>Initial frustration aside, in the end, I really have to give props to Sun/VirtualBox for actually making this incredibly simple to set up. On the other hand, they lose points for failing to make this clear in the documentation.</p>
<h2>Final Note:</h2>
<p>Since posting this, VirtualBox 3.0.6 has been released. Considering how easy this is to set up in 3.0.4, I can only guess that it is just as simple in 3.0.6. After all, it would not make much sense to make any changes that would make the process more difficult.</p>
<p>I hope you find this information helpful or useful and hopefully can use it to avoid the mistakes I made. Have a question, suggestion, better way of doing this or just want to leave some feedback? Please leave a comment.</p>
<h2>Updates:</h2>
<p><strong>VirtualBox 3.0.6</strong> &#8211; Confirmed / Working<br />
<strong>VirtualBox 3.1.8</strong> &#8211; Confirmed / Working</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

