Script to install vmtools

Hi, I had a script to install vmtools reviews. It works quite well on Windows prompt but I got this message on my linux guest:

Tools Update: 17/04/2009-1:22:14 PM-tools update E9451E4B - D62B - 4 c 82-8896.

0A7A56017B9D operation 'Update VMware Tools' failed for VM 'vm_test' for

the following reason: VMWare Tools can be updated automatically only for Windo

WS BONE. For other OS manual intervention types will be necessary.

C:\Script\VM_Install_VMTools.ps1:7 tank: 108

+ % {If ($_.config.tools.toolsVersion - eq 0 - or $_.config.tools.toolsVersion-l)}

(t $ToolsCurrent) {update-Tools < < < <-VM $vm}}

The VMtools manage updated on linux hosts, and after that I reload the linux prompt, the vmtools show OK.

Just a warning message above, we can't ignore/not see the place. If I have several comments of linux, this stop the script and not continue with the other comments?

Here is my script:

$esxName = Read-Host "enter the ESX host name."

$ToolsCurrent = Read-Host "which is the Version VMTools?"

foreach ($vm to $esxName)

{

Get - VM | %{$vm = $_; {Get-view $_.ID} | `

% {If ($_.config.tools.toolsVersion - eq 0 - or $_.config.tools.toolsVersion - lt $ToolsCurrent) {update-tools - VM $vm}}

}

Thank you.

FYI; You're not the only first to see this behavior, see the last message of Re: fail of the tools update.

It is unfortunately was not any comment yet.

In the thread How to install VMware tools without a reboot? the installation of VMware tools on * nix systems was mentioned several times but no definitive answer.

Tags: VMware

Similar Questions

  • Try to mark all the VMS in vCenter to 'upgradeAtPowerCycle' to install VMTools

    Page 258 - Yes reference Hal Rottenberg book I bought it, no, I have not read all of this

    Try to mark all the VMS in vCenter to 'upgradeAtPowerCycle' to install VMTools

    Errors and details below. All points will be awarded. Thank you.

    PowerCLI C:\ > $spec = new-object vmware.vim.virtualmachineconfigspec
    PowerCLI C:\ > $spec. Tools = new-object vmware.vim.toolsconfiginfo
    PowerCLI C:\ > $spec. Tools.ToolsUpgradePolicy = "upgradeAtPowerCycle".
    PowerCLI C:\ > $vmview = get - vm | % {(get-vue $_).} MoRef}
    PowerCLI C:\ > $vmview. ReconfigVM ($spec)
    The method call failed because [System.Object []] does not contain a nam method
    ED 'ReconfigVM '.
    On line: 1 char: 19
    + $vmview. ReconfigVM < < < < ($spec)
    + CategoryInfo: InvalidOperation: (ReconfigVM:String)], Runtim
    eException
    + FullyQualifiedErrorId: MethodNotFound

    PowerCLI C:\ > $spec


    ChangeVersion:
    Name                         :
    Version:
    Uuid                         :
    InstanceUuid:
    NpivNodeWorldWideName:
    NpivPortWorldWideName:
    NpivWorldWideNameType:
    NpivDesiredNodeWwns:
    NpivDesiredPortWwns:
    NpivTemporaryDisabled:
    NpivOnNonRdmDisks:
    NpivWorldWideNameOp:
    LocationId:
    ID:
    AlternateGuestName:
    Annotation:
    Files                        :
    Tools: VMware.Vim.ToolsConfigInfo
    Flags                        :
    ConsolePreferences:
    PowerOpInfo:
    NumCPUs:
    NumCoresPerSocket:
    MemoryMB:
    MemoryHotAddEnabled:
    CpuHotAddEnabled:
    CpuHotRemoveEnabled:
    VirtualICH7MPresent:
    VirtualSMCPresent:
    DeviceChange:
    CpuAllocation:
    MemoryAllocation:
    CpuAffinity:
    MemoryAffinity:
    NetworkShaper:
    CpuFeatureMask:
    ExtraConfig:
    SwapPlacement:
    BootOptions:
    VAppConfig:
    FtInfo                       :
    VAppConfigRemoved:
    VAssertsEnabled:
    ChangeTrackingEnabled:
    Firmware:
    MaxMksConnections:
    GuestAutoLockEnabled:
    ManagedBy:
    MemoryReservationLockedToMax:
    DynamicType:
    DynamicProperty:

    PowerCLI C:\ > $spec. Tools


    ToolsVersion:
    AfterPowerOn:
    AfterResume:
    BeforeGuestStandby:
    BeforeGuestShutdown:
    BeforeGuestReboot:
    ToolsUpgradePolicy: upgradeAtPowerCycle
    PendingCustomization:
    SyncTimeWithHost:
    LastInstallInfo:
    DynamicType:
    DynamicProperty:

    PowerCLI C:\ > $vmview

    Type                                    Value
    ----                                    -----
    VirtualMachine vm-1419
    VirtualMachine vm-1481
    VirtualMachine vm-1134
    VirtualMachine vm-1098
    VirtualMachine vm-1099
    VirtualMachine vm-1097
    VirtualMachine vm-1094
    VirtualMachine vm-1182
    VirtualMachine vm-1432
    VirtualMachine vm-974
    VirtualMachine vm-976
    VirtualMachine vm-975

    etc etc etc.

    Your $vmview variable contains an array of objects VirtualMachine, not a single object VirtualMachine.

    And the ReconfigVM method is called on a VirtualMachine object, not on a table.

    What you can do

    $spec = new-object vmware.vim.virtualmachineconfigspec $spec.Tools = new-object vmware.vim.toolsconfiginfo $spec.Tools.ToolsUpgradePolicy = 'upgradeAtPowerCycle'
    get-vm | % {
        $_.Extensiondata.ReconfigVM($spec)
    }
    

    The appeal for each VM of separately in a foreach loop.

    The VirtualMachine object is available through the Extensiondata property. So, you can call the ReconfigVM method on this property.

  • Update/install VMTools

    Hello

    Whenever I have update/install VMTools VM restarts automatically. Is it possible to program the VMTools to install out-of-hours or even better to install the tools and keep it from restarting automatically?

    Thank you guys.

    If you use the interactive update shows the client's Office. Facilities invites you to the end if you want to stop automatic reboot.

    AWo

    VCP 3 & 4

    \[:o]===\[o:]

    = You want to have this ad as a ringtone on your mobile phone? =

    = Send 'Assignment' to 911 for only $999999,99! =

  • Install VMtools to VM with 2000 server

    Hello all,.

    I had the task of P2V-ing a server Win2000 Server installed and everything seemed to go OK.  The question I have is to install VMtools.  When I run the installation it stops with error "Error 1327. Invalid drive: U:\ "and the only option I have at this time there is to click OK.  There is no U drive on that server.  Because it is located this server isn't Serge on the field.   I can't get the tools are installed.   Any ideas?  All comments welcome... even if it is Win2000!

    in the windows.iso file - if you click on "install vmware tools" it's connected to your virtual machine

    ___________________________________

    VMX-settings- WS FAQ -[MOAcd | http://sanbarrow.com/moa241.html]- VMDK-manual

  • How to install VMtools on Manjaro (ArchLinux)

    Hi all

    My host is Windows 7 ultimate 64 bit

    My WS is 9.0.2 build 1031769

    My guest is Manjaro 64 bit (a derivative of ArchLinux) installed with the other Linux 2.6.x kernel option since there is no entry for ArchLinux nor Manjaro.

    When I try to install the VMware tools, I have the "VMware Tools - 9.2.3 - 103160.tar.gz" file

    Then, after unpacking the .tar file ' / vmware-tools-distrib "when I run ' sudo vmware - install.pl ', the second question is: what is the directory that contains the directories init (rc0.d / to rc6.d /)?

    Whatever the answer I can give to rc0.d / to rc6.d /, nothing works, and the script cannot continue with a return empty.

    So, what is the directory to specify?

    What is "/ etc/rc.d ' is the only directory that is named like that?

    Thanks in advance for your time and your help.

    Kind regards.

    DUMBY.

    Hi WoodyZ,

    I spent some time to find the solution and it's here.

    I wrote a bash script that installs VMware Tools on a client running a compatible distribution like ArchLinux himself or Bridge or Manjaro ArchLinux.

    However, if this script allows the video driver vmware, Cup and passed, drag-n - déposer and lets stop the comments whithout was obliged to hit [Ctrl] [Alt], this script does not activate the shared folders.

    I tested your script vmtoolspatch on the 3 distributions (ArchLinux, bridge and Manjaro) but this does not solve the problem.

    Please news find my script named: vmtools-4-bow-and - co.sh who is in the compressed file vmtools-4-bow-and - co.tar.bz2.

    Get it: wget http://www.as2.com/linux/tools/vmtools-4-arch-and-co.tar.bz2

    Extract it with: tar xjf - vmtools-4-bow-and - co.tar.bz2

    Use with: sudo./vmtools-4-arch-and-co.sh

    Hope this helps other Archiers.

    In any case, thanks for your help.

    See you soon.

  • I need help for an asp script, I installed

    I installed a user name & password using an asp script for one of my Web page and when I put the right username and password, it uses the domain name, then the file is correct, however it puts the name of the file to the address once again. Someone has an idea? I have accumulated my brain

    Hi Bufordhurley,

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums for further assistance:

    http://social.msdn.Microsoft.com/forums/en/categories/

  • You need to install VMtools on a server what is the quickiest update.

    I want to know the fastest way to update VMtools on a server and it does not rely on another program or you can just have installed only VMtools?

    My question is if it was never uploaded, and I didn't have the cd to do how would I had to install.

    Well. The vmtools are embadded in verse the esxi host. Whenever you click on the guest virtual machine > install/upgrade vmware tools. sound automatically mount the iso vmtools in on the cdrom. you need not worry about downloading it.

    Also if I have an ESX Server that contains a virtual server of 2012 running on it and I need to install a program from a cd on this server 2012 how it work if I remote access in the area of ESX via vsphere on a remote computer.

    As a best practice create us a separate data store and add it to a esxi host. Data store keeps all the iso required and media contains thereon. So every time we need something to deploy we just deploy and manage virtual machines by using the media of this path of the data store.

    Hope that it eliminated a lot of doubts.

  • Is there a Script to install VMware tools on any event of power off?

    Hi all

    Currently, we have an infrastructure VM 1000 + reversed between 2 data centers and are moving from 5.1 to 5.5 ESXi.

    We want to make sure on the new architecture of 5.5 is that any virtual computer that VMware tools installed - it installs on any event powercycle.

    Y at - it a script of mass that we could run for linux servers and windows can this factor?

    At the moment we have 700 VMs have the tools installed and up-to-date

    100 or more, who have installed and are not updated

    200 + remaining machines do not have the tools installed, and we want to automate to install the tools on any event of power cycle.

    For the 100 who are not up-to-date

    We followed the following tasks and confirmed that it works

    VSphere Documentation Centre

    If a virtual machine with obsolete tools will automatically update on a power cycle

    But the 200 who need complete installation tools stop - we need help to get a script to work / if there is one that can do this

    We can use the following to update the tools to the power cycle

    1

    2

    3

    4

    5

    6

    7

    8

    $vm= Get-VM-Name"virtualmachine"

    $spec= New-ObjectVMware.Vim.VirtualMachineConfigSpec

    $spec.changeVersion = $vm.ExtensionData.Config.ChangeVersion

    $spec.tools = New-ObjectVMware.Vim.ToolsConfigInfo

    $spec.tools.toolsUpgradePolicy = "upgradeAtPowerCycle"

    $_this = Get-View-Id$vm.Id

    $_this.ReconfigVM_Task($spec)

    But we want something that can install the tools if not installed on the Cycle of power rather than update / update...

    Hope that makes sense and that theres a script that we can use to do this.

    Thank you all

    The 1st real time installation of the VMware Tools is AFAIK not possible with a PowerCLI cmdlet.

    You will need to use a method of SW distribution, that you will use to install any SW on your workstations.

    In your case, you will need to support Win and Linux machines virtual, so you will need to provide at least 2 procedures to perform the actual installation.

    Some additional info can be found in  Re: how to use PowerCLI install VMware Tools?

  • Installed VmTools?

    Is it possible to determine if VMTools is installed on a Windows guest operating system without actually going into the Console?

    Can I use VC to determine?

    TIA

    sure... There is an option on the toolbar.  When you're level hosts & Clusters, go to the computers tab virtual, do a right-click on the toolbar and put a check mark next to "VMware Tools Status.

  • obtaining ip address with installed vmtools

    Hi all

    I am able to get the IP address of all windows powered vm to using the property "gues.ipaddress".

    can I get the IP address of all the linux with the vmtools vm installed? I mean any dns record required or with vmtools can not I get the IP address?

    Thanks in advance

    Once you have the VMware tool installed, you should be able to get without DNS.

    Steve JIN, VMware engineering

    Creator of VI Java API: http://vijava.sf.net

  • On my web site, the Adobe flash player, replaced by a white box "need to install adobe flash player and Java script" both installed. My fine web site using Internet Explorer and Chrome.

    I've updated to Firefox ver 5.

    Gordon

    Hello Gordon,.
    It seems that you have only installed Flash Player in Internet Explorer but not in Firefox. This is why the Adobe site now offers to allow you to download FlashPlayer * here * to install on Firefox, you should now do, you use the Firefox browser.

  • Script to install HostAgent UnixAgent IC

    All,

    We are moving from legacy for the new arrivals to our environments of. If I update the Linux_System to the UnixAgent agent. We are in this case using local fglams for several reasons.

    I am able to deploy the cartridge and create the agent but how to fill the FSA to monitor the host under the credentials of the fglam running on the spot as you can from the wizard?

    Cartridge #Deploys IC

    /NFS/UTL/Foglight/install/client/fglcmd.sh - srv myfms.corp.dev - usr - pwd foglight cmd - foglight agent: deploy - host - IDPack myserver.corp.dev "Host.*" - regex

    #Deploy UnixAgent

    /NFS/UTL/Foglight/install/client/fglcmd.sh - srv myfms.corp.dev - usr - pwd foglight cmd - foglight agent: create - host myserver.stubcorp.dev - type UnixAgent-appoint--nowait

    Hello, DPW,.

    We have a few exmaples with simple transfer in the files and return to. Unfortunately without XML entry as far as I know.

    Just search for ASP. This should at least give you a few examples.

    Here are a few good examples:

    http://en.community.Dell.com/TechCenter/performance-monitoring/Foglight-administrators/f/4788/t/19554329

    http://en.community.Dell.com/TechCenter/performance-monitoring/Foglight-administrators/w/Admins-wiki/5694.using-the-configservice-API-to-Setup-agent-properties-ASPs

    http://en.community.Dell.com/TechCenter/performance-monitoring/Foglight-administrators/f/4788/t/19554963

    Kind regards

    Jan

    PS. For more information, please contact Quest on PSO

  • How to install VMTools in cloud base VM?

    I installed a Windows 2003 R2 VM inside my vCloud test harness.   I can log in and access it via the VMware Remote Console.   I can't find where to install VMware Tools in the virtual machine?

    Thank you

    -MattG

    The option to start a tools installation are in the popup context menu when you right click on a virtual machine that runs inside your VAPP.

    Note: In case of VAPP diagram view, select the first virtual machine to get the context menu of the VMs, otherwise you get context menu of vApp

  • Create a command-line script VM install

    I was looking for a way to the creation of vm of the script command line.  Our environment is mostly RedHat 5.4 and esx 4.0.  We wanted to be able to spin off the virtual machine from the command line, and then deploy the operating system with kickstart.  I came across the following script, but still get this error when I try to run it:

    vmodl.fault.InvalidArgument: a specific parameter was not correct.

    Is it still possible to do so or if orders have been deprecated?  Thanks in advance for any help that anyone can provide.  Also, if I placed this question in the wrong place please advise and I will pass it to the appropriate place.

            1. VM creation script #.

    #Script version 1.1

    #Author David E. Hart

    #Date 10-05-06

    #

    #--------+

    1. Goal |

    #------+---------------------------------------------------

    1. This script will create a virtual machine with the following attributes:

    2. Virtual Machine Name = ScriptedVM

    3. Location of the Virtual Machine/VMFS/volumes/storage1/ScriptedVM =

    4. Virtual machine Type = 'Microsoft Windows 2003 Standard '.

    5. Virtual memory allocation Machine = 256 meg

    #

    #----------------------------------------+

    #Custom variable section for editing.

    #--------------------------------------+-------------------

    #NVM is the virtual machine (NVM) name. No spaces allowed in the name

    #NVMDIR is the directory that contains all the files of the virtual machine

    #NVMOS specifies the VM operating system

    #NVMSIZE is the size of the virtual disk to create

    #--------------------------------------------------------------

    ###############################################################

        1. Variable parameters by default - change that to your preferences

    NVM = "ScriptedVM" # name of Virtual Machine

    NVMDIR = "ScriptedVM" # specify only the name of the folder must be created; NOT the

    full path

    NVMOS = "winnetstandard" # Type of operating system for the Virtual Machine

    NVMSIZE = '4g' # Virtual Machine disk size

    VMMEMSIZE = default memory size # "256".

        1. End Variable Declaration

    mkdir/vmfs/volumes/storage1 / $ directory to create NVMDIR #.

    exec 6 > & 1 # Sets up writing to file

    Exec 1 > open the file # /vmfs/volumes/storage1/$NVMDIR/$NVM.vmx

    1. write configuration

    config.version = "" "6" "" ECHO # for ESX 3.x, the value is 8

    virtualHW.version = "" "3" "" ECHO # for ESX 3.x, the value is 4

    echo memsize = "" «$VMMEMSIZE»»»

    echo floppy0.present = "" ' TRUE' "' # VM installation with diskette

    echo displayName = "" "$NVM" "" # name of virtual machine

    echo guestOS = "" «$NVMOS»»»

    ECHO

    echo ide0:0.present = "" «TRUE»»»

    echo ide0:0.deviceType = "" "cdrom-raw»»"

    echo ide: 0.startConnected = "" "false" "" # CDROM active

    echo floppy0.startConnected = "" «FALSE»»»

    echo floppy0.fileName = "" ' / dev/fd0»»»

    echo Ethernet0.present = "" «TRUE»»»

    Ethernet0.networkName = "" "VM" "" echo # default network

    echo Ethernet0.addressType = "" «vpx»»»

    ECHO

    echo scsi0.present = "" «true»»»

    echo scsi0.sharedBus = "" «none»»»

    echo scsi0.virtualDev = "" «free»»»

    echo scsi0:0.present = "" ' true' "' # virtual disk parameters

    echo scsi0:0.fileName = "" "$NVM.vmdk»»»

    echo scsi0:0.deviceType = "" 'scsi-hard drive»»'

    ECHO

    1. Close the file

    Exec 1 > & -.

    1. stdout of the make a copy of FD 6 (reset stdout) and close fd6

    Exec 1 > & 6

    exec 6 > & -.

    1. Change the permissions on the file so it can be run by anyone

    chmod 755 /vmfs/volumes/storage1/$NVMDIR/$NVM.vmx

    #Creates 4 GB virtual disk

    CD/vmfs/volumes/storage1 / $ NVMDIR #change for the directory of the virtual machine

    vmkfstools - c $NVMSIZE $NVM.vmdk - a free

    #Register VM

    VMware-cmd - s register /vmfs/volumes/storage1/$NVMDIR/$NVM.vmx

    >

    In the attachment, you can find a version renewed your script (create - vm.sh), you must set the following variables for your environment:

    NVM="ScriptedVM" # Name of Virtual Machine
    NVMDIR="ScriptedVM" # Specify only the folder name to be created; NOT the
    complete path
    NVMOS="winnetstandard" # Type of OS for Virtual Machine
    NVMSIZE="4g" # Size of Virtual Machine Disk
    VMMEMSIZE="256" # Default Memory Size
    STORAGEDIR="/vmfs/volumes/datastore1"
    

    This script worked in my environment ESX4, but the resulting virtual machine has hardware version 4 (by default for ESX4 7)

    If you have found this or other useful information, please consider awarding points to 'Correct' or 'useful '.

  • By script tool install abandoned or forgotten in ESX 4 generator?

    I know that, in version BETA RC of ESX 4, generation tool of numerical facility you would find by allowing a tomcat configuration was not available. He said that this should be available on the version of ESX 4 GA and I have not found any mention/mention in the documents.

    In previous versions of ESX, you would change the following file:

    /usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/struts-config.xml
    

    comment on the scriptedinstaller module and restart the webAccess service.

    By the RC release, I noticed the structure was not similar and that the struts - config.xml existed under the standard repertoire is no longer but that it found another file that seems as he controlled webAccess page and which can be seen at: /usr/lib/vmware/hostd/docroot/index.html

    When you open a file, you will notice the following line:

         <!-- XXX: Bug 270062
    
          <h4><script type="text/javascript">document.write(ID_ESXServerSI);</script></h4>
    
          <p><script type="text/javascript">document.write(ID_ESXServerSIDesc);</script></p>
    
          <ul>
             <li><script type="text/javascript">document.write('<a href="/ui/scriptedInstall.do">'+ ID_LogInSI +'</a>');</script></li>
          </ul>
          -->
    

    This has existed in the RC BETA and still does in the GA release and uncomment comments and restarting the webAccess service, you will get a link for the scripted Installer but modules aren't always load.

    Someone at - he managed to get this working or has been deleted or forgotten?

    FYI - I know that you can take a look at KS.cfg previous and a part of the documentation provided in the installation guide to create a new kickstart for ESX 4, but the question is about the generation tool and if it's been deleted.

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    repository scripts vGhetto

    VMware Code Central - Scripts/code samples for developers and administrators

    http://Twitter.com/lamw

    http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

    If you find this information useful, please give points to "correct" or "useful".

    Sorry again - btw, I found this in the release notes at

    http://www.VMware.com/support/vSphere4/doc/vsp_esx40_vc40_rel_notes.html

    as I wanted it too this feature...?  :|

    • VMware Web Access kickstart script Builder is not supported
       
      For installation ESX scripted, the generator script VMware Web Access is not available in vSphere 4.0.
       
       
      Solution: You can use the startup script that is automatically generated
      After an interactive installation. After the first interactive
      ESX installation, the installer creates an * /root/ks.cfg * script in the ESX filesystem. This text reflects the choices you make
      in the interactive installation. For a complete list of supported


    commands and a sample script, see the ESX and vCenter Server Installation Guide.

Maybe you are looking for