methods/vf_common.rb
# Add share to VMware Fusion VM
Add share to VMware Fusion VM
Add share to VMware Fusion VM
def add_shared_folder_to_fusion_vm(options)
  vm_list = get_running_fusion_vms(options)
  if vm_list.to_s.match(/#{options['name']}/)
    if options['host-os-name'].to_s.match(/Linux/)
      fusion_vm_dir = options['fusiondir']+"/"+options['name']
    else
      fusion_vm_dir = options['fusiondir']+"/"+options['name']+".vmwarevm"
    end
    fusion_vmx_file = fusion_vm_dir+"/"+options['name']+".vmx"
    message = "Stopping:\tVirtual Box VM "+options['name']
    command = "'#{options['vmrun']}' -T fusion addSharedFolder '#{fusion_vmx_file}' #{options['mount']} #{options['share']}"
    execute_command(options,message,command)
  else
    if options['verbose'] == true
      handle_output(options,"Information:\t#{options['vmapp']} VM #{options['name']} not running")
    end
  end
  return
end
def add_shared_folder_to_fusion_vm ( options ) vm_list = get_running_fusion_vms ( options ) if vm_list . to_s . match ( / #{ options [ 'name' ] } / ) if options [ 'host-os-name' ] . to_s . match ( / Linux / ) fusion_vm_dir = options [ 'fusiondir' ] + "/" + options [ 'name' ] else fusion_vm_dir = options [ 'fusiondir' ] + "/" + options [ 'name' ] + ".vmwarevm" end fusion_vmx_file = fusion_vm_dir + "/" + options [ 'name' ] + ".vmx" message = "Stopping:\tVirtual Box VM " + options [ 'name' ] command = "'#{options['vmrun']}' -T fusion addSharedFolder '#{fusion_vmx_file}' #{options['mount']} #{options['share']}" execute_command ( options , message , command ) else if options [ 'verbose' ] == true handle_output ( options , "Information:\t#{options['vmapp']} VM #{options['name']} not running" ) end end return end
Add share to VMware Fusion VM
Add share to VMware Fusion VM
options
<not_specific>