Sha256: 2127658b390062d33a3ec51b442ebb4a9efb9e9e68477d0c14aa396256c41520

Contents?: true

Size: 711 Bytes

Versions: 4

Compression:

Stored size: 711 Bytes

Contents

require 'tempfile'

module Veewee
  module Builder
    module Vmfusion
      module BoxHelper
      # This function 'exports' the box based on the definition
      def export_ova(options)
        debug="--X:logToConsole=true --X:logLevel=\"verbose\""
        debug=""
        flags="--compress=9"

        # Need to check binary first
        if ready?
          shutdown
        end
        
        # before exporting the system needs to be shut down
        
        # otherwise the debug log will show - The specified virtual disk needs repair
        shell_exec("#{fusion_path.shellescape}/ovftool/ovftool.bin #{debug} #{flags} #{vmx_file_path.shellescape} #{name}.ova")
      end
    end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veewee-0.3.0.alpha4 lib/veewee/builder/vmfusion/helper/export_ova.rb
veewee-0.3.0.alpha3 lib/veewee/builder/vmfusion/helper/export_ova.rb
veewee-0.3.0.alpha2 lib/veewee/builder/vmfusion/helper/export_ova.rb
veewee-0.3.0.alpha1 lib/veewee/builder/vmfusion/helper/export_ova.rb