On Thu, Jan 31, 2013 at 4:22 AM, Charles Moulliard <ch0...@gmail.com> wrote: > I think that I see my mistake now. The script that I have used is not the > good one as it does not allow to add a new Template like we can do using > the Web UI. Is there a shell script which allows to add a new template > which is not a System Template ?
Serve your template within your internal cidr via some web server and upload/register the template. It's the best way. If you want to preseed a template before starting mgmt server, run a sql query to add info about the template and copy the template to /opt/storage/**/tmpl/1/id/ where id is the id usedto set the vm_template row; for ex. how we do it for preseeding tinyLinux for devcloud; UPDATE `cloud`.`vm_template` SET unique_name="tiny Linux",name="tiny Linux",url="http://people.apache.org/~bhaisaab/vms/ttylinux_pv.vhd",checksum="046e134e642e6d344b34648223ba4bc1",display_text="tiny Linux" where id=5; > > > On Thu, Jan 31, 2013 at 10:12 AM, Charles Moulliard <ch0...@gmail.com>wrote: > >> Hi, >> >> After mounting localy a directory pointing to nfs:// >> 192.168.56.10/opt/storage/secondary/ of the VM (s-1-m), I have been able >> to add a new template using this command on the management server >> >> sudo ./cloud-install-sys-tmplt -m >> /home/cmoulp://localhost/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 -h >> xenserver -e vhd -r root -o localhost -F >> --2013-01-31 10:00:23-- >> http://localhost/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2 >> Resolving localhost (localhost)... 127.0.0.1 >> Connecting to localhost (localhost)|127.0.0.1|:80... connected. >> HTTP request sent, awaiting response... 200 OK >> Length: 401690054 (383M) [application/octet-stream] >> Saving to: `./610d0317-f1db-4a6a-82ef-b8a71bb03f4a.vhd' >> >> 100%[============================================================================================================================================>] >> 401,690,054 405M/s in 0.9s >> >> 2013-01-31 10:00:24 (405 MB/s) - >> `./610d0317-f1db-4a6a-82ef-b8a71bb03f4a.vhd' saved [401690054/401690054] >> >> Uncompressing to ./610d0317-f1db-4a6a-82ef-b8a71bb03f4a.vhd.tmp (type >> bz2)...could take a long time >> Moving to >> /home/cmoulliard/Documents/Cloudstack/template/tmpl/1/1///610d0317-f1db-4a6a-82ef-b8a71bb03f4a.vhd...could >> take a while >> Successfully installed system VM template to >> /home/cmoulliard/Documents/Cloudstack/template/tmpl/1/1/ >> >> 2 files have been created under emplate/tmpl/1/1/ (locally) but also on >> the machine s-1-m. >> >> root@devcloud:~# ls -la /opt/storage/secondary/template/tmpl/1/1/ >> total 1668312 >> drwxr-xr-x 2 root root 4096 Jan 30 19:50 . >> drwxr-xr-x 4 root root 4096 Nov 27 19:47 .. >> -rw-r--r-- 1 root root 1708331520 Jan 31 2013 >> 610d0317-f1db-4a6a-82ef-b8a71bb03f4a.vhd >> -rw-r--r-- 1 root root 287 Jan 30 19:50 template.properties >> >> >> Question : Why the new template added does not appear in web ui Console ? >> >> Name Zone Hypervisor Order Quickview >> SystemVM Template (XenServer) DevCloud0 XenServer >> tiny Linux DevCloud0 XenServer >> >> >> Regards >> >> -- >> Charles Moulliard >> Apache Committer / Sr. Enterprise Architect (RedHat) >> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com >> >> > > > -- > Charles Moulliard > Apache Committer / Sr. Enterprise Architect (RedHat) > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com