VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Include python in Invoke-VMScript

I would like if Invoke-VMScript could call python scripts directly, without the need to create a wrapper in bash. This would save cycles on the guest VM and this use case would beneficial to anybody that is managing a multitude of Linux VMs.

  • Dave Kalaluhi
  • Sep 5 2017
  • Attach files
  • Luc Dekens commented
    September 6, 2017 20:04

    In fact only Perl support should be sufficient.
    With Perl support one should be able to use the "shebang" for most of the other languages, including python.

    Example
    #!/usr/bin/env python3
    print("Hello World!")
     

  • Dave Kalaluhi commented
    September 7, 2017 02:05

    according to people, bash is the only thing that's supported today

  • William Lam commented
    September 7, 2017 14:53

    Personally, I would make this a bit more open, so we're not locking ourselves in as we don't know what else might be coming in future ... I know I had some challenges w/running GuestOps on Nested ESXi and since it uses 'ash', there were some quirks. 

    IMHO, GuestOps should just do what you would get if you ran the command directly on the OS (thats responsibility of end user to ensure things work before invoking) and this way its true to its function :)

  • Luc Dekens commented
    September 8, 2017 21:54

    While waiting for this feature, you could use a function of mine :-)

  • Luc Dekens commented
    September 14, 2017 11:04

    http://www.lucd.info/2017/09/14/invoke-vmscriptplus/