|
|
|
|
|
|
|
|
Re: Need help creating a template from an ISO [message #35477 is a reply to message #35472] |
Fri, 27 March 2009 14:29 |
sammy08
Messages: 21 Registered: April 2008
|
Junior Member |
|
|
maratrus wrote on Fri, 27 March 2009 07:23 |
As far as I understand you tar was not able to create appropriate tarball. You should find a reason and fix it. Did you use -v option during the creation. Please, look closely at output error messages. They might help to find what's wrong with tar.
|
I followed the wiki to the letter and I tried to tar the system about 5 times. I want to try something else but I don't know if it will work.
On the CD there is a directory containing 453 rpms needed for the system and there are 2 kickstart files, ks.cfg and ks_advanced.cfg. Is there anyway that we can modify the kickstart to tar the system at the end of the install before it actually reboots to complete the installation?
The reason why I am asking the system has loads of services that start on boot and I tried to able the obvious ones before tarring the system but it didn't help.
Thanks for your help.
[Updated on: Fri, 27 March 2009 14:30] Report message to a moderator
|
|
|
|
|
|
Re: Need help creating a template from an ISO [message #36287 is a reply to message #36286] |
Thu, 04 June 2009 15:46 |
sammy08
Messages: 21 Registered: April 2008
|
Junior Member |
|
|
It wasn't that difficult to create the template. I basically followed http://wiki.openvz.org/Creating_a_CentOS_5.0_Template
So you can create a template from an existing server installation that you have. To help you better I have modified step 2 to read as follows:
You need to tar the contents of your existing system.
1. First, create a file called /tmp/exclude and add the following lines to it:
.bash_history
lost+found
/dev/*
/mnt/*
/tmp/*
/proc/*
/sys/*
/usr/src/*
a). Now, tar the system into a single file up by typing: tar –czvf /tmp/centos-5.0-<ARCH>-<SYSTEM>-image.tar.gz –X /tmp/exclude / where <ARCH> represents the system architecture (i386 or x86_64) and <SYSTEM> represents what you what to call your system for example "asterisk-1.4" it is an Asterisk 1.4 PBX system.
b). Now transfer the file over to the OpenVZ server into /vz/template/cache folder.
Then for step 26.
26. Finally, package up the new template by typing tar –czvf /vz/template/cache/centos-5-<ARCH>-<SYSTEM>-AT.tar.gz ./.
for example:
tar –czvf /vz/template/cache/centos-5-3-i386-Asterisk-1.4.25-AT.tar.gz ./.
Would be an Asterisk 1.4.25 Application Template (AT) running on CentOS 5.3-i386 version.
Hope this helps.
regards,
Sammy
[Updated on: Thu, 04 June 2009 15:47] Report message to a moderator
|
|
|
Re: Need help creating a template from an ISO [message #36288 is a reply to message #36287] |
Thu, 04 June 2009 18:31 |
J_Voice
Messages: 5 Registered: June 2009 Location: US
|
Junior Member |
|
|
That is a great starting point, thank you very much!
The next hurdle I know I will have before even continuing is the fact that this Asterisk system has a proprietary 'wrapping' loosely speaking. Basically after installing the OS like an average CentOS install, system restarts , then halts at a prompt wanting a Username and Password that is provided by said company, then using the active internet connection it verifies the credentials then I assume runs some scripts, activates the server for HTTP interface, SIP trunks, etc.
Problem is, IF there is a login to get around this temporarily and get to a normal prompt and execute the commands you've explained, It's definitely not provided.
I suppose one way would be to purchase the license, wait for the credentials, enter them , then package the system. This might be a workaround for testing but become terrible when producing lots of VEs .
|
|
|
Re: Need help creating a template from an ISO [message #36289 is a reply to message #36288] |
Thu, 04 June 2009 18:53 |
sammy08
Messages: 21 Registered: April 2008
|
Junior Member |
|
|
J_Voice wrote on Thu, 04 June 2009 14:31 | That is a great starting point, thank you very much!
The next hurdle I know I will have before even continuing is the fact that this Asterisk system has a proprietary 'wrapping' loosely speaking. Basically after installing the OS like an average CentOS install, system restarts , then halts at a prompt wanting a Username and Password that is provided by said company, then using the active internet connection it verifies the credentials then I assume runs some scripts, activates the server for HTTP interface, SIP trunks, etc.
Problem is, IF there is a login to get around this temporarily and get to a normal prompt and execute the commands you've explained, It's definitely not provided.
|
I am not too sure if I understand what you mean here but you let the system bootup as normal then connect via ssh or login at the console and begin to tar as explain in the previous post.
|
|
|
Re: Need help creating a template from an ISO [message #36399 is a reply to message #36289] |
Mon, 15 June 2009 16:21 |
J_Voice
Messages: 5 Registered: June 2009 Location: US
|
Junior Member |
|
|
Ok I've made small progress, but I finally managed to get behind the script that runs immediately after installation , so I could drop to a normal shell as root.
I run the tar command with the excludes and it looks great for a couple minutes then fails out with the strangest error I've seen yet:
Tar: Error exit delayed from previous errors:
That's it. Then it drops back to shell and i'm left with a 3/4 done tarball. ( I've listed the contents and it def. not all there )
|
|
|