{"id":2218,"date":"2023-01-09T14:56:36","date_gmt":"2023-01-09T06:56:36","guid":{"rendered":"https:\/\/cowmanchiang.me\/wp\/?p=2218"},"modified":"2023-10-31T15:41:35","modified_gmt":"2023-10-31T07:41:35","slug":"virtualbox-host-only-network-not-working","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=2218","title":{"rendered":"[VirtualBox] Host-only network is not working."},"content":{"rendered":"<p>We can usually find the information about connecting to the Guest machine in VirtualBox. Most of the practices are performed using the Host-only setting method.<\/p>\n<p><a href=\"https:\/\/cowmanchiang.me:443\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.16.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cowmanchiang.me:443\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.16-300x184.png\" alt=\"\" width=\"300\" height=\"184\" class=\"aligncenter size-medium wp-image-2219\" srcset=\"https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.16-300x184.png 300w, https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.16-768x470.png 768w, https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.16.png 833w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/cowmanchiang.me:443\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.40.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cowmanchiang.me:443\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.40-300x141.png\" alt=\"\" width=\"300\" height=\"141\" class=\"aligncenter size-medium wp-image-2220\" srcset=\"https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.40-300x141.png 300w, https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.34.40.png 728w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>But in version 7.0.4 of VirtualBox, the same setting does not work. This is because the new network interface in the Guest is not enabled correctly. This document describes the steps on how to enable the network interface.<\/p>\n<ol>\n<li>\n<p>First check the number of the network interface.<\/p>\n<p><code>ifconfig -a | more<\/code><\/p>\n<p><a href=\"https:\/\/cowmanchiang.me:443\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.45.57.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cowmanchiang.me:443\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.45.57-300x229.png\" alt=\"\" width=\"300\" height=\"229\" class=\"aligncenter size-medium wp-image-2221\" srcset=\"https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.45.57-300x229.png 300w, https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.45.57-768x586.png 768w, https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.45.57.png 801w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now we will get the number of the network interface is &#8220;enp0s8&#8221;<\/p>\n<\/li>\n<li>\n<p>Edit the network configuration. (Here we use Ubuntu 22.04)<\/p>\n<p><code>vim \/etc\/netplan\/00-installer-config.yaml<\/code><\/p>\n<p><a href=\"https:\/\/cowmanchiang.me:443\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.51.12.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cowmanchiang.me:443\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.51.12-300x244.png\" alt=\"\" width=\"300\" height=\"244\" class=\"aligncenter size-medium wp-image-2223\" srcset=\"https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.51.12-300x244.png 300w, https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.51.12-768x625.png 768w, https:\/\/cowmanchiang.me\/wp\/wp-content\/uploads\/2023\/01\/\u622a\u5716-2023-01-09-\u4e0b\u53482.51.12.png 802w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Add enp0s8 settings to this file.<\/p>\n<\/li>\n<li>\n<p>Execute the following command to apply the above settings.<\/p>\n<p><code>netplan generate<\/code><\/p>\n<p><code>netplan apply<\/code><\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>We can usually find the information about connecting to the Guest machine in VirtualBox. Most of the practices are performed using the Host-only setting method. But in version 7.0.4 of VirtualBox, the same setting does not work. This is because &hellip; <a href=\"https:\/\/cowmanchiang.me\/wp\/?p=2218\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[],"class_list":["post-2218","post","type-post","status-publish","format-standard","hentry","category-virtualbox"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2218"}],"version-history":[{"count":3,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2218\/revisions"}],"predecessor-version":[{"id":2225,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2218\/revisions\/2225"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}