def build_vm
      Dir.chdir(@prefix) do
        @logger.info "Building vm #@name"
        nogui_str = gui? ? "" : "--nogui"

        sh "veewee vbox build '#@vm_name' --force --auto #{nogui_str}", {:on_error => "Unable to build vm #@name"}

        # execute pre-shutdown hook
        pre_shutdown_hook

        @logger.info "Export built VM #@name to #@prefix"
        sh "vagrant basebox export '#@vm_name' --force", {:on_error => "Unable to export VM #@name: vagrant basebox export '#@vm_name'"}
      end

    end
def build_vm
      Dir.chdir(@prefix) do
        @logger.info "Building vm #@name"
        nogui_str = gui? ? "" : "--nogui"

        sh "veewee vbox build '#@vm_name' --force --auto #{nogui_str}", {:on_error => "Unable to build vm #@name"}

        # execute pre-shutdown hook
        pre_shutdown_hook

        @logger.info "Export built VM #@name to #@prefix"
        sh "vagrant basebox export '#@vm_name' --force", {:on_error => "Unable to export VM #@name: vagrant basebox export '#@vm_name'"}
      end

    end
This method creates the vm using the #@name as the virtual machine name
 If an existing VM exists with the same name, it will be deleted.