10 Replies Latest reply on Jan 11, 2013 2:23 PM by mshamma

    VMware Studio - Template & Supporting Files for Ubuntu Server 12.04

    gwcurran Lurker

      I have been trying, unsuccessfully, to create a VMware Studio template and supporting files to create a Ubuntu Server 12.04 appliance. Has anyone been able to accomplish this and be willing to share or point me to documents/resources to complete this task?

        • 1. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
          Jogarem Enthusiast

          Hi,

           

          oh yes that is a problem..

           

          First of all the cdrom will be not detected because of a wrong /dev path in the preseed file and even if I fixed that and then be able to install Ubuntu it fails at the grub-installer and even if I handle that manually I get a Kernel panic on next boot.

           

          I will working on it further the next weeks but atm this is really frustrating..

           

          cu
          Thomas

          • 2. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
            gwcurran Lurker

            Have you made any progress? The abilitiy to build appliances based on Ubuntu 12.04 is in the critical path of my current project.

            • 3. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
              Jogarem Enthusiast

              Unfortunately I had stopped investigating that issues further because it seems not to be solved without heavy code changes within studio in order to workaround many problems.

               

              Because of some other problems with the latest Ubuntu release I starting to investigate a Debian Squeeze build instead.. Well there are other problems with studio and Debian 6 than they are with Ubuntu 12.04 but at the moment I believe I will have more success with Debian. :-/

               

              I may will investigate the Ubuntu part later on but at the moment I'm not sure when or even if.

              • 4. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
                mshamma Novice

                Any updates on your attempts to build a debian squeeze appliance using VMware Studio?

                • 5. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
                  Jogarem Enthusiast

                  mshamma wrote:

                   

                  Any updates on your attempts to build a debian squeeze appliance using VMware Studio?

                   

                  Nothing was working as expected , e.g. I ran into kernel panics etc and other frustrating issues. I won't have the time to investigate that further so you need help from VMware or others community members ..

                   

                  Regards

                  Thomas

                  • 6. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
                    mshamma Novice

                    News: I have been able to provision an Ubuntu 'precise' appliance using vmware studio 2.6!

                     

                    Here are highlights of what I did to accomplish the task:

                     

                    1- Create a new appliance template using the --newos option in the studiocli command. After that I followed the steps in the documentation to customize the basic options/parameters in the new template.

                    2- Fix an incorrect CD-ROM device file reference in the preseed section of the new template scripts. After this fix I can provision a 'precise' appliance using VMware Studio, but it won't run the 'vami_login' binary correctly. In other words, you won't get the standard VMware appliance blue login screen. More generally, the problem is that most of vmware management binaries and libraries do not run properly. To resolve this issue, you need carry out the next step.

                    3- Create symlinks to make the library (shared objects) paths in 'precise' backward compatible with these in 'lucid'. More concretely the symlinks are: /lib64 -> /lib/x86_64-linux-gnu AND /usr/lib64 -> /usr/lib/x86_64-linux-gnu. The vmware management tools binaries seem to make an assumption as to what the system libraries paths are (combination of rpath in elf headers and explicit dlopen() calls). These paths have changed moving from 'lucid' to the 'precise'. To work around this issue, one needs to create symlinks that point to the new locations (as in 'precise') in the same location of the old paths (as in 'lucid').

                     

                    P.S. This is a quick write-up of what it took me to accomplish the task. I am happy to clear up any thing that isn't described clearly.

                     

                    Cheers,

                    • 7. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
                      Jtham Lurker

                      Hi, did you use studiocli with options similar to those below?

                       

                      studiocli -n --osdesc "Ubuntu 12.04.1 LTS" -p /opt/vmware/etc/build/templates/ubuntu/10/041/build_profile.xml

                       

                      The template files created are based on Ubuntu 10.04.1 and they are not working for me.  Can you detail the changes you made? Or share the files in /opt/vmware/etc/build/templates/Ubuntu12.04.1LTS/ ?

                       

                      This is the part in the debug log where it fails

                       

                      06/11/2012 12:48:23 [dbug] -------------------- agent installation log --------------------
                      06/11/2012 12:48:23 [dbug] mount: mounting /dev/scd0 on /target//root/cdrom failed: No such file or directory
                      06/11/2012 12:48:23 [dbug] mount: mounting /dev/hda on /target//root/cdrom failed: No such file or directory
                      06/11/2012 12:48:23 [dbug] dpkg: error processing /root/cdrom/vmware-studio-provagent_*.deb (--install):
                      06/11/2012 12:48:23 [dbug]  cannot access archive: No such file or directory
                      06/11/2012 12:48:23 [dbug] Errors were encountered while processing:
                      06/11/2012 12:48:23 [dbug]  /root/cdrom/vmware-studio-provagent_*.deb
                      06/11/2012 12:48:23 [dbug] STUDIO ABORT: Failed to install agent

                       

                       

                      Thanks in advance.

                      • 8. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
                        Jtham Lurker

                        Found where the blooper is:

                         

                        Around line 462 of /opt/vmware/etc/build/templates/Ubuntu12.04.1LTS/Ubuntu12.04.1LTS.xsl, changed scd0 to sr0

                         

                            462     if ! mount -t iso9660 -r /dev/scd0 /target/${cdrom_dir} ; then \
                            463         if ! mount -t iso9660 -r /dev/hda /target/${cdrom_dir} ; then \
                            464             cdrom_mounted=0; \
                            465         fi ; \

                         

                        and the process completed.

                        • 9. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
                          data101 Novice

                          Hi mshamma, I've followed your instructions and I've managed to create a new template that works... more or less.

                          I wanted to know how you added the soft link for the VAMI tools to work. Did you add a command on the postinst scripts?

                           

                          I've also come across something I can't find an answer for anywhere. The resulting OVA ends up having "Unsupported VM Tools".

                          Do you know how I can add the correct tools for Ubuntu 12.04 to Studio 2.6?

                           

                          Thanks!

                          • 10. Re: VMware Studio - Template & Supporting Files for Ubuntu Server 12.04
                            mshamma Novice

                            I wrote a small c-program that sets up the proper library symlinks. You can't script that part using "mv" and "ln -s", because once you move the library folder, most binary executions (including "ln") will fail because it won't be able to find the path to some shared libraries.

                             

                            I could not solve the vmware-tools issue. Let me know if you can.

                             

                            Thanks,