{"id":769,"date":"2021-06-11T23:38:34","date_gmt":"2021-06-12T03:38:34","guid":{"rendered":"https:\/\/www.unliterate.net\/?p=769"},"modified":"2021-06-11T23:38:34","modified_gmt":"2021-06-12T03:38:34","slug":"oracle-virtualbox-inside-virtualbox","status":"publish","type":"post","link":"https:\/\/www.unliterate.net\/index.php\/2021\/06\/11\/oracle-virtualbox-inside-virtualbox\/","title":{"rendered":"Oracle VirtualBox inside VirtualBox"},"content":{"rendered":"\n<p>The goal today is to run <a href=\"https:\/\/www.virtualbox.org\/wiki\/Linux_Downloads\" target=\"_blank\" rel=\"noreferrer noopener\">Oracle VirtualBox<\/a> (on <a href=\"http:\/\/isoredirect.centos.org\/centos\/7\/isos\/x86_64\/\" target=\"_blank\" rel=\"noreferrer noopener\">Centos 7<\/a>) inside of <a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\" target=\"_blank\" rel=\"noreferrer noopener\">Oracle VirtualBox (on Windows 10)<\/a>, and run a Centos 7 server within that application.<\/p>\n\n\n\n<p>On the main host system running Windows 10 I create a 4vCPU, 4GB RAM with 40GB of storage and install Centos 7. This was the easy part.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Next step is to download the <a rel=\"noreferrer noopener\" href=\"https:\/\/download.virtualbox.org\/virtualbox\/6.1.22\/VirtualBox-6.1-6.1.22_144080_el7-1.x86_64.rpm\" target=\"_blank\">Centos 7 RPM from VirtualBox<\/a>&#8216;s website and install it with all of the dependencies.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ curl 'https:\/\/download.virtualbox.org\/virtualbox\/6.1.22\/VirtualBox-6.1-6.1.22_144080_el7-1.x86_64.rpm' -oVirtualBox-6.1-6.1.22_144080_el7-1.x86_64.rpm\n$ sudo yum install gcc make perl kernel-headers kernel-devel-3.10.0-1160.31.1.el7.x86_64\n$ yum install VirtualBox-6.1-6.1.22_144080_el7-1.x86_64.rpm<\/code><\/pre>\n\n\n\n<p>I&#8217;ll install Apache\/2.4.6 with php\/5.4.16 so that I can install <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/phpvirtualbox\/phpvirtualbox.git\" target=\"_blank\">phpvirtualbox<\/a> for administration. For the ease of things i&#8217;ll disable C7 firewalld and set selinux to permissive as well.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo yum install httpd php php-soap\n$ sudo systemctl stop firewalld\n$ sudo systemctl disable firewalld<\/code><\/pre>\n\n\n\n<p>I&#8217;ll need git to clone down the repo and i&#8217;ll just sudo move it all to wherever docroot is<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo yum install git\n...\n$ httpd -S\r\nVirtualHost configuration:\r\nServerRoot: \"\/etc\/httpd\"\r\nMain DocumentRoot: \"\/var\/www\/html\"\r\nMain ErrorLog: \"\/etc\/httpd\/logs\/error_log\"\r\nMutex mpm-accept: using_defaults\r\nMutex authdigest-opaque: using_defaults\r\nMutex proxy-balancer-shm: using_defaults\r\nMutex rewrite-map: using_defaults\r\nMutex authdigest-client: using_defaults\r\nMutex proxy: using_defaults\r\nMutex authn-socache: using_defaults\r\nMutex default: dir=\"\/run\/httpd\/\" mechanism=default\r\nPidFile: \"\/run\/httpd\/httpd.pid\"\r\nDefine: _RH_HAS_HTTPPROTOCOLOPTIONS\r\nDefine: DUMP_VHOSTS\r\nDefine: DUMP_RUN_CFG\r\nUser: name=\"apache\" id=48 not_used\r\nGroup: name=\"apache\" id=48 not_used\r\n$ git clone https:\/\/github.com\/phpvirtualbox\/phpvirtualbox.git\r\nCloning into 'phpvirtualbox'...\r\nremote: Enumerating objects: 1619, done.\r\nremote: Counting objects: 100% (30\/30), done.\r\nremote: Compressing objects: 100% (21\/21), done.\r\nremote: Total 1619 (delta 8), reused 20 (delta 7), pack-reused 1589\r\nReceiving objects: 100% (1619\/1619), 5.95 MiB | 8.26 MiB\/s, done.\r\nResolving deltas: 100% (766\/766), done.\r\n$ sudo mv phpvirtualbox \/var\/www\/html\n$ chcon -R -h -t httpd_sys_content_t \/var\/www\/html\n$ sudo systemctl enable httpd\n$ sudo systemctl start httpd<\/code><\/pre>\n\n\n\n<p>I&#8217;ll need to set up a configuration for this, and the instructions are pretty simple:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd \/var\/www\/html\/phpvirtualbox\n$ cp config.php-example config.php<\/code><\/pre>\n\n\n\n<p>And finally I can set up <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/phpvirtualbox\/phpvirtualbox\/wiki\/vboxweb-service-Configuration-in-Linux\" target=\"_blank\">\/etc\/default\/virtualbox<\/a> and <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/phpvirtualbox\/phpvirtualbox\/wiki#basic-configuration\" target=\"_blank\">config.php user\/password<\/a><\/p>\n\n\n\n<p>At this point I should be able to access the user interface by going to http:\/\/192.168.1.211\/phpvirtualbox, login with admin\/admin, and this all looks good to go!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The goal today is to run Oracle VirtualBox (on Centos 7) inside of Oracle VirtualBox (on Windows 10), and run a Centos 7 server within that application. On the main host system running Windows 10 I create a 4vCPU, 4GB RAM with 40GB of storage and install Centos 7. This was the easy part.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-769","post","type-post","status-publish","format-standard","hentry","category-random"],"_links":{"self":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/comments?post=769"}],"version-history":[{"count":3,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/769\/revisions"}],"predecessor-version":[{"id":772,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/769\/revisions\/772"}],"wp:attachment":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/media?parent=769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/categories?post=769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/tags?post=769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}