Friday, December 31, 2010

Oracle VM invalid compressed data to inflate

Installing a Oracle VM template is a quite easy job, however, you might run into a unexpected error in some cases. My home test setup is that I have my Oracle VM running_pool and my seed_pool on a NFS server running Debian. I downloaded all the files needed for the installation of Oracle VM Template for Enterprise Manager Grid Control x86 (32 bit). If you look at the documentation on the Oracle website you have to simple unzip them, this is what the Oracle guide states:

# cd /OVS/seed_pool
# unzip V22875-01.zip
# unzip V22876-01.zip
# unzip V22879-01.zip
# unzip V22877-01.zip

In most cases this should work, the issue is that the zip files (the first 3 of them) contain files that are larger than 4 GB. the zip (or unzip in this case) algorithm is not very happy with files larger than 4 GB. You might encounter a issue like "error: invalid compressed data to inflate". I was under the impression something was not downloaded correctly so I downloaded it again however it gave me the same error and after checking the MD5 it was clear the files where not corrupted.

After some work on google I found a possible solution around this by using 7zip. however a more fine solution is also available without having to install another decompression tool.

This is also working (and more easy):

gunzip -c V22875-01.zip > OVM_EM_111_1of4.tgz
gunzip -c V22876-01.zip > OVM_EM_111_2of4.tgz
gunzip -c V22879-01.zip > OVM_EM_111_3of4.tgz
gunzip -c V22877-01.zip > OVM_EM_111_4of4.tgz

After this the manual continues and you have to execute the following command:

cat OVM_EM_111_?of4.tgz | tar -xzvf -

Now you will have a directory named OVM_EM_111 with your files in it which can be used to setup a new system from you Oracle VM Management console.

Thursday, December 30, 2010

import outlook pst on your mac

I recently started my 100% switch from a IBM Lenovo laptop from the company to a new macbook air. Using a macbook air (or a Linux distro) in a windows dominated corporate domain can be hard so I will share the upcoming time some tips and hints on how to switch and make your life more easy. When I received my macbook air I also received a Microsoft office 2011 suite which holds Microsoft outlook 2011 for mac.

One of the things I used to do, or not do, is delete e-mail. I do store almost all my send and received mail on my "previous" laptop in a local pst file. A pst file can be used on windows to store mail locally instead of on the mail server. So one of the things needed to do was to move my mail archive from my windows laptop to my macbook. A Personal Storage Table (.pst) is an open proprietary file format used to store copies of messages, calendar events, and other items within Microsoft software such as Microsoft Exchange Client, Windows Messaging, and Microsoft Outlook. The open format is controlled by Microsoft who provide free specifications and free irrevocable technology licensing.

A couple of simple steps to get this done. Uncheck the "Hide On My Computer folder" in your preferences menu;


Go to "File" and select "Import", in the next screen you have to select "Outlook Data file (.pst or .olm)";


On the next screen select that you want to import a .PST file;

After this select your .PST file you want to import and after selecting the file click "Import". This process can take some time depending on the size of the .PST file. After this is done you will be able to locate you local file in your left pane of your outlook.

Sunday, December 12, 2010

Linux find hardware

Ok lets say you get into a office from a customer and you have to familiarize yourself as quick as possible with what kind of systems the customer is running in its datacenter. You can do a lot by looking at the operating system however at some point you also want to know what kind of hardware is located in the datacenter, what hardware are those systems are running on. You can quickly see a lot of stuff like memory, CPU and storage however if you want to dive into more detail of the hardware you will find your friend in the lshw command.

lshw stands for list hardware and enables you to list all the hardware on your system. lshw comes in a commandline version and a graphical version. We will focus on the commandline version.

lshw has a couple of options, the first which we will not discuss is the -X command, this will launch the GUI of lshw which we will not discuss. What are great options when you need to index a lot of systems in a short time are the -xml and the -html command. The -html command will generate a very basic command which you could use to generate per server a hardware information page, if you want to do more than only view it and you want to import it in a database for example you can use the -xml option to generate the same content in a xml way.

The -short and -businfo options are more for when you need a quick glimps into the hardware. This is commonly used when you will be debugging some problem which might be related to hardware.

A example of the output of the lshw -short command on one of my laptops is shown below;



root@JOLO-LINUX:~# lshw -short
H/W path Device Class Description
==========================================================
system 6464B88
/0 bus 6464B88
/0/0 memory 128KiB BIOS
/0/6 processor Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
/0/6/a memory 64KiB L1 cache
/0/6/c memory 2MiB L2 cache
/0/6/0.1 processor Logical CPU
/0/6/0.2 processor Logical CPU
/0/b memory 64KiB L1 cache
/0/2b memory 2GiB System Memory
/0/2b/0 memory 1GiB SODIMM DDR2 Synchronous 667 MHz (1.5 ns)
/0/2b/1 memory 1GiB SODIMM DDR2 Synchronous 667 MHz (1.5 ns)
/0/1 processor
/0/1/0.1 processor Logical CPU
/0/1/0.2 processor Logical CPU
/0/100 bridge Mobile PM965/GM965/GL960 Memory Controller Hub
/0/100/2 display Mobile GM965/GL960 Integrated Graphics Controller
/0/100/2.1 display Mobile GM965/GL960 Integrated Graphics Controller
/0/100/19 eth0 network 82566MM Gigabit Network Connection
/0/100/1a bus 82801H (ICH8 Family) USB UHCI Controller #4
/0/100/1a.1 bus 82801H (ICH8 Family) USB UHCI Controller #5
/0/100/1a.7 bus 82801H (ICH8 Family) USB2 EHCI Controller #2
/0/100/1b multimedia 82801H (ICH8 Family) HD Audio Controller
/0/100/1c bridge 82801H (ICH8 Family) PCI Express Port 1
/0/100/1c.1 bridge 82801H (ICH8 Family) PCI Express Port 2
/0/100/1c.1/0 wlan0 network PRO/Wireless 4965 AG or AGN [Kedron] Network Connection
/0/100/1c.2 bridge 82801H (ICH8 Family) PCI Express Port 3
/0/100/1c.3 bridge 82801H (ICH8 Family) PCI Express Port 4
/0/100/1c.4 bridge 82801H (ICH8 Family) PCI Express Port 5
/0/100/1d bus 82801H (ICH8 Family) USB UHCI Controller #1
/0/100/1d.1 bus 82801H (ICH8 Family) USB UHCI Controller #2
/0/100/1d.2 bus 82801H (ICH8 Family) USB UHCI Controller #3
/0/100/1d.7 bus 82801H (ICH8 Family) USB2 EHCI Controller #1
/0/100/1e bridge 82801 Mobile PCI Bridge
/0/100/1e/0 bridge RL5c476 II
/0/100/1e/0.1 bus R5C832 IEEE 1394 Controller
/0/100/1e/0.2 generic R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
/0/100/1e/0.3 generic Illegal Vendor ID
/0/100/1e/0.4 generic R5C592 Memory Stick Bus Host Adapter
/0/100/1e/0.5 generic xD-Picture Card Controller
/0/100/1f bridge 82801HBM (ICH8M-E) LPC Interface Controller
/0/100/1f.1 scsi0 storage 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller
/0/100/1f.1/0.0.0 /dev/cdrom disk DVD/CDRW UJDA775
/0/100/1f.2 scsi2 storage 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller
/0/100/1f.2/0.0.0 /dev/sda disk 100GB HITACHI HTS72201
/0/100/1f.2/0.0.0/1 /dev/sda1 volume 35GiB Windows NTFS volume
/0/100/1f.2/0.0.0/2 /dev/sda2 volume 41GiB Windows NTFS volume
/0/100/1f.2/0.0.0/3 /dev/sda3 volume 16GiB Extended partition
/0/100/1f.2/0.0.0/3/5 /dev/sda5 volume 15GiB Linux filesystem partition
/0/100/1f.2/0.0.0/3/6 /dev/sda6 volume 760MiB Linux swap / Solaris partition
/0/100/1f.3 bus 82801H (ICH8 Family) SMBus Controller
/1 power 92P1141
root@JOLO-LINUX:~#


the output of the lshw -businfo command on the same machine is shown below;



root@JOLO-LINUX:~# lshw -businfo
Bus info Device Class Description
=====================================================
system 6464B88
bus 6464B88
memory 128KiB BIOS
cpu@0 processor Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
memory 64KiB L1 cache
memory 2MiB L2 cache
processor Logical CPU
processor Logical CPU
memory 64KiB L1 cache
memory 2GiB System Memory
memory 1GiB SODIMM DDR2 Synchronous 667 MHz (1.5 ns)
memory 1GiB SODIMM DDR2 Synchronous 667 MHz (1.5 ns)
cpu@1 processor
processor Logical CPU
processor Logical CPU
pci@0000:00:00.0 bridge Mobile PM965/GM965/GL960 Memory Controller Hub
pci@0000:00:02.0 display Mobile GM965/GL960 Integrated Graphics Controller
pci@0000:00:02.1 display Mobile GM965/GL960 Integrated Graphics Controller
pci@0000:00:19.0 eth0 network 82566MM Gigabit Network Connection
pci@0000:00:1a.0 bus 82801H (ICH8 Family) USB UHCI Controller #4
pci@0000:00:1a.1 bus 82801H (ICH8 Family) USB UHCI Controller #5
pci@0000:00:1a.7 bus 82801H (ICH8 Family) USB2 EHCI Controller #2
pci@0000:00:1b.0 multimedia 82801H (ICH8 Family) HD Audio Controller
pci@0000:00:1c.0 bridge 82801H (ICH8 Family) PCI Express Port 1
pci@0000:00:1c.1 bridge 82801H (ICH8 Family) PCI Express Port 2
pci@0000:03:00.0 wlan0 network PRO/Wireless 4965 AG or AGN [Kedron] Network Connection
pci@0000:00:1c.2 bridge 82801H (ICH8 Family) PCI Express Port 3
pci@0000:00:1c.3 bridge 82801H (ICH8 Family) PCI Express Port 4
pci@0000:00:1c.4 bridge 82801H (ICH8 Family) PCI Express Port 5
pci@0000:00:1d.0 bus 82801H (ICH8 Family) USB UHCI Controller #1
pci@0000:00:1d.1 bus 82801H (ICH8 Family) USB UHCI Controller #2
pci@0000:00:1d.2 bus 82801H (ICH8 Family) USB UHCI Controller #3
pci@0000:00:1d.7 bus 82801H (ICH8 Family) USB2 EHCI Controller #1
pci@0000:00:1e.0 bridge 82801 Mobile PCI Bridge
pci@0000:15:00.0 bridge RL5c476 II
pci@0000:15:00.1 bus R5C832 IEEE 1394 Controller
pci@0000:15:00.2 generic R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
pci@0000:15:00.3 generic Illegal Vendor ID
pci@0000:15:00.4 generic R5C592 Memory Stick Bus Host Adapter
pci@0000:15:00.5 generic xD-Picture Card Controller
pci@0000:00:1f.0 bridge 82801HBM (ICH8M-E) LPC Interface Controller
pci@0000:00:1f.1 scsi0 storage 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller
scsi@0:0.0.0 /dev/cdrom disk DVD/CDRW UJDA775
pci@0000:00:1f.2 scsi2 storage 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller
scsi@2:0.0.0 /dev/sda disk 100GB HITACHI HTS72201
scsi@2:0.0.0,1 /dev/sda1 volume 35GiB Windows NTFS volume
scsi@2:0.0.0,2 /dev/sda2 volume 41GiB Windows NTFS volume
scsi@2:0.0.0,3 /dev/sda3 volume 16GiB Extended partition
/dev/sda5 volume 15GiB Linux filesystem partition
/dev/sda6 volume 760MiB Linux swap / Solaris partition
pci@0000:00:1f.3 bus 82801H (ICH8 Family) SMBus Controller
power 92P1141
root@JOLO-LINUX:~#


you can use the lshw command itself without any extra option, this will show you a lot of information however that can be a little intimidating the first time you have a look at it. Better is to limit the output by using a class option. for example using the class option processor. Shown below is the output of the command lshw -class processor ;



root@JOLO-LINUX:~# lshw -class processor
*-cpu:0
description: CPU
product: Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
vendor: Intel Corp.
physical id: 6
bus info: cpu@0
version: 6.15.13
serial: 0000-06FD-0000-0000-0000-0000
slot: None
size: 1801MHz
capacity: 1801MHz
width: 64 bits
clock: 200MHz
capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx x86-64 constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida tpr_shadow vnmi flexpriority cpufreq
configuration: id=0
*-logicalcpu:0
description: Logical CPU
physical id: 0.1
width: 64 bits
capabilities: logical
*-logicalcpu:1
description: Logical CPU
physical id: 0.2
width: 64 bits
capabilities: logical
*-cpu:1
physical id: 1
bus info: cpu@1
version: 6.15.13
serial: 0000-06FD-0000-0000-0000-0000
size: 800MHz
capacity: 800MHz
capabilities: vmx ht cpufreq
configuration: id=0
*-logicalcpu:0
description: Logical CPU
physical id: 0.1
capabilities: logical
*-logicalcpu:1
description: Logical CPU
physical id: 0.2
capabilities: logical
root@JOLO-LINUX:~#


the class option can be used also on the other commands, below example is the -class option used on the -short option;



root@JOLO-LINUX:~# lshw -short -class processor
H/W path Device Class Description
==========================================================
/0/6 processor Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
/0/6/0.1 processor Logical CPU
/0/6/0.2 processor Logical CPU
/0/1 processor
/0/1/0.1 processor Logical CPU
/0/1/0.2 processor Logical CPU
root@JOLO-LINUX:~#


shown below is the class option used on the -businfo option.



root@JOLO-LINUX:~# lshw -businfo -class processor
Bus info Device Class Description
=====================================================
cpu@0 processor Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
processor Logical CPU
processor Logical CPU
cpu@1 processor
processor Logical CPU
processor Logical CPU
root@JOLO-LINUX:~#


Sunday, December 05, 2010

oracle VM console

When you are using Oracle VM you might sometimes want to jump to the console of one of your virtual machines. You can connect to it using a new SSH session however in some cases it is more easy to connect directly to the console. For this you can use the console option from the XM command.

To be able to use it you first need to know which domain id the virtual machine has you want to connect to. You can use a xm list command for this, the example below is the output of one of my test servers;

[root@vms0 ~]# xm list
Name ID Mem VCPUs State Time(s)
34_jlo1 1 1024 1 -b---- 904.3
39_webcenter0 2 2048 2 -b---- 2742.7
Domain-0 0 574 4 r----- 52882.8
[root@vms0 ~]#

if I want to connect to "39_webcenter0" I will have to use ID 2 meaning my command will be "xm console 2". when you enter this command it will possibly looks like nothing is happening. However if you press enter you will get the login prompt of your console.

[root@vms0 ~]# xm console 2

Enterprise Linux Enterprise Linux AS release 4 (October Update 5)
Kernel 2.6.9-55.0.12.9.1.ELxenU on an i686

webcenter0 login:

Now you will be able to login to your system. One tricky part is how to exit the console again. When you are done you type the exit command and you will again come to the login prompt of your virtual machine. So you are still in the console. The way to exit the console (using putty) is Cntrl + ] and you will again be at the commandline of your Oracle VM server.

Reset Oracle OC4JADMIN password

When working with Oracle middleware you will have to use the OC4JADMIN account at some point. As it is with all username password combinations it can happen that you forget this password. For example you lost it, can not remember it, you get a system that is installed by someone else and you do not have the password. The options why you do not have this password are endless..... reseting the password can be done however not via a simple command. You will need to undertake some steps. This is not a bad thing because in a normal situation you will have the password, however in cases you do not have it you can take the following steps:

1) Login to a shell account on your server (we do only explain UNIX/Linux installs) and go stop your middleware services with "opmnctl stopall".

2) Go to $ORACLE_HOME/j2ee/home/config and open the file system-jazn-data.xml with vi

3) Locate the XML User structure for oc4jadmin

4) Delete the data between the "credentials" tags and enter here a new password with a "!" in front if it. The exclamation mark is important to indeicat that this is the new password.

5) Go to $ORACLE_HOME/j2ee/oc4jinstance/persistence/ascontrol/ascontrol/securestore and delete all file's. This is the location where the cached password are saved so we have to delete them.

6) start your middelware again with a opmnctl command

You are done and ready to go with the new password.