lib/vagrant-vcenter/action/build_vm.rb in vagrant-vcenter-0.2.0 vs lib/vagrant-vcenter/action/build_vm.rb in vagrant-vcenter-0.2.1

- old
+ new

@@ -110,12 +110,10 @@ switch_port = RbVmomi::VIM.DistributedVirtualSwitchPortConnection( :switchUuid => network.config.distributedVirtualSwitch.uuid, :portgroupKey => network.key) card.backing = RbVmomi::VIM.VirtualEthernetCardDistributedVirtualPortBackingInfo( :port => switch_port) - else - abort "vm network type of #{config.vm_network_type} is unknown" end dev_spec = RbVmomi::VIM.VirtualDeviceConfigSpec(:device => card, :operation => "edit") config_spec.deviceChange = [dev_spec] end @@ -126,12 +124,12 @@ gIPSettings = RbVmomi::VIM.CustomizationGlobalIPSettings( :dnsServerList => config.dns_server_list, :dnsSuffixList => config.dns_suffix_list) prep = RbVmomi::VIM.CustomizationLinuxPrep( - :domain => env[:machine].name, + :domain => env[:machine].name.to_s.sub(/^[^.]+\./,''), :hostName => RbVmomi::VIM.CustomizationFixedName( - :name => env[:machine].name)) + :name => env[:machine].name.to_s.split('.')[0])) adapter = RbVmomi::VIM.CustomizationIPSettings( :gateway => [config.gateway], :ip => RbVmomi::VIM.CustomizationFixedIp( :ipAddress => config.ipaddress),