BC, DR, HA, SC and MdM
SC3.2 1/06 under Virtual Box
It took me a while to get my 2-node cluster on my laptop running in Virtual Box. Reason was not that Sun Cluster was difficult to install, but rather to find a decent and portable network configuration. That was with VirtualBox 2.1. I will add some information at the end of this entry on my workarounds to get this working.
When I read about the new features of VirtualBox 2.2 in the networking space, I thought, this is exactly what I need for my 2-node cluster on my laptop: Host-only networking! That should solve my problems and it did.
The main problem of a cluster environment is that the typical cluster node is a static entity. It is not supposed to be carried around on a laptop - and, what is the central point - to work with dynamically assigned IP addresses and names. Clustered servers need to know their counterparts by name and address in advance! This is what Host-only networking delivers.
Now, what does my configuration look like?
- a Toshiba Tecra M9 laptop, running OpenSuse 10.3 for historical reasons
- 3 virtual machines running Solaris 10u6; two of them, the cluster nodes, with 896MB of memory, which allows for a decent machine; the third node runs a stripped down version of Solaris 10u6 with only 384MB; its only purpose at the moment is to serve as the quorum server; maybe it has to server as iSCSI target later, when I decide to use shared storage, which I don't at the moment.
Now to the tricky part, the networking configuration. The 2 cluster nodes use 3 network interfaces, all configured as Intel Pro/1000. Adapter 1 is configured as "Host-only network", which is the new 2.2 feature; it is bound to adapter vboxnet0, which is automatically created on my guest. On my system it is assigned IP address 192.168.56.1 . Adapters 2 and 3 are configured as "Internal Network" with id's ic1 and ic2. You can make a guess what these are being used for. Solaris internally these 3 apapters are mapped to e1000g[0-2].
If you need access to the external network beyond your host, you must add a fourth adapater configured as "Bridged Network".
How do I configure the network on the Solaris hosts? e1000g0 is configured as DHCP. Virtual Box will assign an IP address to it and it will use the given nodename, which is exactly what I need. As the assignement of the DHCP-based addresses seems to be fixed, probably based on the (virtual) MAC addresses, I can add these addresses into /etc/hosts safely. I have an additional hostname.e1000g0 file that sets the network mask and puts the adapter into the appropriate IPMP group.
hartmut11 netmask 255.255.255.0 group sc_ipmp0 -failover
I assume that the hostname gets overwritten by DHCP.
I do not add any configuration data for the other 2 adapters as they will be used for the cluster interconnects. If you have configured an adapater to get access to the external network you have to configure it as DHCP. If the only thing you want from "externally" is using Sun Cluster Manager, then the "Host-only" network is sufficient.
Now I am all set to install and configure Sun Cluster 3.2 1/09. Without going into much detail, as this is a straight forward install, I attach the iso image as a DVD, cd to the directory with the JES installer in it and start it. Configuration will be done later. The only interesting part during the install is to tell scinstall to use e1000g1 and e1000g2 for the cluster interconnect. That's it.
As I said, I am using a 3rd Solaris VM as my quorum server. But that is also just another simple Sun Cluster package install, without any major configuration work. I just changed the name of the QS instance.
Done! Now, I can do my testing. As I said, this cluster does not use shared storage. This needs some more work. But for my purposes, testing patching, this is sufficient.
Have fun
Hartmut Streppel
PS: I had promised to describe briefly what I had done prior to VirtualBox 2.2. OK, I had configured a 3rd internal network that I used solely for internode and quorum server communication. That was easy. I had configured my primary interface as bridged, which bound it to my eth0 network and gave me DHCP addresses and names, which was the problem. As long as I ran this environment in the same network, the DHCP assigned names remained the same. Attaching the laptop to my home DSL router changed the addresses and I had to edit /etc/hosts again and again.
What was worse is that DHCP also sets the nodename. As my cluster had been configured with fixed nodenames, and SC relies on them, I had to find a way to circumvent this problem. You can probably prevent this from happening but I used a trick, by adding a startup script that changed the nodename later in the boot sequence to keep the cluster happy. It worked but is not recommended.
Posted at 02:52PM Apr 23, 2009 by Hartmut Streppel in Cluster | Comments[1]
can some one share the step by step docs on it
Posted by vishnoo pandey on November 26, 2009 at 06:51 AM CET #