The
following assumes you want an environment which will have an oracle database
installed in a windows virtual environment. Whether this is going onto a laptop
which will be connecting to multiple wireless networks or a desktop, chances
are you’ll be using DHCP to get your IP. Since you’ll be using your VM for
Oracle, you’ll want to have a static IP setup in your VM and it’s better to do
it at the start than trying to reconfigure later, trust me.
You may
also need a static ip address to connect to the guest from the host and possibly
from other Virtual Machines on your host.
I’ll not
cover installing Windows on a VM , that
is covered all over the internet and no point reinventing the wheel.
For this
scenario I would recommend setting your VM to use a Host Only adapter. I’ve
found this is the simplest solution for getting a local play area set up on
VMware Player. You will not have internet in your guest VM but that’s hardly
the main reason for this setup. (A Bridged adpater may be the answer but I’ve found
trying to configure it difficult as the network tool doesn’t install by default )
When installing
VMware Player, it creates three virtual network interfaces, VMnNet0, VMnet1 and
VMnet8. VMnet1 is the 'host only'
interface which we will be using and you can see this in your hosts network adapters.
It will already have an IP assigned(I’ve found it doesn’t use this IP range
when assigning IP’s to the VM’s, currently it’s a mystery to me
but I think its probably done through the network tool).
The good
thing is that it keeps the same IP for the VM as long as it’s around. Once
configured with a host-only network card I’ve found my VM’s will keep the same
IP. I’ve tested this starting them in different orders and copying them and
starting them up, each time the existing VM’s maintain their IP and the new
VM;’s are assigned a new one.
The new
step before installing the oracle software is to configure your virtual windows
environment with a loopback adpater as per oracle instructions.
- Open the Windows Control Panel.
- Double-click Add Hardware to start the Add
Hardware wizard.
- In the Welcome window, click Next.
- In the ‘Is the hardware connected? window,
select Yes, I have already connected the hardware, and click Next.
- In the The following hardware is already
installed on your computer window, in the list of installed hardware,
select Add a new hardware device, and click Next.
- In the The wizard can help you install
other hardware window, select Install the hardware that I manually select
from a list, and click Next.
- From the list of hardware types, select
the type of hardware you are installing window, select Network adapters,
and click Next.
- In the Select Network Adapter window, make
the following selections:
- Manufacturer: Select Microsoft.
- Network Adapter: Select Microsoft
Loopback Adapter.
- Click Next.
- In the The wizard is ready to install your
hardware window, click Next.
- In the Completing the Add Hardware Wizard
window, click Finish.
- If you are using Windows 2003, restart
your computer.
- Right-click My Network Places on the
desktop and choose Properties. This displays the Network Connections
Control Panel.
- Right-click the connection that was just
created. This is usually named "Local Area Connection 2". Choose
Properties.
- On the General tab, select Internet
Protocol (TCP/IP), and click Properties.
- In the Properties dialog box, click Use
the following IP address and do the following:
- IP Address: Enter a non-routable IP for the loopback adapter.
Oracle recommends the following non-routable addresses:
- 192.168.x.x (x is any value between 0
and 255)
- 10.10.10.10
- Subnet mask: Enter 255.255.255.0.
- Record the values you entered, which you will need later in this
procedure.
- Leave all other fields empty.
- Click OK.
- Click OK.
- Close Network Connections.
- Restart the computer.
- Add a line to the SYSTEM_DRIVE:\WINDOWS\system32\drivers\etc\hosts
file with the following format, after the localhost line:
where:
- IP_address is the non-routable IP address
you entered in step 16.
- hostname is the name of the computer.
- domainname is the name of the domain.
10.10.10.10 mycomputer.mydomain.com mycomputer
This way
oracle will always resolve its connection correctly.
The last
step is to install the Oracle Software and then test your connection from your
host.
At the end,
you should be able to connect from your host desktop to the guest VM over
remote desktop or through a SQL client like SQL Developer. The Guest IP will
not change so you could add a shortcut to your hosts file. In the Guest VM, the
loopback adapter will resolve all traffic back to the guest IP and oracle will
have no issues no matter what network your connected to on your host.
In the below example i've used ORADBHOST1 for the install and that is what is present in my tnsnames.ora.
In the below example i've used ORADBHOST1 for the install and that is what is present in my tnsnames.ora.
No comments:
Post a Comment