Precreated templates

DaveQB

Member
Apr 14, 2009
40
0
6
Sydney, NSW
www.dward.us
Hi,

I love proxmox. I wish I had the bandwidth at home to really use it on the web.

Anyway, how does one use a precreated template?

I have dumped them in the cache folder. They are visible in the web GUI, but when making a new Virtual Appliance, only the templates with names, the Official templates are listed as an option to select as the base for a new VM.

Using Proxmox 1.4

Thanks
 
Every bootup and everyday a
Code:
pveam update
is done to ensure that you get ProxMox hosted and / or certified templates in the application download list.
To ensure that you get the current non ProxMox and / or certified templates appended to the download list, unzip and append the contents of the attached apm-available file to the /var/lib/pve-manager/apl-available file. This must be done everyday or after every boot or the file /usr/share/perl5/PVE/APLInfo.pm needs to be hacked accordingly or a cronjob initiated.
 

Attachments

Hmmm ok, so how does the system marry up the tarball to the stanza in this file?

I have a tarball called:
arch-0.8-x86_64-minimal.tar.gz

I thought it was the package name matches the tarballs name up until the first underscore. Then the version was up until the next underscore, but it appears I am wrong.

What I tried was renaming it to:

arch-minimal_0.8_x86-64.tar.gz

And in the apl file having:

Package: arch-minimal
Version: 0.8
Type: openvz
OS: arch

But it's coming up as unknown.

:(
 
Thanks.

Did that. I added this to the apl-available

Code:
Package: arch-minimal
Version: 0.8
Type: openvz
OS: arch
Section: system
Maintainer edited out
Location: http://download.openvz.org/template/precreated/contrib/arch-0.8-x86_64-minimal.tar.gz
Infopage: http://old.openvz.org/download/template/cache/
ManageUrl: http://__IPADDRESS__/
md5sum: e12e79cc1d0301af13b8f6a927169957
Description: Arch 64bit - A minimal arch 64bit system.
Code:
root@proxmox:~# ll /var/lib/vz/template/cache/arch-minimal_0.8_amd64.tar.gz
-rw-r--r-- 1 root root 97418844 2007-04-02 01:28 /var/lib/vz/template/cache/arch-minimal_0.8_amd64.tar.gz

Still a fail....

I should check through the perl code for the pve script thingy.
 
Even the download location should also have the file name matching the format for the dropdown recognition.

The apl-available should now include:
Code:
Package: arch-minimal
Version: 0.8
Type: openvz
OS: arch
Section: system
Maintainer edited out
Location: http://download.openvz.org/template/precreated/contrib/arch-minimal_0.8_amd64.tar.gz
Infopage: http://old.openvz.org/download/template/cache/
ManageUrl: http://__IPADDRESS__/
md5sum: e12e79cc1d0301af13b8f6a927169957
Description: Arch 64bit - A minimal arch 64bit system.

Of course, you will not be able to download using the link, but the description will show.
 
After trying various combinations, I have found that the following works although the download lin in the start download will not work. Hence I have included the actual link in the description detail.
Code:
Package: arch-0.8-minimal-64bit
Version: 0.8-1
Type: openvz
OS: arch-0.8
Section: system
Maintainer: Precreated OpenVZ <[EMAIL="precreated@openvz.org"]precreated@openvz.org[/EMAIL]>
Location: [URL]http://download.openvz.org/template/precreated/contrib/arch-0.8-minimal-64bit_0.8-1_i386.tar.gz[/URL]
Infopage: [URL]http://download.openvz.org/template/precreated/contrib/[/URL]
md5sum: e12e79cc1d0301af13b8f6a927169957
Description: Arch 0.8 (64bit Minimal)
 Arch Linux 64bit minimal install. The correct download location is 
 <a href="[URL]http://download.openvz.org/template/precreated/contrib/arch-0.8-x86_64-minimal.tar.gz[/URL]">
 [URL="http://download.openvz.org/template/precreated/contrib/arch-0.8-x86_64-minimal.tar.gz%3C/a"]http://download.openvz.org/template/precreated/contrib/arch-0.8-x86_64-minimal.tar.gz</a[/URL]>.
 It is a simple, agile and lightweight GNU/Linux distribution, and UNIX-like operating system.
We had left out a : after Maintainer. It appears that the Infopage must be a valid URL as well. I have attached the new apm-available with the stanza above included.
 

Attachments

Last edited:
Re: Precreated templates - Arch Linux

Thanks apmuthu.

The stanza you posted is not working for me.
I restarted pvemanager and apache2.
I also corrected the URL's as they were truncated in the post.

I had also fixed the Maintainer oversight before as well.
 
Re: Precreated templates - Arch Linux

All I want to do is use the template. I could just unpack it by hand, but then I won't have a conf file for it....not that confident with OpenVZ to hand make my own.
 
Thanks apmuthu

I did use your file, but same result :(
This doesn't make any sense to me.

Code:
root@proxmox:~# tail -15 /var/lib/pve-manager/apl-available

Package: arch-0.8-minimal-64bit
Version: 0.8-1
Type: openvz
OS: arch-0.8
Section: system
Maintainer: Precreated OpenVZ <precreated@openvz.org>
Location: http://download.openvz.org/template/precreated/contrib/arch-0.8-minimal-64bit_0.8-1_i386.tar.gz
Infopage: http://download.openvz.org/template/precreated/contrib/
md5sum: e12e79cc1d0301af13b8f6a927169957
Description: Arch 0.8 (64bit Minimal)
 Arch Linux 64bit minimal install. The correct download
 location is <a href="http://download.openvz.org/template/precreated/contrib/arch-0.8-x86_64-minimal.tar.gz">
 http://download.openvz.org/template/precreated/contrib/arch-0.8-x86_64-minimal.tar.gz</a>.
 It is a simple, agile and lightweight GNU/Linux distribution, and UNIX-like operating system.

Code:
root@proxmox:~# ll /var/lib/vz/template/cache/arch-0.8-minimal-64bit.tar.gz
-rw-r--r-- 1 root root 97418844 2007-04-02 01:28 /var/lib/vz/template/cache/arch-0.8-minimal-64bit.tar.gz

Code:
root@proxmox:~# md5sum /var/lib/vz/template/cache/arch-0.8-minimal-64bit.tar.gz
e12e79cc1d0301af13b8f6a927169957  /var/lib/vz/template/cache/arch-0.8-minimal-64bit.tar.gz


Am I missing something obvious?
I restarted pvedaemon too.
 
Do not use symbolic links - just rename the downloaded template file itself in the cache folder to
arch-0.8-minimal-64bit_0.8-1_i386.tar.gz .

Use the apl-available file attached in this post directly after unzipping it.
Place it in the /var/lib/pve-manager folder overwriting the original.
 

Attachments

Do not use symbolic links - just rename the downloaded template file itself in the cache folder to
arch-0.8-minimal-64bit_0.8-1_i386.tar.gz .


Ahh it was the name that was wrong.
I didn't use any symlinks, just renaming, but I had it as:

arch-0.8-minimal-64bit.tar.gz

This solved it.
Code:
root@proxmox:/vz/template/cache# mv arch-0.8-minimal-64bit.tar.gz  arch-0.8-minimal-64bit_0.8-1_i386.tar.gz

Odd how you can't give it the correct arch in the template name. Must investigate that.

Thanks so much for you help mate!