methods/vf_common.rb
# Check VMware Fusion VM doesn't exist
Check VMware Fusion VM doesn't exist
Check VMware Fusion VM doesn ' t exist
def check_fusion_vm_doesnt_exist(options)
  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"
  fusion_disk_file = fusion_vm_dir+"/"+options['name']+".vmdk"
  if File.exist?(fusion_vmx_file)
    handle_output(options,"Information:\t#{options['vmapp']} VM #{options['name']} already exists")
    quit(options)
  end
  return fusion_vm_dir,fusion_vmx_file,fusion_disk_file
end
def check_fusion_vm_doesnt_exist ( options ) 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" fusion_disk_file = fusion_vm_dir + "/" + options [ 'name' ] + ".vmdk" if File . exist? ( fusion_vmx_file ) handle_output ( options , "Information:\t#{options['vmapp']} VM #{options['name']} already exists" ) quit ( options ) end return fusion_vm_dir , fusion_vmx_file , fusion_disk_file end
Check VMware Fusion VM doesn't exist
Check VMware Fusion VM doesn ' t exist
options
<not_specific>