{"id":51,"date":"2024-12-05T20:04:59","date_gmt":"2024-12-05T19:04:59","guid":{"rendered":"http:\/\/cbleile.de\/wordpress\/?p=51"},"modified":"2024-12-05T20:04:59","modified_gmt":"2024-12-05T19:04:59","slug":"oracle-database-on-apple-silicon-with-virtualbox-7-1","status":"publish","type":"post","link":"http:\/\/cbleile.de\/wordpress\/oracle-database-on-apple-silicon-with-virtualbox-7-1\/","title":{"rendered":"Oracle Database on Apple Silicon with Virtualbox 7.1"},"content":{"rendered":"\n<p>I blogged in the past about running an Oracle database for testing purposes on Apple Silicon. Initially with emulated Intel code <a href=\"http:\/\/cbleile.de\/wordpress\/running-intel-x86-64-vms-with-an-oracle-db-on-apple-silicon-arm\/\">here<\/a> and then (when Oracle released its 19c database software for ARM) with UTM as a wrapper for the QEMU hypervisor <a href=\"http:\/\/cbleile.de\/wordpress\/running-an-oracle-database-19c-on-apple-silicon-apple-macbook-air-m1\/\">here<\/a>. In the meantime another possibility came up since Oracle released its type II hypervisor Virtualbox for ARM in version 7.1.<\/p>\n\n\n\n<p>Below the steps to setup an Oracle database from scratch on a Virtualbox VM on my MacBook Air M1.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-install-virtualbox-and-a-vm-with-oracle-enterprise-linux-8\">Install Virtualbox and a VM with Oracle Enterprise Linux 8<\/h2>\n\n\n\n<p>First things first: Install Virtualbox. To do that go to <a href=\"http:\/\/www.virtualbox.org\">www.virtualbox.org<\/a> and click on the download link:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-22-1024x256.png\" alt=\"\" class=\"wp-image-36135\"\/><\/figure>\n\n\n\n<p>Click on &#8222;macOS \/ Apple Silicon hosts&#8220;, which downloads VirtualBox-7.1.4-165100-macOSArm64.dmg (at the time when writing this Blog):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-23.png\" alt=\"\" class=\"wp-image-36136\"\/><\/figure>\n\n\n\n<p>In Finder double click the DMG to install Virtualbox. Go through the usual installation process until you see the following screen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-25.png\" alt=\"\" class=\"wp-image-36138\"\/><\/figure>\n\n\n\n<p>When starting Virtualbox the first time I set the Expert mode:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-26.png\" alt=\"\" class=\"wp-image-36139\"\/><\/figure>\n\n\n\n<p>But before creating a VM I downloaded Oracle Enterprise Linux 8 for ARM from <a href=\"https:\/\/yum.oracle.com\/oracle-linux-isos.html\">here<\/a>: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-40.png\" alt=\"\" class=\"wp-image-36153\"\/><\/figure>\n\n\n\n<p>Then I create a new VM by clicking &#8222;New&#8220; in Virtualbox:<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-28.png\" alt=\"\" class=\"wp-image-36141\"\/><\/figure>\n\n\n\n<p>Provided the information requested:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-41.png\" alt=\"\" class=\"wp-image-36154\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-42.png\" alt=\"\" class=\"wp-image-36155\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-43.png\" alt=\"\" class=\"wp-image-36156\"\/><\/figure>\n\n\n\n<p>Then clicked &#8222;Finish&#8220;.<\/p>\n\n\n\n<p>Before starting the VM I enabled host caching under Settings -> Storage -> Controller: VirtioSCSI:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-44.png\" alt=\"\" class=\"wp-image-36157\"\/><\/figure>\n\n\n\n<p>I set the network to bridged, so that I also can reach the VM remotely for some tests (if you want to access your VM remotely, you have to adjust the firewall on your Mac):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-45.png\" alt=\"\" class=\"wp-image-36158\"\/><\/figure>\n\n\n\n<p>Then I powered the machine on by clicking &#8222;Start&#8220;. I had to provide access to the keyboard and computer in the security settings of the Mac. The VM booted from the ISO and I could see the installation screen and choose to install Linux 8:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-46.png\" alt=\"\" class=\"wp-image-36159\"\/><\/figure>\n\n\n\n<p> Then choose the language and other settings and begin the installation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-47.png\" alt=\"\" class=\"wp-image-36160\"\/><\/figure>\n\n\n\n<p>Then reboot the system:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/12\/image-48.png\" alt=\"\" class=\"wp-image-36161\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-install-oracle-19c-19-25\">Install Oracle 19c (19.25.)<\/h2>\n\n\n\n<p>After the reboot I can login to the machine through ssh as root and prepare for the Oracle installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf -y update \ndnf -y install oracle-database-preinstall-19c.aarch64\n\nmkdir -p \/u01\/app\/oracle\nchown -R oracle:oinstall \/u01\/app\n\nsystemctl stop firewalld\n\npasswd oracle\n\ndnf -y install xterm.aarch64 tigervnc-server.aarch64<\/code><\/pre>\n\n\n\n<p>The Oracle software can be downloaded <a href=\"https:\/\/www.oracle.com\/database\/technologies\/oracle19c-linux-arm64-downloads.html\">here<\/a>. I uploaded it to the \/tmp directory on my just created VM and installed Oracle 19c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>su - oracle\nmkdir -p \/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\ncd \/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\n\nunzip -oq \/tmp\/LINUX.ARM64_1919000_db_home.zip\n\nexport ORACLE_BASE=\/u01\/app\/oracle\nexport ORACLE_HOME=\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\nexport ORACLE_HOSTNAME=`hostname`\nexport ORA_INVENTORY=\/u01\/app\/oraInventory\n\n\n.\/runInstaller -ignorePrereq -waitforcompletion -silent             \\\n    -responseFile ${ORACLE_HOME}\/install\/response\/db_install.rsp    \\\n    oracle.install.option=INSTALL_DB_SWONLY                         \\\n    ORACLE_HOSTNAME=${ORACLE_HOSTNAME}                              \\\n    UNIX_GROUP_NAME=oinstall                                        \\\n    INVENTORY_LOCATION=${ORA_INVENTORY}                             \\\n    SELECTED_LANGUAGES=en,en_GB                                     \\\n    ORACLE_HOME=${ORACLE_HOME}                                      \\\n    ORACLE_BASE=${ORACLE_BASE}                                      \\\n    oracle.install.db.InstallEdition=EE                             \\\n    oracle.install.db.OSDBA_GROUP=dba                               \\\n    oracle.install.db.OSBACKUPDBA_GROUP=backupdba                   \\\n    oracle.install.db.OSDGDBA_GROUP=dgdba                           \\\n    oracle.install.db.OSKMDBA_GROUP=kmdba                           \\\n    oracle.install.db.OSRACDBA_GROUP=racdba                         \\\n    SECURITY_UPDATES_VIA_MYORACLESUPPORT=false                      \\\n    DECLINE_SECURITY_UPDATES=true\n\nsu - root\n\/u01\/app\/oraInventory\/orainstRoot.sh\n\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/root.sh\nexit<\/code><\/pre>\n\n\n\n<p>Then install the 19.25. release update, which I copied to \/tmp\/19.25:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd $ORACLE_HOME\nmv OPatch OPatch_1919\nunzip -oq \/tmp\/19.25\/p6880880_190000_Linux-ARM-64.zip \ncd \/tmp\/19.25\nunzip -oq p36912597_190000_Linux-ARM-64.zip \ncd 36912597\/\n$ORACLE_HOME\/OPatch\/opatch apply\n<\/code><\/pre>\n\n\n\n<p>Start a listener and install a DB<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/bin\/lsnrctl start\n\nexport ORACLE_SID=db19ee\nexport PDB_NAME=pdb1\nexport DATA_DIR=$ORACLE_BASE\/oradata\nmkdir -p $DATA_DIR\n\n$ORACLE_HOME\/bin\/dbca -silent -createDatabase                            \\\n      -templateName General_Purpose.dbc                                   \\\n      -gdbname ${ORACLE_SID} -sid  ${ORACLE_SID} -responseFile NO_VALUE   \\\n      -characterSet AL32UTF8                                              \\\n      -sysPassword oracle_4U                                              \\\n      -systemPassword oracle_4U                                           \\\n      -createAsContainerDatabase true                                     \\\n      -numberOfPDBs 1                                                     \\\n      -pdbName ${PDB_NAME}                                                \\\n      -pdbAdminPassword oracle_4U                                         \\\n      -databaseType MULTIPURPOSE                                          \\\n      -memoryMgmtType auto_sga                                            \\\n      -totalMemory 2500                                                   \\\n      -storageType FS                                                     \\\n      -datafileDestination \"${DATA_DIR}\"                                  \\\n      -redoLogFileSize 200                                                \\\n      -emConfiguration NONE                                               \\\n      -ignorePreReqs\n\n$ORACLE_HOME\/bin\/sqlplus \/ as sysdba &lt;&lt;EOF\nalter system set db_create_file_dest='${DATA_DIR}';\nalter pluggable database ${PDB_NAME} save state;\nexit;\nEOF<\/code><\/pre>\n\n\n\n<p>As root adjust the firewalld:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl start firewalld\n# cd \/etc\/firewalld\/services\n# vi oranetwork.xml\n# cat oranetwork.xml\n&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;service>\n&lt;short>oranetwork&lt;\/short>\n&lt;description>Oracle Network communication&lt;\/description> &lt;port protocol=\"tcp\" port=\"1521\"\/>\n&lt;\/service>\n# firewall-cmd --permanent --add-service=oranetwork\n# firewall-cmd --reload \n# firewall-cmd --list-all\n...\n  services: cockpit dhcpv6-client oranetwork ssh\n...<\/code><\/pre>\n\n\n\n<p>Finally I can connect to my 19.25.-DB:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;oracle@db19c-arm ~]$ . oraenv\nORACLE_SID = &#91;db19ee] ? db19ee\nThe Oracle base remains unchanged with value \/u01\/app\/oracle\n&#91;oracle@db19c-arm ~]$ sqlplus \/ as sysdba\n\nSQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 5 19:35:34 2024\nVersion 19.25.0.0.0\n\nCopyright (c) 1982, 2024, Oracle.  All rights reserved.\n\n\nConnected to:\nOracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production\nVersion 19.25.0.0.0\n\nSQL> show pdbs\n\n    CON_ID CON_NAME\t\t\t  OPEN MODE  RESTRICTED\n---------- ------------------------------ ---------- ----------\n\t 2 PDB$SEED\t\t\t  READ ONLY  NO\n\t 3 PDB1 \t\t\t  READ WRITE NO\nSQL> \n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-summary\">Summary<\/h2>\n\n\n\n<p>Consultants and DBAs who are used to run Oracle Database test environments on Virtualbox, can do this now on Apple Silicon as well. The steps to setup and run an Oracle DB on ARM are the same as on x86-64. Please consider that there are still some limitations on ARM. E.g. 19c is not supported on Oracle Enterprise Linux 9 (OEL9) on ARM.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I blogged in the past about running an Oracle database for testing purposes on Apple Silicon. Initially with emulated Intel code here and then (when Oracle released its 19c database software for ARM) with UTM as a wrapper for the QEMU hypervisor here. In the meantime another possibility came up since Oracle released its type [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[15,13,3,49],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-apple-silicon","tag-arm","tag-oracle","tag-virtualbox"],"_links":{"self":[{"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":1,"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":52,"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/posts\/51\/revisions\/52"}],"wp:attachment":[{"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cbleile.de\/wordpress\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}