Unable to capture CMD output from VMWare utility

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Unable to capture CMD output from VMWare utility

#16 Post by foxidrive » 10 Feb 2016 09:39

einstein1969 wrote:
C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>
C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>vmware-mount.exe /L >file.txt 2>&1

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>type file.txt

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>


nothing...


I didn't say it was going to solve the problem, I just said the test was flawed, but thanks for your testing.

I haven't got the binary, but does it always provide console output using the /L switch?

einstein1969
Expert
Posts: 947
Joined: 15 Jun 2012 13:16
Location: Italy, Rome

Re: Unable to capture CMD output from VMWare utility

#17 Post by einstein1969 » 10 Feb 2016 09:47

foxidrive wrote:
einstein1969 wrote:
I haven't got the binary, but does it always provide console output using the /L switch?


I don't undenstand what do you mean...

This is the output with the /L switch:

Code: Select all

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>vmware-mount.exe /L
No volumes mounted.

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>


When use /L , the executable output in console. But when add a redirect this stop to output in console and in file/redirect.

I think that use the CON: output... :(

Squashman
Expert
Posts: 4479
Joined: 23 Dec 2011 13:59

Re: Unable to capture CMD output from VMWare utility

#18 Post by Squashman » 10 Feb 2016 10:00

Is it writing anything to the log files?

On Windows the diagnostic log files for each <user> who ran vmware-mount are located here:
%userprofile%\Local Settings\Temp\vmware-<user>-<nnnn>/vmount.log
%userprofile%\Local Settings\Temp\vmware-<user>-<nnnn>/vmount-client.log

Squashman
Expert
Posts: 4479
Joined: 23 Dec 2011 13:59

Re: Unable to capture CMD output from VMWare utility

#19 Post by Squashman » 10 Feb 2016 10:06

einstein1969 wrote:I think that use the CON: output... :(

Not possible. CON cannot be redirected. It is not a file stream. If we are not seeing it when redirecting standard output, something else weird must be going on.

einstein1969
Expert
Posts: 947
Joined: 15 Jun 2012 13:16
Location: Italy, Rome

Re: Unable to capture CMD output from VMWare utility

#20 Post by einstein1969 » 10 Feb 2016 13:03

Squashman wrote:Is it writing anything to the log files?

On Windows the diagnostic log files for each <user> who ran vmware-mount are located here:
%userprofile%\Local Settings\Temp\vmware-<user>-<nnnn>/vmount.log
%userprofile%\Local Settings\Temp\vmware-<user>-<nnnn>/vmount-client.log


I can find this directory on my system (win7 32bit)

Code: Select all

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>echo "%userprofile%\Local Settings\Temp"
"C:\Users\ACER\Local Settings\Temp"

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>dir "%userprofile%\Local Settings\Temp"
Impossibile trovare il file specificato.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Unable to capture CMD output from VMWare utility

#21 Post by foxidrive » 10 Feb 2016 15:10

einstein1969 wrote:
Squashman wrote:Is it writing anything to the log files?

On Windows the diagnostic log files for each <user> who ran vmware-mount are located here:
%userprofile%\Local Settings\Temp\vmware-<user>-<nnnn>/vmount.log
%userprofile%\Local Settings\Temp\vmware-<user>-<nnnn>/vmount-client.log


I can find this directory on my system (win7 32bit)


Is it in this folder?

Code: Select all

echo %temp%

einstein1969
Expert
Posts: 947
Joined: 15 Jun 2012 13:16
Location: Italy, Rome

Re: Unable to capture CMD output from VMWare utility

#22 Post by einstein1969 » 10 Feb 2016 15:49

Yes foxidrive !

Code: Select all

C:\Users\ACER>echo %temp%
C:\Users\ACER\AppData\Local\Temp


this:

Code: Select all

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>vmware-mount.exe /L
No volumes mounted.


produce:

Code: Select all

C:\Users\ACER\AppData\Local\Temp\vmware-ACER-1000>type *.log

vmount-client.log


Feb 10 22:43:47.379: Using system libcrypto, version 90814F
Feb 10 22:43:47.582: No volumes mounted.

Errorcode = 0.


solved! :)

mirrormirror
Posts: 129
Joined: 08 Feb 2016 20:25

Re: Unable to capture CMD output from VMWare utility

#23 Post by mirrormirror » 10 Feb 2016 16:01

are you probed to download a different version (like vsphere virtual disk development kit 5.5.5 or 6.0 or ....) ?

I tried 5.5 earlier but it does not come with the vmware-mount utility so I can't use it. I was unaware there was a v6.0 and was unable to find it - if you have a link I will try it.
If the output is on CON: I think that it is possible (in 32bit machine) use debug.exe to capture the output.

You can use a semi automatic capture with VB sendkey also an other method.

The output is within a CMD console - I am using win7 x64 - would the debug.exe method you mention still work?
Is it writing anything to the log files?

Good thought! - mine gets written to the %temp% folder (foxdrive guessed correct). So it looks like I could get the output from there but parsing through it poses some challenges. Here is some sample log text after running a mount check, mounting a drive, unmounting it, then running another check:

Code: Select all

Feb 10 13:56:36.567: Using system libcrypto, version 90814F
Feb 10 13:56:36.663: No volumes mounted.

Errorcode = 0.
Feb 10 13:56:42.187: Using system libcrypto, version 90814F
Feb 10 13:56:42.283: No volumes mounted.

Errorcode = 0.
Feb 10 13:56:43.280: Using system libcrypto, version 90814F
Feb 10 13:56:43.359: No volumes mounted.

Errorcode = 0.
Feb 10 13:56:43.372: Using system libcrypto, version 90814F
Feb 10 13:56:43.514: SNAPSHOT: IsDiskModifySafe: Scanning directory of file F:\_VM\PC04\PC04.vmdk for vmx files.
Feb 10 13:56:43.514: baseDir = 'F:\_VM\PC04\', vmx file = 'PC04.vmx'
Feb 10 13:56:43.514: SNAPSHOT: AnalyzeSnapshotTree: Search start:      'F:\_VM\PC04\PC04.vmx', baseDiskOnly [ ]
Feb 10 13:56:43.516: Search result:     inTree [X], isCurrent [X], isLegacy [ ], states: 1
Feb 10 13:56:43.516: Search analysis:   disk file found as part of current state.
Feb 10 13:56:43.516: Plugin Pkt details Size 292 PktType 2 DiskFile = F:\_VM\PC04\PC04.vmdk, vol = 0, Desired Drive = 33554432, openFlags = 0
Feb 10 13:56:43.516: Spawing Server process
Feb 10 13:56:44.240: Using system libcrypto, version 90814F
Feb 10 13:56:45.772: Using system libcrypto, version 90814F
Feb 10 13:56:46.880: Using system libcrypto, version 90814F
Feb 10 13:56:50.884: Using system libcrypto, version 90814F
Feb 10 13:56:55.014: Using system libcrypto, version 90814F
Feb 10 13:56:56.101: Using system libcrypto, version 90814F
Feb 10 13:56:56.197: Using system libcrypto, version 90814F
Feb 10 13:56:56.459: Using system libcrypto, version 90814F
Feb 10 13:56:56.535: No volumes mounted.

Errorcode = 0.

Screen output when a drive is mounted looks like this:

Code: Select all

C:\Program Files (x86)\VMware\VMware Virtual Disk Development Kit\bin>vmware-mount.exe /L
Z:\  =>  F:\_VM\PC04\PC04.vmdk

C:\Program Files (x86)\VMware\VMware Virtual Disk Development Kit\bin>

mirrormirror
Posts: 129
Joined: 08 Feb 2016 20:25

Re: Unable to capture CMD output from VMWare utility

#24 Post by mirrormirror » 10 Feb 2016 17:27

I uploaded the mount utility in case anyone else wants to download without creating a vmware account. The file is here:
https://storage-eu.gmx.com/qx/gmx_com_e ... 65@gmx.com
it is a .7z password-protected file - the password is: dostips

mirrormirror
Posts: 129
Joined: 08 Feb 2016 20:25

Re: Unable to capture CMD output from VMWare utility

#25 Post by mirrormirror » 13 Feb 2016 00:07

Just curious if anyone was able to test out this utility and repro my results?

Squashman
Expert
Posts: 4479
Joined: 23 Dec 2011 13:59

Re: Unable to capture CMD output from VMWare utility

#26 Post by Squashman » 13 Feb 2016 09:17

mirrormirror wrote:Just curious if anyone was able to test out this utility and repro my results?

You did not notice that einstein was showing us the output from the command as well.

mirrormirror
Posts: 129
Joined: 08 Feb 2016 20:25

Re: Unable to capture CMD output from VMWare utility

#27 Post by mirrormirror » 13 Feb 2016 18:47

Code: Select all

You did not notice that einstein was showing us the output from the command as well.

I should have said "in addition to einstein..." - I was/am very grateful for his, yours, and everyone's help by the way.
I'm still struggling with the problem though am not 100% sure of all the info that gets dumped into those logfiles (there are two) which makes it difficult to "reliably" parse for the info. I need. I may simply execute a "delete" command for those logfiles before running my vmware-mount command so I start out with a clean logfile each time.

Post Reply