Tuesday, 26 June 2012

Problem importing templates for EM12c into OVS 3

Wow, it seems to be a problem on top of a problem, which is on top of another problem!

I want install EM12C BP1 (Bundle Patch 1 12.1.0.2) so that I can manage windows hosts, can download from here https://edelivery.oracle.com/EPD/Search/handle_go

I do not have enough storage on the current 11G install in my software library to upload the templates for 12C – because I’m going to destroy this VM – it’d be a waste of time anyway.

So, I need to upload the EM12C templates into my OVS repository directly – no problems.

That should be simple, I’ve downloaded the files for the OVM template:

  1. V31982-01.zip
  2. V31982-02.zip
  3. V31982-03.zip

I’ve setup my ftp server to pick up the files, but now I get the following in the logs:

image

Which shows

image

Which then has:

Server error message: Template import error: Command: (tar xzf /OVS/Repositories/0004fb00000300005dbf9d7f41f5d4c1/Templates/0004fb000014000079507c55c1616487/tmp/OVM_EM12_1of3.tgz --no-same-owner -C /OVS/Repositories/0004fb00000300005dbf9d7f41f5d4c1/Templates/0004fb000014000079507c55c1616487/tmp) failed: (2)

As the specific error.  Why do all of the errors have to be on the 4GB files, I keep asking myself!

So, I scp the file to my server and start uncompressing and unzipping the file, so that I can run my own command over it and see what the problem is.

Hooray – I’m not going crazy!

[root@MYRSVMH5D tmp]# tar xvf /OVS/Repositories/0004fb00000300005dbf9d7f41f5d4c1/Templates/tmp/OVM_EM12_1of3.tgz  --no-same-owner -C /OVS/Repositories/0004fb00000300005dbf9d7f41f5d4c1/Templates/tmp
OVM_EM12/
OVM_EM12/System.img
OVM_EM12/vm.cfg
OVM_EM12/em12.img

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

It seems that the file is corrupt, but riddle me this, riddle me that…  This is the unzipped file – I think that there is a problem at oracle – not with me.  Otherwise there would have probably been a problem with the unzip operation stating “incomplete file” – but it does not.  It errors with the untar.

It does make me think that perhaps if I did all files together in the xvf command, it might just work (multi member tar ball).  Perhaps there is a bug in the multiple template file import functionality in OVM?  Lets find out

It’s true – the multiple file template importer is cr@p.  It does everything one at a time, and that can never work.  I can do it manually with this command:

cat OVM_EM12_1of3.tgz OVM_EM12_2of3.tgz OVM_EM12public-yum-el5.repo_3of3.tgz | tar -xzvf -

Great, well that worked first time.  But I need to somehow use these image files.

Easy…  I create a new VM and configure two news disks with the wizard.

Hack the vm.cfg file, point to your new disks – BAM!  problem solved!

disk = ['file:/OVS/Repositories/0004fb00000300005dbf9d7f41f5d4c1/VirtualDisks/0004fb00001200008e5bfc1c7ddc1796.img,xvda,w', 'file:/OVS/Repositories/0004fb00000300005dbf9d7f41f5d4c1/VirtualDisks/0004fb0000120000603bfb1c187d4f74.img,xvdb,w!']

EM12C is working based on the template, great.  All of the installations seemed to work and I’m able to log in.

It’s frustrating that services are not set up properly, nothing for oracle DB, weblogic or anything.  This could / should be done for templates to make them easier to use.

vncserver is not installed on the machine.  wget is not installed on the machine, this is FRUSTRATING!

So, you cannot run wget, but need access to the public yum server, then:

cd /etc/yum.repos.d

vi public-yum-el5.repo

paste the following in:

[el5_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

then

yum list

This will refresh the packages

yum install vnc-server.x86_64 wget.x86_64

No comments:

Extending JDE to generative AI