<?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; virtualbox</title>
	<atom:link href="http://www.edwardstafford.com/tag/virtualbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edwardstafford.com</link>
	<description>Technologist, Artist, and Geek</description>
	<lastBuildDate>Thu, 12 Aug 2010 17:59:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How-To: Using VBoxManage to Delete a Virtual Machine from VirtualBox</title>
		<link>http://www.edwardstafford.com/2009/11/08/how-to-using-vboxmanage-to-delete-a-virtual-machine-from-virtualbox/</link>
		<comments>http://www.edwardstafford.com/2009/11/08/how-to-using-vboxmanage-to-delete-a-virtual-machine-from-virtualbox/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 19:48:43 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[VBoxManage]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/?p=206</guid>
		<description><![CDATA[One common problem I see from people learning to manage Virtual Machines within VirtualBox using the VBoxManager command line is the error: Cannot unregister the machine &#60;Virtual-Machine-Name&#62;  because it has 1 hard disks attached Before a VM can be unregistered or deleted, all disks that have been &#8220;attached&#8221; need to first be disassociated from the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-224" title="delete" src="http://www.edwardstafford.com/wp-content/uploads/delete-150x150.jpg" alt="delete" width="150" height="150" />One common problem I see from people learning to manage Virtual Machines within VirtualBox using the VBoxManager command line is the error:</p>
<blockquote style="margin-left:160px"><p>Cannot unregister the machine &lt;Virtual-Machine-Name&gt;  because it has 1 hard disks attached</p></blockquote>
<p>Before a VM can be unregistered or deleted, all disks that have been &#8220;attached&#8221; need to first be disassociated from the VM. For this example, I&#8217;m using a virtual machine that I have set up and named &#8220;<strong>VNAS</strong>&#8221; that was used to test an OpenFiler NAS installation (which, by the way, worked great). Now that testing is complete, I am ready to remove it.</p>
<p>The removal for a standard VM install can be completed in a short list of steps.</p>
<p><strong>Step one</strong>: Get the name or UUID and details of your VM</p>
<blockquote><p><strong>VBoxManage list vms</strong></p>
<p>VirtualBox Command Line Management Interface Version 3.0.8<br />
(C) 2005-2009 Sun Microsystems, Inc.<br />
All rights reserved.</p>
<p>&#8220;VNAS&#8221; {8a48759d-4e6d-473f-ab0f-8ff59aa727eb}</p></blockquote>
<p>That command will return the names of all registered VMs and their UUID. Make sure you get the correct name or UUID for the VM you will be modifying.</p>
<p><strong>Step two</strong>: Get the disc information for your VM</p>
<p>There are two methods you can use to the get the information for each virtual disk registered to a virtual machine. The first is to list the VM info for a specified VM which includes the Virtual Disks that are in use by it.</p>
<p>VBoxManage showvminfo &lt;Virtual Machine Name or UUID&gt;</p>
<blockquote><p><strong>VBoxManage showvminfo VNAS</strong><br />
VirtualBox Command Line Management Interface Version 3.0.8<br />
(C) 2005-2009 Sun Microsystems, Inc.<br />
All rights reserved.</p>
<p>Name:            VNAS<br />
Guest OS:        Other/Unknown<br />
UUID:            8a48759d-4e6d-473f-ab0f-8ff59aa727eb<br />
Config file:     /secondary/.Virtual/machines/VNAS/VNAS.xml<br />
Memory size:     512MB<br />
VRAM size:       8MB<br />
Number of CPUs:  1<br />
Boot menu mode:  message and menu<br />
Boot Device (1): Floppy<br />
Boot Device (2): DVD<br />
Boot Device (3): HardDisk<br />
Boot Device (4): Not Assigned<br />
ACPI:            on<br />
IOAPIC:          off<br />
PAE:             on<br />
&#8230;<br />
<strong> Primary master:  /secondary/.Virtual/vdisks/OFInstallDisk (UUID: xxxxxxx)<br />
Primary slave:   /secondary/.Virtual/vdisks/VNASStore1 (UUID: xxxxxxx)<br />
Secondary slave: /secondary/.Virtual/vdisks/VNASStore2 (UUID: xxxxxxx)</strong><br />
&#8230;</p></blockquote>
<p>In this example you can see I have 3 disks registered with the vm.</p>
<ul>
<li>Primary Master (<strong>hda</strong>)</li>
<li>Primary Slave (<strong>hdb</strong>)</li>
<li>Secondary Slave (<strong>hdd</strong>)</li>
</ul>
<blockquote><p>NOTE: You might be asking, Why does the sequence jump from hdb to hdd? What happened to hdc? The answer is, hdc is reserved for CD/DVD mounting, so you can&#8217;t add a virtual disk there.</p></blockquote>
<p>The second, alternative method is to use the the VBoxManage command &#8220;list&#8221; with the &#8220;hdds&#8221; option to list all the Virtual Disks in the system. This will display a list of All the disks you have created and registered for ALL VMs. Information for each Virtual Disk and the VM it is registered to is displayed. Here you can see the three disks registered with my VNAS VM indicated by the &#8220;Usage&#8221; lines.</p>
<blockquote><p><strong>VBoxManage list hdds</strong></p>
<p>UUID:         eebbb4c7-c539-4da4-b8ab-e5777b32520b<br />
Format:       VDI<br />
Location:     /secondary/.Virtual/vdisks/VNASStore1<br />
Accessible:   yes<br />
Usage:        <strong>VNAS </strong>(UUID: 8a48759d-4e6d-473f-ab0f-8ff59aa727eb)</p>
<p>UUID:         9f238d31-f794-420f-83a7-ccf811d52244<br />
Format:       VDI<br />
Location:     /secondary/.Virtual/vdisks/VNASStore2<br />
Accessible:   yes<br />
Usage:        <strong>VNAS </strong>(UUID: 8a48759d-4e6d-473f-ab0f-8ff59aa727eb)</p>
<p>UUID:         2ce976c9-0a37-49c1-8d34-3962c563a256<br />
Format:       VDI<br />
Location:     /secondary/.Virtual/vdisks/OFInstallDisk<br />
Accessible:   yes<br />
Usage:        <strong>VNAS </strong>(UUID: 8a48759d-4e6d-473f-ab0f-8ff59aa727eb)</p></blockquote>
<p>In my opinion, method one the easiest quickest way to see what Virtual disks are assigned to a specific VM.</p>
<p><strong>Step Three</strong>: Disassociate the Virtual Disk[s]</p>
<p>VBoxManage modifyvm &lt;Virtual Machine Name or UUID&gt; &#8211;<strong>hda</strong> none</p>
<blockquote><p><strong>VBoxManage modifyvm VNAS &#8211;hda none </strong></p></blockquote>
<p>If you have more than one disk registered with a vm as I do here, you&#8217;ll also need to disassociate those as well.</p>
<blockquote><p>VBoxManage modifyvm VNAS &#8211;<strong>hdb </strong>none</p>
<p>VBoxManage modifyvm VNAS &#8211;<strong>hdd </strong>none</p></blockquote>
<p><strong>Step Four</strong>: Unregister and delete the VM</p>
<p>VBoxManage unregistervm &lt;Virtual Machine Name or UUID&gt; &#8211;delete</p>
<blockquote><p><strong>VBoxManage unregistervm VNAS &#8211;delete</strong></p></blockquote>
<p><strong>Step Five</strong>: Confirm</p>
<blockquote><p><strong>VBoxManage list vms</strong></p>
<p>VirtualBox Command Line Management Interface Version 3.0.8<br />
(C) 2005-2009 Sun Microsystems, Inc.<br />
All rights reserved.</p>
<p>[NOTE: there are no VMs listed]</p></blockquote>
<p>This is the same command that was executed in step one. After running this command again you should no longer see your Virtual Machine listed.</p>
<p>Note: This process will only remove your VM from VirtualBox. It will not remove/delete the actual virtual disk file (.vdi). You can delete that manually, or save it to use with another virtual machine instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2009/11/08/how-to-using-vboxmanage-to-delete-a-virtual-machine-from-virtualbox/feed/</wfw:commentRss>
		<slash:comments>6</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>11</slash:comments>
		</item>
	</channel>
</rss>
