how to get the result of RunProgramInGuest ?

Jan 30, 2010 at 9:58 AM


I'm using vmwaretask with ironpython, but I can't see how I can have the result of my command from the linux guest


result = virtualMachine.RunProgramInGuest("/bin/ps","-ef")

>>> dir(result)
['Command', 'ExitCode', 'Id', 'IsBeingDebugged', 'KillProcessInGuest', 'Name', 'Owner', 'StartDateTime', '__class__', '__delattr__', '__doc__
', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__
', '__str__', '__subclasshook__']

no attribute that contains result of the command ?


thanks for your help.


Jan 30, 2010 at 4:25 PM

You can't do what's not supported by the VixCOM API, and it doesn't know how to pipe output.

VMWareTasks does, sort of, read

Feb 1, 2010 at 2:59 PM

thanks a lot for your answer,

I'v got another issue , I can't copy file from windows seven host to guest ( vm on esx3.5 host )

>>> virtualMachine.CopyFileFromHostToGuest(r"C:\Users\me.DOM\Documents\vmcopy.txt","/etc/essais")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception: The file name is not valid

on the opposite way it works:


any ideas?




Feb 9, 2010 at 4:03 AM

The shell code that you're running doesn't support a Windows <> *NIX copy. The Tools shell stuff is all Windows, It invokes a bunch of calls that parse the folder assuming it's a windows thing. I can't promise to take a look at this quickly, but I can help you with some code if you get started.