1

how to install vmware tools on a newly build vm which is not in a domain and doesnot have an IP address assigned.

invoke-vmscript or invoke-command are not working.

  • Hi this seems like a superuser question. Also what error messages are you getting. – Richard Housham Feb 05 '19 at 13:24
  • we building a VM container with New-vm commandlet and then attaching the ISO to VM (get-cddrive and set-cddrive) and building the machine.Now we need to install the vmware-tools. Mount-tools is mounting the vmware tools to vm but we are unable to run the .exe to install, as invoke-vmscript is not working with error message "waiting for vmware tools..." – KARTHIK KUMAR Feb 06 '19 at 07:53

1 Answers1

0

Invoke-VMScript uses VMware Tools to run commands locally on the Guest OS, so that will not work in this scenario.

I'm afraid there won't be much to help you automate the process, but there are some things you can do to limit the amount of time spent on each system. Example: https://docs.vmware.com/en/VMware-Tools/10.1.0/com.vmware.vsphere.vmwaretools.doc/GUID-7E1225DC-9CC6-401A-BE40-D78110F9441C.html

Kyle Ruddy
  • 1,886
  • 1
  • 7
  • 5
  • Thank you. we will try to install tools manually. After this we have to assign a static IP to machine (using invoke-vmscript and netsh commands). Code has to wait until the OS is fully installed and then static IP commands should run, how can we achieve this? – KARTHIK KUMAR Feb 06 '19 at 12:06
  • You'll more than likely want to install the guest OS with the network assigned to DHCP so that the installation can progress to completion. Once complete, install VMware tools then, once complete, you can use Invoke-VMScript to complete the rest of the guest setup. – Kyle Ruddy Feb 06 '19 at 14:53
  • After vmware tools are installed we are running below commands to assign static IP but receiving error as : this requires an interactive window station, please suggest, $VMStaticIP = 'start-process powershell -verb runas | netsh interface ip set address "Ethernet0" static x.x.x.x y.y.y.y z.z.z.z' Invoke-VMScript -ScriptText $VMStaticIP -VM $VM -GuestUser " " -GuestPassword " " – KARTHIK KUMAR Feb 12 '19 at 11:12