{"id":6811,"date":"2024-11-12T14:24:49","date_gmt":"2024-11-12T19:24:49","guid":{"rendered":"https:\/\/carleton.ca\/scs\/?p=6811"},"modified":"2024-11-12T14:24:49","modified_gmt":"2024-11-12T19:24:49","slug":"creating-a-new-host-only-adapter-in-virtualbox","status":"publish","type":"post","link":"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/","title":{"rendered":"Creating a New Host-Only Adapter in VirtualBox"},"content":{"rendered":"<p><a href=\"#intro\">Why You May Need a VirtualBox Host-Only Adapter<\/a><br \/>\n<a href=\"#what-is-a-virtual-network\">What is a Virtual Network \/ Adapter?<\/a><br \/>\n<a href=\"#setting-up-a-host-only-virtual-network\">Setting Up a Virtual Host-only Network<\/a><br \/>\n<a href=\"#adding-a-host-only-adapter\">Adding a Host-Only Adapter to a Virtual Machine<\/a><br \/>\n<a href=\"#find-and-test-your-host-only-ip\">Find and Test your Host-Only Network IP<\/a><\/p>\n<h2 id=\"intro\">Why You May Need a VirtualBox Host-Only Adapter<img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-319 alignright\" src=\"http:\/\/carleton.ca\/scs\/wp-content\/uploads\/virtualbox150.png\" alt=\"virtualbox150\" width=\"150\" height=\"150\" \/><\/h2>\n<p>Sometimes you would like to be able to network between your <strong>host<\/strong> machine and your <strong>guest <\/strong>machine. These networks can be used for many different reasons, such as <a href=\"https:\/\/carleton.ca\/scs\/technical-support\/virtual-machines\/transferring-files-to-and-from-virtual-machines\/\">transferring files<\/a> between the host and the guest, or to network between multiple virtual machines running on the same host. Different tasks require different methods. This page discusses virtual network adapters and how to set up a host-only adapter to communicate between the guest machine and the host.<\/p>\n<p><a href=\"https:\/\/carleton.ca\/scs\/?p=6811\">Click here<\/a> for a quick-start reference guide.<\/p>\n<h3 id=\"what-is-a-virtual-network\">What is a Virtual Network \/ Adapter?<\/h3>\n<p>When you use a virtual machine, you must set up virtual hardware to interact with the machine. For example, you expose some of your physical memory to act as virtual memory and you can <a href=\"https:\/\/carleton.ca\/scs\/technical-support\/virtual-machines\/transferring-files-to-and-from-virtual-machines\/#shared-folder\">expose folders to act as virtual drives<\/a>. Similarly, we can provide the guest machine with a virtual network adapter so that it can access the internet through our host&#8217;s network adapter. There are different types of virtual network adapters, including:<\/p>\n<ul>\n<li><strong>Network Address Translation (NAT) Adapters: <\/strong>NAT adapters are the simplest form of network adapter. The NAT adapter will give access to your guest as if it were the host, making use of the same address. This is similar to having multiple computers on a home network, which communicate with each other using different addresses (eg. 192.168.1.11 and 192.168.1.15) and all communicate with the internet using the same address (eg. 172.119.27.80)<\/li>\n<li><strong>Bridged Adapters: <\/strong>Bridged adapters lets the guest simulate being a distinct node on the network. This means that a guest machine will communicate externally using a different address than the host (eg. 172.119.27.80 and 172.119.27.85). It is unlikely you can use this adapter on home networks as they typically only allow one external IP address.<\/li>\n<li><strong>Host-Only Adapters: <\/strong>Host-Only adapters (as described in this article) network the host and guest directly. Any other guests running on the host will also be connected. These adapters are an easy way to communicate between guests and experiment with networked machines.<\/li>\n<\/ul>\n<h3 id=\"setting-up-a-host-only-virtual-network\">Setting Up a Virtual Host-only Network<\/h3>\n<p>Before you can start to use host-only adapters you will need to configure a virtual network on the host for them to communicate through. On the main VirtualBox window, click <em>File &gt; Host Network Manager<\/em>. If the list is empty, you will need to set up a new network. You can do this by pressing <em>Create. <\/em>Make sure to enable the DHCP Server by clicking the checkbox on the right side of the network details.<\/p>\n<p>At this point, you can click <em>Properties<\/em> to see the network settings. The default values may be fine, but if the network does not work you can use these properties:<\/p>\n<ul>\n<li><strong>Adapter Tab: <\/strong>\n<ul>\n<li>Check <em>Configure Adapter Manually<\/em><\/li>\n<li><strong>IPv4 Address: <\/strong>192.168.56.1<\/li>\n<li><strong>IPv4 Network Mask:<\/strong> 255.255.255.0<\/li>\n<li>You can leave the IPv6 fields unchanged \/ empty<\/li>\n<\/ul>\n<\/li>\n<li><strong>DHCP Server Tab:<\/strong>\n<ul>\n<li>Make sure <em>Enable Server<\/em> is checked<\/li>\n<li><strong>Server Address: <\/strong>192.168.56.100<\/li>\n<li><strong>Server Mask: <\/strong>255.255.255.0<\/li>\n<li><strong>Lower Address Bound: <\/strong>192.168.56.3<\/li>\n<li><strong>Upper Address Bound: <\/strong>192.168.56.254<\/li>\n<\/ul>\n<\/li>\n<li><strong style=\"color: red;\">IMPORTANT:<\/strong> On windows the <em>VirtualBox Host-Only Adapter<\/em> may not immediately reflect these changes.  It is recommended you either restart Windows or go into:<br \/> <strong>Windows Control Panel -> Device Manager -> Network Adapters<\/strong> and disable and then enable the <em>VirtualBox Host-Only Ethernet Adapter<\/em>. <\/li>\n<\/ul>\n<h3 id=\"adding-a-host-only-adapter\">Adding a Host-Only Adapter to a Virtual Machine<\/h3>\n<p>Once you have set up the virtual host-only network you can add a new adapter to a Virtual Machine so that it can communicate over that network. You can set up each guest to communicate differently, so adapters are set up on a per-guest basis. <\/p>\n<ul>\n<li>Click on the guest you would like to add the host-only adapter<\/li>\n<li>Select <em><strong>Settings &gt; Network<\/strong><\/em><\/li>\n<li>From here you will see four tabs, each representing a possible virtual network adapter. You may see one that says <em><strong>Attached To: NAT<\/strong><\/em>; this is the default NAT adapter which gives the machine access to the internet. If you would like the machine to access the internet, leave this adapter unchanged.<\/li>\n<li>Add the Host-Only Adapter to\u00a0the next available adapter, usually <em>Adapter 2<\/em> tab.\n<ul>\n<li>Click <em><strong>Enable Network Adapter<\/strong><\/em><\/li>\n<li>Changed <em><strong>Attached to:<\/strong><\/em> drop down menu to <code>Host-only Adapter<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Click <em><strong>OK<\/strong><\/em> to save the settings.<\/li>\n<\/ul>\n<p>Your host-only network should now be setup for use on the guest Virtual Machine.<\/p>\n<h3 id=\"find-and-test-your-host-only-ip\">Find and Test your Host-Only Network IP<\/h3>\n<p>Launch the Virtual Machine and (on a Linux guest) run the <code>ifconfig<\/code> command.  The output will show the configuration of all the networks.  You should see one that has an IP on the <code>192.168.56.x<\/code> subnet that you defined for the host-only network.  This will be the IP you can use to connect to that Virtual Machine from your host machine or from another guest.<br \/>\nFor instance, if you are using one of our <a href=\"https:\/\/carleton.ca\/scs\/tech-support\/virtual-machines\/#current-list-virtualmachines\">standard Virtual Machine images<\/a>, you should now be able to ssh to the guest from your host:<\/p>\n<ul>\n<li>On Windows using a tool like <a href=\"https:\/\/carleton.ca\/scs\/2021\/connecting-to-an-openstack-instance-using-ssh-putty\/\">putty<\/a>.<\/li>\n<li>On Linux or Mac you can just use a terminal, eg: <code>ssh student@192.168.56.3<\/code><\/li>\n<li>On Windows using powershell, eg: <code>ssh student@192.168.56.3<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Why You May Need a VirtualBox Host-Only Adapter What is a Virtual Network \/ Adapter? Setting Up a Virtual Host-only Network Adding a Host-Only Adapter to a Virtual Machine Find and Test your Host-Only Network IP Why You May Need a VirtualBox Host-Only Adapter Sometimes you would like to be able to network between your [&hellip;]<\/p>\n","protected":false},"author":38,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[59],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Creating a New Host-Only Adapter in VirtualBox - School of Computer Science<\/title>\n<meta name=\"description\" content=\"Why You May Need a VirtualBox Host-Only Adapter What is a Virtual Network \/ Adapter? Setting Up a Virtual Host-only Network Adding a Host-Only Adapter to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"connorhillen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/\",\"url\":\"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/\",\"name\":\"Creating a New Host-Only Adapter in VirtualBox - School of Computer Science\",\"isPartOf\":{\"@id\":\"https:\/\/carleton.ca\/scs\/#website\"},\"datePublished\":\"2024-11-12T19:24:49+00:00\",\"dateModified\":\"2024-11-12T19:24:49+00:00\",\"author\":{\"@id\":\"https:\/\/carleton.ca\/scs\/#\/schema\/person\/937734836f8bb1ef40a07541e4511157\"},\"description\":\"Why You May Need a VirtualBox Host-Only Adapter What is a Virtual Network \/ Adapter? Setting Up a Virtual Host-only Network Adding a Host-Only Adapter to\",\"breadcrumb\":{\"@id\":\"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/carleton.ca\/scs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Technical Support\",\"item\":\"https:\/\/carleton.ca\/scs\/category\/technicalsupport\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Virtual Machines\",\"item\":\"https:\/\/carleton.ca\/scs\/category\/technicalsupport\/virtualmachines-support\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Creating a New Host-Only Adapter in VirtualBox\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/carleton.ca\/scs\/#website\",\"url\":\"https:\/\/carleton.ca\/scs\/\",\"name\":\"School of Computer Science\",\"description\":\"Carleton University\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/carleton.ca\/scs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/carleton.ca\/scs\/#\/schema\/person\/937734836f8bb1ef40a07541e4511157\",\"name\":\"connorhillen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/carleton.ca\/scs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/37bb5480f77d5bab43767e89bf8a1351?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/37bb5480f77d5bab43767e89bf8a1351?s=96&d=mm&r=g\",\"caption\":\"connorhillen\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Creating a New Host-Only Adapter in VirtualBox - School of Computer Science","description":"Why You May Need a VirtualBox Host-Only Adapter What is a Virtual Network \/ Adapter? Setting Up a Virtual Host-only Network Adding a Host-Only Adapter to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/","twitter_misc":{"Written by":"connorhillen","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/","url":"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/","name":"Creating a New Host-Only Adapter in VirtualBox - School of Computer Science","isPartOf":{"@id":"https:\/\/carleton.ca\/scs\/#website"},"datePublished":"2024-11-12T19:24:49+00:00","dateModified":"2024-11-12T19:24:49+00:00","author":{"@id":"https:\/\/carleton.ca\/scs\/#\/schema\/person\/937734836f8bb1ef40a07541e4511157"},"description":"Why You May Need a VirtualBox Host-Only Adapter What is a Virtual Network \/ Adapter? Setting Up a Virtual Host-only Network Adding a Host-Only Adapter to","breadcrumb":{"@id":"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/carleton.ca\/scs\/2024\/creating-a-new-host-only-adapter-in-virtualbox\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/carleton.ca\/scs\/"},{"@type":"ListItem","position":2,"name":"Technical Support","item":"https:\/\/carleton.ca\/scs\/category\/technicalsupport\/"},{"@type":"ListItem","position":3,"name":"Virtual Machines","item":"https:\/\/carleton.ca\/scs\/category\/technicalsupport\/virtualmachines-support\/"},{"@type":"ListItem","position":4,"name":"Creating a New Host-Only Adapter in VirtualBox"}]},{"@type":"WebSite","@id":"https:\/\/carleton.ca\/scs\/#website","url":"https:\/\/carleton.ca\/scs\/","name":"School of Computer Science","description":"Carleton University","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/carleton.ca\/scs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/carleton.ca\/scs\/#\/schema\/person\/937734836f8bb1ef40a07541e4511157","name":"connorhillen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/carleton.ca\/scs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/37bb5480f77d5bab43767e89bf8a1351?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/37bb5480f77d5bab43767e89bf8a1351?s=96&d=mm&r=g","caption":"connorhillen"}}]}},"acf":{"Post Thumbnail Icon":"electronics","Post Thumbnail":false},"_links":{"self":[{"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/posts\/6811"}],"collection":[{"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/comments?post=6811"}],"version-history":[{"count":3,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/posts\/6811\/revisions"}],"predecessor-version":[{"id":17943,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/posts\/6811\/revisions\/17943"}],"wp:attachment":[{"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/media?parent=6811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/categories?post=6811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carleton.ca\/scs\/wp-json\/wp\/v2\/tags?post=6811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}