3 Replies Latest reply on May 3, 2013 9:00 PM by jclaybaugh888

    Error when building a VirtualBox appliance

    salman.kagzi

      I am trying to create a CentOS 6 appliance with my software installed.

       

      I have got the build file done with and am able to build appiance for

      1. KVM
      2. VirtualPC
      3. VMWare
      4. ec2

       

      but for some reason the VirtualBox is not working. I am getting following error when trying to build a VirtualBox appliance.

       

      D, [2012-12-05T10:49:17.298786 #1482] DEBUG -- : Conversion done.

      D, [2012-12-05T10:49:17.303983 #1482] DEBUG -- : VirtualBox image was built.

      F, [2012-12-05T10:49:17.322113 #1482] FATAL -- : NoMethodError: undefined method `empty?' for nil:NilClass

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/platform/virtualbox/virtualbox-plugin.rb:35:in `execute'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/base-plugin.rb:172:in `run'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:184:in `execute_plugin'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:200:in `block in execute_with_userchange'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/util/permissions/user-switcher.rb:27:in `call'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/util/permissions/user-switcher.rb:27:in `change_user'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:199:in `execute_with_userchange'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:127:in `block in execute_plugin_chain'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `each'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `execute_plugin_chain'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:164:in `create'

      /usr/share/gems/gems/boxgrinder-build-0.10.4/bin/boxgrinder-build:203:in `<main>'

       

      I am using following command to build virtual box appliance:

      boxgrinder-build centos6.appl -p virtualbox -d local --delivery-config path:/home/boxgrinder,overwrite:true,package:true

       

      Can somebody let me know what I am doing wrong with this?

        • 1. Re: Error when building a VirtualBox appliance
          salman.kagzi

          Problem mentioned above was seen when using box grinder on fedora 17 on a Virtual Box. This does not seem to be happedning with Meta Appliance EMI.

           

          Is there are dependency that needs to be installed when using Fedora 17 for Box grinder?

          • 2. Re: Error when building a VirtualBox appliance
            msavy

            I'm currently combining forces with another related project ( to merge BoxGrinder's functionality, with the view of providing feature parity and a migration path over. Unfortunately this has left some bugs unresolved.

             

            If you edit the file at the line you quote, and change the code to

                 if is_os_old? or !@appliance_config.post['virtualbox']

             

            Does it resolve the problem?

            • 3. Re: Error when building a VirtualBox appliance
              jclaybaugh888

              Quick note that I believe I am getting the exact same bug

               

              I am using the meta appliance (ami-40058870) which I have upgraded to 10.4 (boots to 10.0)

               

              I am successfully building an appliance in the ec2 format w/ the ebs delivery module

               

              when I try the same appliance configuration in the Virtualbox format with local delivery I get this error:

               

              [root@ip-10-180-64-41 ~]# boxgrinder-build /home/ec2-user/appliances/definitions/sfc_default.appl -p virtualbox -d local

              I, [2013-05-04T00:20:28.128237 #16397]  INFO -- : Validating appliance definition from /home/ec2-user/appliances/definitions/sfc_default.appl file...

              I, [2013-05-04T00:20:28.137466 #16397]  INFO -- : Appliance definition is valid.

              I, [2013-05-04T00:20:28.184961 #16397]  INFO -- : Building 'sfc_default' appliance for x86_64 architecture.

              I, [2013-05-04T00:20:28.185514 #16397]  INFO -- : Deliverables for centos os plugin exists, skipping.

              I, [2013-05-04T00:20:28.188109 #16397]  INFO -- : Converting image to VirtualBox format...

              F, [2013-05-04T00:21:24.575462 #16397] FATAL -- : NoMethodError: undefined method `empty?' for nil:NilClass

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/platform/virtualbox/virtualbox-plugin.rb:35:in `execute'

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/base-plugin.rb:172:in `run'

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:184:in `execute_plugin'

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:207:in `execute_without_userchange'

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:129:in `execute_plugin_chain'

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `each'

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `execute_plugin_chain'

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:164:in `create'

              /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.4/bin/boxgrinder-build:203

              /usr/bin/boxgrinder-build:19:in `load'

              /usr/bin/boxgrinder-build:19

               

              Happy to provide more info as needed.

               

              cheers

              Jonathan