{"id":104,"date":"2022-12-19T16:00:00","date_gmt":"2022-12-19T16:00:00","guid":{"rendered":"http:\/\/localhost:8080\/?p=104"},"modified":"2026-09-07T16:04:07","modified_gmt":"2026-09-07T16:04:07","slug":"virtualbox-installation-on-macos","status":"publish","type":"post","link":"https:\/\/jamesmonek.com\/?p=104","title":{"rendered":"VirtualBox Installation on macOS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">VirtualBox Installation<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running virtualization on your laptop\/desktop or home lab provides an easy way to learn and test various operating systems, including AWS EC2 instances. Also, it can serve a development environment for testing code and configurations. While there are various virtualization solutions such as VMware, VirtualBox offers a free solution that is well supported in the open source community.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Main website:&nbsp;<a href=\"https:\/\/www.virtualbox.org\/\">https:\/\/www.virtualbox.org<\/a>&nbsp;Downloads for various OSes:&nbsp;<a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\">https:\/\/www.virtualbox.org\/wiki\/Downloads<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">macOS Installation<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download\u00a0<em>VirtualBox-7.0.4-154605-OSX.dmg<\/em><\/li>\n\n\n\n<li>To run the installer, double-click\u00a0<em>VirtualBox-7.0.4-154605-OSX.dmg<\/em><\/li>\n\n\n\n<li>Double-click\u00a0<em>VirtualBox.pkg<\/em><\/li>\n\n\n\n<li>Click\u00a0<em>Continue<\/em><\/li>\n\n\n\n<li>Select the location and click\u00a0<em>Install<\/em><\/li>\n\n\n\n<li>Click\u00a0<em>Close<\/em>\u00a0when done<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Debian Linux<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Debian downloads can be found at\u00a0<a href=\"https:\/\/www.debian.org\/download\">https:\/\/www.debian.org\/download<\/a><\/li>\n\n\n\n<li>Download the version for your CPU<\/li>\n\n\n\n<li>Open\u00a0<em>VitrualBox<\/em><\/li>\n\n\n\n<li>Click\u00a0<em>New<\/em><br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"78\" class=\"wp-image-105\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/debianlocation.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianlocation.png 1922w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianlocation-300x156.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianlocation-1024x532.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianlocation-768x399.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianlocation-1536x798.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Enter\u00a0<em>Name<\/em>\u00a0for the virtual name<\/li>\n\n\n\n<li>Select\u00a0<em>Location<\/em><\/li>\n\n\n\n<li>Select other for ISO and locate the Debian ISO you downloaded<\/li>\n\n\n\n<li>Click\u00a0<em>Next<\/em><br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"78\" class=\"wp-image-106\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/debianuser.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianuser.png 1924w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianuser-300x157.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianuser-1024x534.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianuser-768x401.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianuser-1536x802.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Enter\u00a0<em>Usename<\/em>\u00a0and\u00a0<em>Password<\/em>\u00a0for the installation<\/li>\n\n\n\n<li>Enter\u00a0<em>Hostname<\/em><\/li>\n\n\n\n<li>Select\u00a0<em>Guest Additions<\/em>\u00a0for the additional tools<\/li>\n\n\n\n<li>Click\u00a0<em>Next<\/em><br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"78\" class=\"wp-image-107\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/debianmemorycpu.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianmemorycpu.png 1926w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianmemorycpu-300x156.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianmemorycpu-1024x532.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianmemorycpu-768x399.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianmemorycpu-1536x798.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Select the Memory and CPU<\/li>\n\n\n\n<li>Click\u00a0<em>Next<\/em><br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"78\" class=\"wp-image-108\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/debiandisksize.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debiandisksize.png 1930w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debiandisksize-300x156.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debiandisksize-1024x532.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debiandisksize-768x399.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debiandisksize-1536x797.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Select\u00a0<em>Create Virtual Disk Now<\/em>\u00a0and select the disk size<\/li>\n\n\n\n<li>Click\u00a0<em>Next<\/em><br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"79\" class=\"wp-image-109\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/debianfinish.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianfinish.png 1918w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianfinish-300x157.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianfinish-1024x537.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianfinish-768x403.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/debianfinish-1536x806.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Verify settings and click\u00a0<em>Finish<\/em><\/li>\n\n\n\n<li>Wait until the installation finishes<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Debian Setup<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Add user to sudoers<a href=\"https:\/\/jamesmonek.com\/posts\/virtualbox-installation-on-macos\/#add-user-to-sudoers\"><\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Note: Install VIM as VI doesn\u2019t work well with VirtualBox<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install vim\nEDITOR=vim visudo\nusermod -aG sudo username\nvisudo\nusername ALL=(ALL) NOPASSWD:ALL<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install OpenSSH<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install openssh-server\nsudo systemctl start ssh\nsudo systemctl status ssh<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Installing Ubuntu Linux<a href=\"https:\/\/jamesmonek.com\/posts\/virtualbox-installation-on-macos\/#installing-ubuntu-linux\"><\/a><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Ubuntu downloads can be found at\u00a0<a href=\"https:\/\/ubuntu.com\/#download\">https:\/\/ubuntu.com\/#download<\/a><\/li>\n\n\n\n<li>Download the version for your CPU<\/li>\n\n\n\n<li>Open VirtualBox\u00a0<br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"92\" class=\"wp-image-110\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/virtualbox-new.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/virtualbox-new.png 1769w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/virtualbox-new-300x183.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/virtualbox-new-1024x625.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/virtualbox-new-768x469.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/virtualbox-new-1536x938.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Click New\u00a0<br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"79\" class=\"wp-image-111\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/ubuntu-iso.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/ubuntu-iso.png 1922w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/ubuntu-iso-300x157.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/ubuntu-iso-1024x536.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/ubuntu-iso-768x402.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/ubuntu-iso-1536x804.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Enter\u00a0<em>Name<\/em>\u00a0for the virtual name<\/li>\n\n\n\n<li>Select\u00a0<em>Location<\/em><\/li>\n\n\n\n<li>Select other for ISO and locate the Ubuntu ISO you downloaded<\/li>\n\n\n\n<li>Select\u00a0<em>Skip Unattended Installation<\/em><\/li>\n\n\n\n<li>Click\u00a0<em>Next<\/em><br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"78\" class=\"wp-image-112\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/memory-cpu.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/memory-cpu.png 1934w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/memory-cpu-300x155.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/memory-cpu-1024x529.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/memory-cpu-768x397.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/memory-cpu-1536x794.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Select the Memory and CPU<\/li>\n\n\n\n<li>Click\u00a0<em>Next<\/em><br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"78\" class=\"wp-image-113\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/disksize.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/disksize.png 1924w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/disksize-300x156.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/disksize-1024x531.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/disksize-768x398.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/disksize-1536x797.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Select Create Virtual Disk Now and select the disk size<\/li>\n\n\n\n<li>Click\u00a0<em>Next<\/em><br><br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"78\" class=\"wp-image-114\" style=\"width: 150px;\" src=\"http:\/\/localhost:8080\/wp-content\/uploads\/2026\/09\/finish.png\" alt=\"\" srcset=\"https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/finish.png 1922w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/finish-300x156.png 300w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/finish-1024x533.png 1024w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/finish-768x400.png 768w, https:\/\/jamesmonek.com\/wp-content\/uploads\/2026\/09\/finish-1536x799.png 1536w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br><\/li>\n\n\n\n<li>Verify settings and click\u00a0<em>Finish<\/em><\/li>\n\n\n\n<li>Wait until the installation finishes<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Amazon Linux 2<a href=\"https:\/\/jamesmonek.com\/posts\/virtualbox-installation-on-macos\/#amazon-linux-2\"><\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Useful Linux image to run locally is Amazon Linux 2 which is the default Linux when you provision an AWS EC2 instance. Great and free way to test your image before you deploy live.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Setup<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instructions can be found at&nbsp;<a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/amazon-linux-2-virtual-machine.html\">https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/amazon-linux-2-virtual-machine.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: Select the instructions for Oracle VirtualBox<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Recommended network configuration<a href=\"https:\/\/jamesmonek.com\/posts\/virtualbox-installation-on-macos\/#recommended-network-configuration\"><\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Since most of this is used for development and testing, I recommend using the DHCP option. Configuration is below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>local-hostname: amazonlinux\n# eth0 is the default network interface enabled in the image. You can configure static network settings with an entry like the following.\nnetwork-interfaces: |\n  auto eth0\n  iface eth0 inet dhcp<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">VirtualBox Tips<a href=\"https:\/\/jamesmonek.com\/posts\/virtualbox-installation-on-macos\/#virtualbox-tips\"><\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Do not allow VirtualBox to limit screen size as it may be difficult to read. To change the display settings, select Preferences -&gt; Display -&gt; Maximum Guest Screen Size should be set to&nbsp;<em>None<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">VirtualBox Networking Chart<a href=\"https:\/\/jamesmonek.com\/posts\/virtualbox-installation-on-macos\/#virtualbox-networking-chart\"><\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Chart below compares different network adapter options for VirtualBox. Important information depending on your connectivity requirements. In general, the bridged option works the best.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Network<\/th><th>VM &lt;-&gt; Host<\/th><th>VM1 &lt;-&gt; VM2<\/th><th>VM -&gt; Internet<\/th><th>VM &lt;- Internet<\/th><\/tr><\/thead><tbody><tr><td>Host-Only<\/td><td>+<\/td><td>+<\/td><td>&#8211;<\/td><td>&#8211;<\/td><\/tr><tr><td>Internal<\/td><td>&#8211;<\/td><td>+<\/td><td>&#8211;<\/td><td>&#8211;<\/td><\/tr><tr><td>Bridged<\/td><td>+<\/td><td>+<\/td><td>+<\/td><td>&#8211;<\/td><\/tr><tr><td>NAT<\/td><td>&#8211;<\/td><td>&#8211;<\/td><td>+<\/td><td>Port Forwarding<\/td><\/tr><tr><td>NAT<\/td><td>&#8211;<\/td><td>+<\/td><td>+<\/td><td>Port Forwarding<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>VirtualBox Installation Running virtualization on your laptop\/desktop or home lab provides an easy way to learn and test various operating systems, including AWS EC2 instances. Also, it can serve a development environment for testing code and configurations. While there are various virtualization solutions such as VMware, VirtualBox offers a free solution that is well supported [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":116,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-104","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/jamesmonek.com\/index.php?rest_route=\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jamesmonek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jamesmonek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jamesmonek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jamesmonek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=104"}],"version-history":[{"count":1,"href":"https:\/\/jamesmonek.com\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":115,"href":"https:\/\/jamesmonek.com\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions\/115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jamesmonek.com\/index.php?rest_route=\/wp\/v2\/media\/116"}],"wp:attachment":[{"href":"https:\/\/jamesmonek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jamesmonek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jamesmonek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}