Open AnasKiron opened 6 months ago
@AnasKiron I can't reproduce this behavior on Windows 11 23H2 (OS Build 22631.2861) with VirtualBox 7.0.12 and Vagrant 2.4.0. When I provision the VM, the listener and instance start as expected. I'm using slightly newer versions of VirtualBox and Vagrant, but I doubt that's the issue.
I suggest verifying that Hyper-V is disabled on your host, then starting over to see whether the problem happens again.
To verify that Hyper-V is disabled, open an Administrator Command Prompt or an Administrator PowerShell window, and enter the command bcdedit
. You may see a line in the Windows Boot Loader section of the output that starts with "hypervisorlaunchtype". If you don't see this line, Hyper-V is disabled, and you can skip ahead. If you see this line, it should read "hypervisorlaunchtype Off", meaning Hyper-V is disabled. If it reads "hypervisorlaunchType Auto", Hyper-V is enabled. Disable it by running the command bcdedit /set hypervisorlaunchtype Off
, then reboot the host.
To retry the provisioning, open a PowerShell window and change to the vagrant-projects\OracleDatabase\23.3.0-Free directory. Then destroy the VM (vagrant destroy -f
). Finally, run the command vagrant up | Tee-Object provision.log
. This will save the output from vagrant up
to a file called "provision.log". If the problem happens again, please attach the provision.log file or upload it to a gist, so we can troubleshoot further.
Hi Mr. @PaulNeumann,
I disabled the Hyper-V and restarted my machine but the issue still existed.
So, I installed VirtualBox 7.0.12, and Vagrant 2.4.0.
My Host OS is Windows 11 23H2 (Build is 22631.2861)
I destroyed the previous VM, then I provisioned a new one.
Now, it works.
I had a question, please: Is it possible to provision a VM without internet connection?
Regards,
@AnasKiron I'm surprised that the versions of VirtualBox and Vagrant made a difference, but I'm glad it's working for you now.
Is it possible to provision a VM without internet connection?
Not without a lot of manual downloads and script changes, because the OracleDatabase/23.3.0-Free project requires an internet connection to download both updates from the Oracle Yum repositories and the database installer. The same is true for the other projects in this repository. However, you could provision the VM on an internet-connected computer, then package it as a new Vagrant box, and use that box with Vagrant on a non-internet-connected computer. See the documentation for vagrant package.
Hi @AnasKiron, My understanding is that you were stuck at this step, and you're very close:
SQL> connect / as sysdba
Connected to an idle instance.
SQL>
What you can do next is simply the command
SQL> startup
If it works, you'll see the following prompt:
<instance_name> instance started.
Total System Global Area ... bytes
...
Database mounted.
Database opened.
Hi,
Summary: I couldn't connect to the oracle database engine without manual intervention (starting listener & database manually).
Details: First, I started the VM using
vagrant up
Then, I tried to connect to the database using SQL Developer from host OS; I got vendor error code 17002.I used
vagrant ssh
to connect to the VM, and run the following command on the terminal:lsnrctl status
which gives me the following:I started the listener service using
lsnrctl start
and got the following:Then, I tried again to connect to database engine; I got the following error messsage:
I googled it, and found a solution on stack overflow:
https://stackoverflow.com/questions/6555827/ora-01034-oracle-not-available-ora-27101-shared-memory-realm-does-not-exist
I executed the following on the terminal:
sqlplus "/ as sysdba"
it gives me the following message:Finally, I run
startup
which started the instance and at this moment I had the chance to connect to the database engine.Your advice is highly appreciated. Thanks,
Environment