Saturday, September 06, 2008


Setting up VNC on SNV97 DomU at SNV97 Dom0



Solaris97PVM console login: root
Password:
Last login: Sat Sep 6 11:41:12 on console
Sep 6 17:30:23 Solaris97PVM login: ROOT LOGIN /dev/console
Sun Microsystems Inc. SunOS 5.11 snv_97 November 2008
# bash
bash-3.2# export TERM=vt100
bash-3.2# export PATH=/opt/SUNWtvnc/bin:/usr/openwin/bin:$PATH
bash-3.2# echo $PATH
/opt/SUNWtvnc/bin:/usr/openwin/bin:/usr/sbin:/usr/bin
bash-3.2# vncserver

You will require a password to access your desktops.

Password:
Verify:
Would you like to enter a view-only password (y/n)? n
xauth: creating new authority file /root/.Xauthority

New 'X' desktop is Solaris97PVM:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/Solaris97PVM:1.log

bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
xnf0: flags=201000843 mtu 1500 index 2
inet 192.168.1.9 netmask ffffff00 broadcast 192.168.1.255
ether 0:16:3e:1b:cd:91
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128


bash-3.2# ps -ef | grep vnc
root 790 1 0 17:31:25 console 0:00 /opt/SUNWtvnc/bin/Xvnc :1 -desktop X -httpd /opt/SUNWtvnc/bin/../vnc/classes -a


bash-3.2# netstat -a | grep 580
*.5801 *.* 0 0 49152 0 LISTEN
ffffff014aa7d580 stream-ord 00000000 00000000 /var/run/dbus/system_bus_socket
bash-3.2#


Launch browser to http://IP-Dom0:5801, submit password and get graphical console in browser, actually Java applet "VncViewer" loaded from DomU
in browser at Dom0.























As appears vncserver also activates port 5901:-


-bash-3.2# netstat -a | grep 580
*.5801 *.* 0 0 49152 0 LISTEN
ffffff014b9f7580 stream-ord ffffff014bb12480 00000000 /var/run/hald/dbus-9fQYRGL6mm


-bash-3.2# netstat -a | grep 590
*.5901 *.* 0 0 49152 0 LISTEN
Solaris97PVM.5901 192.168.1.7.47087 49640 0 49640 0 ESTABLISHED
ffffff014bd62590 stream-ord 00000000 00000000 /var/tmp/orbit-root/linc-3b1-0-48c30efadf528


providing usual vnc connection to SNV97 DomU via 5901.


Working with with GlassFish V2 at SNV97 Dom0.






Saturday, August 30, 2008


Install Xen 3.3 on CentOS 5.2 via http://www.gitco.de/repo/xen3.3.0



It's a review of Sascha's posting to blog mentioned in references
plus test installations PV and HVM DomUs via virt-install with Xen 3.3
Hypervisor running on CentOS 5.2 Dom0 (64-bit).
Download from location above:-



libvirt-0.4.4-3.x86_64.rpm
libvirt-devel-0.4.4-3.x86_64.rpm
libvirt-python-0.4.4-3.x86_64.rpm
xen-3.3.0-2.x86_64.rpm
xen-devel-3.3.0-2.x86_64.rpm
xen-libs-3.3.0-2.x86_64.rpm




Create new file:-



#vi /etc/yum.repos.d/XEN.repo
[xen]
name=CentOS-$releasever - XEN
baseurl=http://www.gitco.de/repo/xen3.3.0
gpgcheck=0




Then run:-



[root@ServerRHL51 InstallXen3.3]# yum install xen-3.3.0-2.x86_64.rpm \
> xen-devel-3.3.0-2.x86_64.rpm xen-libs-3.3.0-2.x86_64.rpm \
> libvirt-0.4.4-3.x86_64.rpm libvirt-devel-0.4.4-3.x86_64.rpm \
> libvirt-python-0.4.4-3.x86_64.rpm
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
xen 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 3.7 kB 00:00
################################################## 7/7
Parsing package install arguments
Examining xen-3.3.0-2.x86_64.rpm: xen - 3.3.0-2.x86_64
Marking xen-3.3.0-2.x86_64.rpm as an update to xen - 3.2.1-0xs.x86_64
Examining xen-devel-3.3.0-2.x86_64.rpm: xen-devel - 3.3.0-2.x86_64
Marking xen-devel-3.3.0-2.x86_64.rpm as an update to xen-devel - 3.2.1-0xs.x86_64
Examining xen-libs-3.3.0-2.x86_64.rpm: xen-libs - 3.3.0-2.x86_64
Marking xen-libs-3.3.0-2.x86_64.rpm as an update to xen-libs - 3.2.1-0xs.x86_64
Examining libvirt-0.4.4-3.x86_64.rpm: libvirt - 0.4.4-3.x86_64
Marking libvirt-0.4.4-3.x86_64.rpm as an update to libvirt - 0.3.3-7.el5.x86_64
Examining libvirt-devel-0.4.4-3.x86_64.rpm: libvirt-devel - 0.4.4-3.x86_64
Marking libvirt-devel-0.4.4-3.x86_64.rpm to be installed
Examining libvirt-python-0.4.4-3.x86_64.rpm: libvirt-python - 0.4.4-3.x86_64
Marking libvirt-python-0.4.4-3.x86_64.rpm as an update to libvirt-python - 0.3.3-7.el5.x86_64
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package xen.x86_64 0:3.3.0-2 set to be updated
---> Package xen-devel.x86_64 0:3.3.0-2 set to be updated
---> Package xen-libs.x86_64 0:3.3.0-2 set to be updated
---> Package libvirt.x86_64 0:0.4.4-3 set to be updated
---> Package libvirt-devel.x86_64 0:0.4.4-3 set to be updated
---> Package libvirt-python.x86_64 0:0.4.4-3 set to be updated
--> Running transaction check
--> Processing Dependency: /usr/bin/qemu-img for package: libvirt
--> Processing Dependency: iscsi-initiator-utils for package: libvirt
--> Processing Dependency: cyrus-sasl-md5 for package: libvirt
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for cyrus-sasl-md5 to pack into transaction set.
cyrus-sasl-md5-2.1.22-4.x 100% |=========================| 15 kB 00:00
---> Package cyrus-sasl-md5.x86_64 0:2.1.22-4 set to be updated
---> Downloading header for qemu to pack into transaction set.
qemu-0.9.0-4.x86_64.rpm 100% |=========================| 13 kB 00:00
---> Package qemu.x86_64 0:0.9.0-4 set to be updated
---> Downloading header for iscsi-initiator-utils to pack into transaction set.
iscsi-initiator-utils-6.2 100% |=========================| 12 kB 00:00
---> Package iscsi-initiator-utils.x86_64 0:6.2.0.868-0.7.el5 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libvirt-devel x86_64 0.4.4-3 libvirt-devel-0.4.4-3.x86_64.rpm 1.0 M
Updating:
libvirt x86_64 0.4.4-3 libvirt-0.4.4-3.x86_64.rpm 6.0 M
libvirt-python x86_64 0.4.4-3 libvirt-python-0.4.4-3.x86_64.rpm 339 k
xen x86_64 3.3.0-2 xen-3.3.0-2.x86_64.rpm 15 M
xen-devel x86_64 3.3.0-2 xen-devel-3.3.0-2.x86_64.rpm 843 k
xen-libs x86_64 3.3.0-2 xen-libs-3.3.0-2.x86_64.rpm 1.0 M
Installing for dependencies:
cyrus-sasl-md5 x86_64 2.1.22-4 base 46 k
iscsi-initiator-utils x86_64 6.2.0.868-0.7.el5 base 575 k
qemu x86_64 0.9.0-4 extras 4.5 M

Transaction Summary
=============================================================================
Install 4 Package(s)
Update 5 Package(s)
Remove 0 Package(s)

Total download size: 29 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): cyrus-sasl-md5-2.1 100% |=========================| 46 kB 00:00
(2/3): qemu-0.9.0-4.x86_6 100% |=========================| 4.5 MB 02:35
(3/3): iscsi-initiator-ut 100% |=========================| 575 kB 00:19
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : xen-libs ####################### [ 1/14]
Installing: iscsi-initiator-utils ####################### [ 2/14]
Installing: qemu ####################### [ 3/14]
Installing: cyrus-sasl-md5 ####################### [ 4/14]
Updating : libvirt ####################### [ 5/14]
Updating : libvirt-python ####################### [ 6/14]
Updating : xen ####################### [ 7/14]
Updating : xen-devel ####################### [ 8/14]
Installing: libvirt-devel ####################### [ 9/14]
Cleanup : xen ####################### [10/14]
Cleanup : xen-devel ####################### [11/14]
Cleanup : xen-libs ####################### [12/14]
Cleanup : libvirt ####################### [13/14]
Cleanup : libvirt-python ####################### [14/14]

Installed: libvirt-devel.x86_64 0:0.4.4-3
Dependency Installed: cyrus-sasl-md5.x86_64 0:2.1.22-4 iscsi-initiator-utils.x86_64 0:6.2.0.868-0.7.el5 qemu.x86_64 0:0.9.0-4
Updated: libvirt.x86_64 0:0.4.4-3 libvirt-python.x86_64 0:0.4.4-3 xen.x86_64 0:3.3.0-2 xen-devel.x86_64 0:3.3.0-2 xen-libs.x86_64 0:3.3.0-2
Complete!




Reboot system



[root@RHEL52 ~]# xm dmesg
__ __ _____ _____ ___
\ \/ /___ _ __ |___ / |___ / / _ \
\ // _ \ '_ \ |_ \ |_ \| | | |
/ \ __/ | | | ___) | ___) | |_| |
/_/\_\___|_| |_| |____(_)____(_)___/

(XEN) Xen version 3.3.0 (root@labor.lan) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) Thu Aug 28 22:24:29 CEST 2008
(XEN) Latest ChangeSet: unavailable
(XEN) Command line:
(XEN) Video information:
(XEN) VGA is text mode 80x25, font 8x16
(XEN) VBE/DDC methods: none; EDID transfer time: 0 seconds
(XEN) EDID info not retrieved because no DDC retrieval method detected
(XEN) Disc information:
(XEN) Found 0 MBR signatures
(XEN) Found 2 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN) 0000000000000000 - 000000000009ec00 (usable)
(XEN) 000000000009ec00 - 00000000000a0000 (reserved)
(XEN) 00000000000e4000 - 0000000000100000 (reserved)
(XEN) 0000000000100000 - 00000000cff80000 (usable)
(XEN) 00000000cff80000 - 00000000cff8e000 (ACPI data)
(XEN) 00000000cff8e000 - 00000000cffe0000 (ACPI NVS)
(XEN) 00000000cffe0000 - 00000000d0000000 (reserved)
(XEN) 00000000fee00000 - 00000000fee01000 (reserved)
(XEN) 00000000ffe00000 - 0000000100000000 (reserved)
(XEN) 0000000100000000 - 0000000230000000 (usable)
(XEN) System RAM: 8191MB (8387704kB)
(XEN) ACPI: RSDP 000FBB80, 0014 (r0 ACPIAM)
(XEN) ACPI: RSDT CFF80000, 003C (r1 A_M_I_ OEMRSDT 10000730 MSFT 97)
(XEN) ACPI: FACP CFF80200, 0084 (r2 A_M_I_ OEMFACP 10000730 MSFT 97)
(XEN) ACPI: DSDT CFF805C0, 8E13 (r1 A0840 A0840001 1 INTL 20060113)
(XEN) ACPI: FACS CFF8E000, 0040
(XEN) ACPI: APIC CFF80390, 006C (r1 A_M_I_ OEMAPIC 10000730 MSFT 97)
(XEN) ACPI: MCFG CFF80400, 003C (r1 A_M_I_ OEMMCFG 10000730 MSFT 97)
(XEN) ACPI: OEMB CFF8E040, 0081 (r1 A_M_I_ AMI_OEM 10000730 MSFT 97)
(XEN) ACPI: HPET CFF893E0, 0038 (r1 A_M_I_ OEMHPET 10000730 MSFT 97)
(XEN) ACPI: OSFR CFF89420, 00B0 (r1 A_M_I_ OEMOSFR 10000730 MSFT 97)
(XEN) Xen heap: 14MB (14500kB)
(XEN) Domain heap initialised
(XEN) Processor #0 7:7 APIC version 20
(XEN) Processor #1 7:7 APIC version 20
(XEN) IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
(XEN) Enabling APIC mode: Flat. Using 1 I/O APICs
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Detected 3005.619 MHz processor.
(XEN) HVM: VMX enabled
(XEN) CPU0: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz stepping 06
(XEN) Booting processor 1/1 eip 8c000
(XEN) CPU1: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz stepping 06
(XEN) Total of 2 processors activated.
(XEN) ENABLING IO-APIC IRQs
(XEN) -> Using new ACK method
(XEN) checking TSC synchronization across 2 CPUs: passed.
(XEN) Platform timer is 14.318MHz HPET
(XEN) Brought up 2 CPUs
(XEN) I/O virtualisation disabled
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Xen kernel: 64-bit, lsb, compat32
(XEN) Dom0 kernel: 64-bit, lsb, paddr 0xffffffff80200000 -> 0xffffffff807014e4
(XEN) PHYSICAL MEMORY ARRANGEMENT:
(XEN) Dom0 alloc.: 0000000226000000->0000000228000000 (2022123 pages to be allocated)
(XEN) VIRTUAL MEMORY ARRANGEMENT:
(XEN) Loaded kernel: ffffffff80200000->ffffffff807014e4
(XEN) Init. ramdisk: ffffffff80702000->ffffffff80e8be00
(XEN) Phys-Mach map: ffffffff80e8c000->ffffffff81e09758
(XEN) Start info: ffffffff81e0a000->ffffffff81e0a4a4
(XEN) Page tables: ffffffff81e0b000->ffffffff81e1e000
(XEN) Boot stack: ffffffff81e1e000->ffffffff81e1f000
(XEN) TOTAL: ffffffff80000000->ffffffff82000000
(XEN) ENTRY ADDRESS: ffffffff80200000
(XEN) Dom0 has maximum 2 VCPUs
(XEN) Scrubbing Free RAM: .done.
(XEN) Xen trace buffers: disabled
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) Xen is relinquishing VGA console.
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 108kB init memory.
(XEN) ioapic_guest_write: apic=0, pin=22, old_irq=-1, new_irq=-1
(XEN) ioapic_guest_write: old_entry=00010a0b, new_entry=0001a9d0
(XEN) ioapic_guest_write: Special delivery mode 2 with non-zero vector 0b
(XEN) mm.c:676:d1 Non-privileged (1) attempt to map I/O space 000000f0




Install CentOS 5.2 DomU via virt-install

















Install Solaris 10 (05/08) HVM DomU via virt-install

























Solaris Nevada (b93) DomU at Xen 3.3 CentOS 5.2 Dom0








References
http://www.ruslansivak.com/index.cfm/2008/7/7/Xen-32-on-CentOS-52--x8664--RHEL-52-x8664

Tuesday, August 26, 2008


Solaris Nevada DomUs internet working at Xen 3.3 CentOS 5.2 Dom0 (64 bit)



First install Xen 3.3 from mercurial repository on xen-disabled CentOS 5.2 instance,previously installed the most recent version of "git" on the system (git-1.6.0.tar.gz), otherwise "make world" would fail.



# cd /usr/src/
# hg clone http://xenbits.xensource.com/xen-3.3-testing.hg
# cd xen-3.3-testing.hg
# make world
# make install




Determine the name of the Xen Linux kernel version that was installed.



# ls /lib/modules




There should be a directory for the Xen Linux kernel (e.g., 2.6.18.8-xen)
Generate the module dependency list and map files



# /sbin/depmod 2.6.18.8-xen




Create the Xen initial ramdisk image



# /sbin/mkinitrd /boot/initrd-2.6.18.8-xen.img 2.6.18.8-xen




Disable tls


 
# mv /lib64/tls /lib64/tls.disabled




Set xend service to start



# /sbin/chkconfig --add xend
# /sbin/chkconfig xend on




Install bridge-utils:-



# yum install bridge-utils




Edit /boot/grub/grub.conf and copy one of the existing boot entries to make the required changes for Xen and reboot into new kernel.



title Xen-3.3 CentOS 5.2 x86_64 (2.6.18.8-xen)
root (hd1,4)
kernel /xen-3.3.gz
module /vmlinuz-2.6.18.8-xen ro root=/dev/VolGroup01/LogVol00 rhgb quiet
module /initrd-2.6.18.8-xen.img












Open following 3 ports on firewall:-


67/UDP Bootstrap Protocol (BOOTP) Server; also used by Dynamic Host Configuration Protocol (DHCP)
68/UDP Bootstrap Protocol (BOOTP) Client; also used by Dynamic Host Configuration Protocol (DHCP)
53/TCP,UDP Domain Name System (DNS)


Allow SSH,HTTPS,HTTP services and proceed with SNV94 DomU install in DHCP mode with pygrub profile:-



name = 'Solaris94PV'
memory = '2048'
disk = [ 'file:/usr/lib/xen-solaris/snv94.iso,6:cdrom,r','phy:/dev/sda10,0,w']
vif = [ 'bridge = eth0' ]
bootloader = '/usr/bin/pygrub'
kernel = '/boot/platform/i86xpv/kernel/amd64/unix'
ramdisk = '/boot/amd64/x86.miniroot'
extra = '/platform/i86xpv/kernel/amd64/unix - nowin -B install_media=cdrom'









Load SNV94 DomU with profile:-



name = 'Solaris94PV'
memory = '2048'
disk = ['phy:/dev/sda10,0,w']
vif = [ 'bridge = eth0' ]




Bfu DomU to build 96 and reboot:-








Setup Sun Xvnc on DomU and verify Internet access:-











Notice also,that Solaris 10 (05/08) and Free BSD 7 HVM DomUs (32-bit on Intel,64-bit on AMD X2) may be easily installed at Xen 3.3 Linux Dom0(64 bit)
References
1.http://lxer.com/module/newswire/view/100541/index.html

Thursday, August 21, 2008


Deployment Seam 2.0.2 Application against Oracle 10gR2 database to Jboss 4.2.3 via NetBeans 6.1 on Solaris Nevada (b96)



Technical exercise bellow is targeting testing Jboss-Seam 2.0.2 SP1 with
NetBeans 6.1 (JDK 6.0) to deploy Brian Leonard's Sample to Jboss 4.2.3
on Solaris Nevada ( build 96) with xVM kernel.
Hibernate has been selected as persistence provider. Oracle 10gR2 database instance has been installed on SNV93 DomU for performance evaluation.

Oracle 10g installation procedure on Solaris Nevada DomU may be viewed if needed



To tune Jboss 4.2.3 instance and make it connects to Oracle Server, perform the following steps on the JBoss Application Server 4.2.3 :
Download the JDBC driver for Oracle 10g Release 2 located at:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
For the Oracle JDBC driver with JDK 1.4 and 1.5, use the ojdbc14.jar file.
Copy the JDBC driver to the JBoss environment by entering the following:
# cp ojdbc14.jar $JBOSS_HOME/server/default/lib
Create a file named $JBOSS_HOME/server/default/deploy/oracle-ds.xml and add the following contents:



<datasources>
<local-tx-datasource>
<jndi-name>oracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@IP_OR_HOSTNAME_OF _ORACLE_DB_ SERVER:1521:ORACLE_SID
</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>USERNAME</user-name>
<password>PASSWORD</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>




Testing the Oracle Database Connectivity
Test the connectivity between JBoss and Oracle by performing the following steps on the JBoss Application Server:
Create a JSP file named $JBOSS_HOME/server/default/deploy/jmx-console.war/oracleTest.jsp and add the following contents:



<%@page contentType="text/html" import="java.net.*,java.util.*,org.jboss.jmx.adaptor.model.*,
java.io.*,java.sql.*,javax.sql.*,javax.naming.*"%>
<html>
<head>
<title>JBoss->Oracle Test </title>
<link rel="stylesheet" href="style_master.css" type="text/css">
<meta http-equiv="cache-control" content="no-cache">
</head>
<body>
<%
InitialContext ctx = new InitialContext();
DatabaseMetaData dm = null;
DataSource ds = (DataSource)
ctx.lookup("java:/oracleDS");
Connection conn = null;
Statement stmt = null;
try {
conn = ds.getConnection();
dm =conn.getMetaData();
out.println("Connected to-> database version "+dm.getDatabaseProductVersion());
}catch (Exception sqlex) {
out.println(sqlex.getMessage());
}finally{
conn.close();
}
%>
</body>
</html>




Start JBoss by entering the following:
# $JBOSS_HOME/bin/run.sh
Verify that the Oracle test page is displayed by opening a browser and navigating to the following URL:
http://localhost:8080/jmx-console/oracleTest.jsp








Follow [1],[2] in new environment.
Add corresponding jars to ejb and web modules ([2]) and
proceed with persistence.xml , keeping Hibernate as persistence provider and selecting datasource as


java:/OracleDS


previously defined for Jboss 4.2.3 Server.








Proceed with tuning web.xml,ejb-jar.xml,faces-config.xml per [1].














Modify code of entity bean User.java and RegistrationActionBean.java ([1])
to instantiate Seam instances at runtime and delete JSF managed bean
as no longer needed.Right click in text area to run "Fix imports" and
select appropriate ones. Embedding seam annotations will require this
fixes to be done.








Annotation @Interceptors({org.jboss.seam.ejb.SeamInterceptor.class})
is required only if ejb-jar.xml has not been modified.
Otherwise , it is not needed








Deploy "Registration Application" to Jboss and run.











Connect to Oracle database from NetBeans 6.1 and perform query against table "users" cumulating inserted records.








Jboss status via NetBeans 6.1 may be viewed here.











Regarding "Seam Plugin for NetBeans 6.1" , please , view [3],[4].
Viewing comments in [3] requires login, otherwise feedbacks stay hidden.
References
1.http://weblogs.java.net/blog/bleonard/archive/2007/06/seam_refresh_1.html
2.http://weblogs.java.net/blog/caroljmcdonald/archive/2008/01/sample_applicat_4.html
3.http://davidsalter.co.uk/index.php?q=node/104
4.http://seamframework.org/Community/SeamgenNetbeansPlugin

Tuesday, July 22, 2008


Install Oracle 10.2.0.1 (64-bit) on SNV93 DomU at SNV93 Dom0



This instruction closely follows the one for 32-bit install
Oracle 10.2.0.2 on Solaris 10 at oracle-base.com ([1]). I have to
notice that attempt to reproduce it on 32-bit SNV93 DomU crashes
as usual. View discuss forum@opensolaris.org ([2]).
However, it's a bit different from [1] and allows to perform everything
quite smoothly. It is also supposed to be used only in development environment.


As the root user, issue the following command.

# projadd oracle

Append the following line to the "/etc/user_attr" file.

oracle::::project=oracle

If you've performed a default installation, it is likely that the only kernel parameter you need to alter is "max-shm-memory".
To check the current value issue the following command.



# prctl -n project.max-shm-memory -i project oracle
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 254MB - deny -
system 16.0EB max deny -




To reset this value, make sure at least one session is logged in as the oracle user, then from the root user issue the following commands.



# prctl -n project.max-shm-memory -v 4gb -r -i project oracle
# projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" oracle




The first dynamically resets the value, while the second makes changes to the "/etc/project" file so the value is persistent between reboots.



# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,4294967296,deny)


# prctl -n project.max-shm-memory -i project oracle
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 4.00GB - deny -
system 16.0EB max deny -




Create the new groups and users:



groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba -d -m /export/home/oracle \
-s /bin/bash oracle
chown oracle:oinstall /export/home/oracle
passwd -r files oracle




Create the directories in which the Oracle software will be installed:

# mkdir -p /u01/app/oracle/product/10.2.0/db_1
# chown -R oracle:oinstall /u01


Login as the oracle user and add the following lines at the end of the .bash_profile file:



# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
# Select the appropriate ORACLE_BASE
#ORACLE_BASE=/export/home/oracle; export ORACLE_BASE
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=SNV93; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
TERM=vt100; export TERM




Set up Sun Xvnc at DomU and login as oracle via
# vncviewer IP-DomU:1
from another terminal session.



svccfg -s application/x11/x11-server \
add display1
svccfg -s application/x11/x11-server:display1 \
addpg options application
svccfg -s application/x11/x11-server:display1 \
addpropvalue options/server astring: "/usr/X11/bin/Xvnc"
svccfg -s application/x11/x11-server:display1 \
addpropvalue options/server_args astring: '"SecurityTypes=None"'

# Configure dtlogin to start it

mkdir -p /etc/dt/config
cp /usr/dt/config/Xservers /etc/dt/config/Xservers
echo " :1 Local local_uid@none root /usr/X11/bin/Xserver :1" \
>> /etc/dt/config/Xservers
pkill -HUP dtlogin





Start ./runIstaller in advanced mode and
select option "Install Software only"




















Run "dbca" and create database SNV93 (as referenced by ORACLE_SID)






Run "netca" to create LISTENER process and perform Local names resolution creating files listener.ora and tnsnames.ora under $ORACLE_HOME/network/sdmin.








-bash-3.2$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Solaris94PV)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)


-bash-3.2$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

SNVDATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Solaris94PV)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SNVDATA)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)




Modify file /var/opt/oracle/oratab and change "N" to "Y".
Restart database.



$ emctl stop dbconsole
$ dbshut
$ lsnrctl stop
$ lsnrctl start
$ dbstart
$ isqlplusctl start
$ emctl start dbconsole






Modify /etc/hosts at Dom0 and launch browser at Dom0 to
http://Server93pv:1158/em/











References
1.http://oracle-base.com/articles/10g/OracleDB10gR2InstallationOnSolaris10.php
2.http://opensolaris.org/jive/thread.jspa?messageID=237405

Thursday, July 17, 2008


Install CentOS 5.X DomU at SNV93 Dom0 on boards with integrated NIC RTL8110SC/RTL8111B



ASUS P5K Premium/WIFI, P5K3 Deluxe,P5K Deluxe P5E3 Deluxe,Abit IP35 Pro,Gigabyte GA-P35-DQ6,MSI P35 Platinum have integrated on the board Realtek's NICs RTL8110SC/RTL8111B .RTL8110SC/RTL8111B (vs Marvell 88E8056 first NIC integrated on ASUS boards) are GLDv3 NICs and may be used for Solaris xVM PV and HVM DomUs creation at Solaris (Nevada) Dom0.
However, disabling checksum offloading on Linux DomU netfront driver (eth0) is required to get network on DomU.
Install CentOS 5.X DomU via virt-install as usual:-



# dladm show-dev
LINK STATE SPEED DUPLEX
rtls0 unknown 0Mb unknown
rge0 up 100Mb full

# svccfg -s xvm/xend setprop config/default-nic="rge0"
# svcadm refresh xvm/xend
# svcadm restart xvm/xend

# lofiadm -a /export/home/isos/rhel.iso
# mount -o ro -F hsfs /dev/lofi/1 /mnt
# share -F nfs /mnt
# virt-install -n RHEL5PV -p -r 1024 --nographics \
-f /dev/zvol/dsk/nevada/disk1 -l nfs:192.168.1.35:/mnt




Successfully installed in dhcp mode CentOS 5.X DomU appears to be unable to communicate with other boxes on the LAN and internet, except SNV93 Dom0, due to failure checksum offloading on Realtek 8110SC/RTL8111B.
Attempts of ssh connection from CentOS 5.1 DomU 192.168.1.37 at SNV93 Dom0 (NIC RTL8110SC)
# ssh user1@192.168.1.54
hangs ..
TCPDUMP running on remote box (192.168.1.54)
# tcpdump -s 1600 -vv



One entry generates for each ssh connection attempt.
First:-
17:12:43.058821 IP (tos 0x0, ttl 64, id 19771, offset 0, flags [DF], proto TCP (6), length 72) 192.168.1.37.52189
> 192.168.1.54.ssh: P, cksum 0x83e6 (incorrect (-> 0x9a09), 1169627751:1169627771(20) ack 423312198 win 46
Second:-
17:16:27.515427 IP (tos 0x0, ttl 64, id 19773, offset 0, flags [DF], proto TCP (6), length 72) 192.168.1.37.52189
> 192.168.1.54.ssh: P, cksum 0x83e6 (incorrect (-> 0xbed7), 1169627751:1169627771(20) ack 423312198 win 46




The solution is to disable checksum offloading on eth0 at Linux DomU.
Package ethtools has to be installed at DomU.
Following string has been added to /etc/rc.d/rc.local:-



/usr/local/sbin/ethtool -K eth0 tx off




Setup VNC on DomU:-



# mkdir .vnc
# cd .vnc
# vncserver :1
Vnc password will be requested by the last command.
Edit ~/.vnc/xstartup and uncomment first two lines.
Make this file as follows bellow:
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
Make following changes to /etc/sysconfig/vncservers file:-
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"
Then run:-
# chkconfig vncserver on
# reboot


















Setup F8 DomU at SNV93 Dom0


1.Login as root to DomU
2.Disable checksum offloading:-
# /usr/local/sbin/ethtool -K eth0 tx off
3.Install vnserver:-
# yum install vnc-server
4.Disable firewall:-
# /etc/init.d/iptables stop
5.Setup VNC as suggested above.
6.Connect to F8 DomU:-
# vncviwer IP-DomU:1
7. Tune firewall to enable port 5901/tcp
and apply settings.








References
1.http://techreport.com/articles.x/12747/1