Shigemi's Posts

Sankar and all, this time I could capture the problem. I modified my program by changing BOOL type to Bool in Vix_GetProperties and performed testing, then the problem, crash at 0x7c94e4df af... See more...
Sankar and all, this time I could capture the problem. I modified my program by changing BOOL type to Bool in Vix_GetProperties and performed testing, then the problem, crash at 0x7c94e4df after issuing VixJob_Wait() following VixHost_OpenVM(), occurred soon. So this time vix log was captured. Trace of my program indicated my program thread was running normally until Mar 10 13:26:20.906. So, I am expecting Vix log may be indicating the trace of the problem after Mar 10 13:26:30.87. And I am guessing the following log messages may be relating to the problem: Mar 10 13:26:36.640: app-6116| SSL: connect failed Mar 10 13:26:36.640: app-6116| SSL_Connect failed when trying to connect to Authd: I'd like to ask you what the log messages mean and if these are relating to the problem. I attached vmware-vix-Administrator-4876.log. Thanks and regards, Shigemi
mattrich, thank you for your suggestion. Regarding keeping a single connection open, my program basically also keep a single connection because it does not issue VixHost_Connect() each tim... See more...
mattrich, thank you for your suggestion. Regarding keeping a single connection open, my program basically also keep a single connection because it does not issue VixHost_Connect() each time if m_hostHandle != VIX_INVALID_HANDLE. Only if any error occurs in some operation such as VixHost_FindItems(), VixHost_OpenVM() and VixJob_Wait, my program issues VixHost_Disconnect() and set m_hostHandle to VIX_INVALID_HANDLE, and next newly issues VixHost_Connect(). Thus my program keeps a sigle connection. Regarding BOOL type of Vix_GetProperties(), I was wrong in use. I will replace BOOL with Bool and test again. Thank you for your advise. And I'd like to test under Vix debug on, but log file is throttled soon. Is size of a log file made large by setting up some parameter in config.ini.? Shigemi
Sankar, I found logs are saved in C:\Documentes and Settings\Administrator\Local Settings\Temp\vmware-Administrator folder. So I tried to reproduce problem, and succeeded to reporduce... See more...
Sankar, I found logs are saved in C:\Documentes and Settings\Administrator\Local Settings\Temp\vmware-Administrator folder. So I tried to reproduce problem, and succeeded to reporduce crush problem at 0x7c94e4df under debug mode 2 times and no return problem at VixJob_Wait API one time. I uploaded the following log files to Forums: 1st crush: around 3/9 15:10:30 vmware-vix-Administrator-3568.log 2nd crush: around 3/9 15:37:06 vmware-vix-Administrator-5896.log no return at VixJob_Wait: around 3/9 16:16:55 vmware-vix-Administrator-4272.log I checked the logs and found "Log Throttled" messages in last 2 logs. Is size of log file expandable in config.ini? If possible, I will try to reproduce the problem again. Thanks, Shigemi
I have encountered two problems at VixJobWait API after issuing VixVM_Open API. My C++ program monitors properties of VMs such as POWER_STATE, VMX_PATHNAME, REPLAYING and RUNNING from remo... See more...
I have encountered two problems at VixJobWait API after issuing VixVM_Open API. My C++ program monitors properties of VMs such as POWER_STATE, VMX_PATHNAME, REPLAYING and RUNNING from remote work station and also sometimes issues VixVM_PowerOn or powerOffVM with VIX_VMPOWEROP_FROM_GUEST option to VM. Problem (I) is that My AP sometimes crushes just after issuing VixJobWait after VixVM_Open API under debug mode. Exception code is 0xC0000008(An Invlaid handle was specified) in vix.dll!7c94e4df(). But this error seems not to occur under release mode. So I think this is avoidable. Problem (II) is that VixJobWait sometimes never return after VixVM_Open API under the both debug and release modes. I replaced VixVM_Open API with VixHost_OpenVM API but the same problem still occurs. The attached program, "Proto_VMware_Vix.cpp" is a simple test program which is simplified from my program in order to reproduce the problem. I repeated "Power On VM" and "Shutdown VM" from vSphere client GUI while the Proto_VMware_Vix was running. Problem (I) did not occur but problem (II) occurred several times. Am I wrong in use of VIX API? Or if you have any advice, please let me know. My test environment: VMware vSphere4 VIX API 1.8.1 Visual stadio 2005
Snkar, thank you for your suggestion. I could successfully link my program with Workstation-7.0/32bit/bix.lib. I will also try VIX the latest VIX 1.10 bata. Shigemi
Hi all, My C++ program was using VIX API 1.7 to access remote machine(ESX 4.0) from Windows PC. Recently I found VIX API 1.8.1 has been released and it is suppoting new function VixHost_O... See more...
Hi all, My C++ program was using VIX API 1.7 to access remote machine(ESX 4.0) from Windows PC. Recently I found VIX API 1.8.1 has been released and it is suppoting new function VixHost_OpenVM API instead of VixVM_Open API. So, I replaced VixVM_Open() to VixHost_OpenVM() and I compiled my program under VIX API 1.8.1 but the following link error occurred. error LNK2019: Undefined symbol VixHostOpenVM. For compile, I'm including Vix.lib of "C:\Program Files\VMware\VMware VIX\VSphere-4.0\32bit" folder. Could anyone advise me? Shigemi,
Thank you for your suggestion. Now I just started to study VI SDK. But I think VI SDK may not be suitable for me because my program is c++ based.
Mattrich, I will study vSphere API, but I'm expecting VIX API will support heartbeat capability in future. Thank your for your reply.
First of all, I wrote my question as document by mistake, so I submit again here. I have a question how a remote program can monitor VM is normally running or not on VMware. My envir... See more...
First of all, I wrote my question as document by mistake, so I submit again here. I have a question how a remote program can monitor VM is normally running or not on VMware. My environment is VMware ESX 4.0 and VIX API 1.7. My C++ program can successfully access VMware from remote workstation, monitor power state of VM, power on or shutdown VM. And I want to monitor VM health state in order to confirm VM is normally running, that is power state of VM is running and also VM is not in hang condition. In case of Hyper-V of Microsoft, VM object, Msvm_ComputerSystem, has HealthState and OperationStatus properties. So it is possible to monitor VM is normally running by periodically monitoring those properties, I think. In case of VMware, VM object has not such a property. So if anyone has an idea to know health state of VM, please let me know. I have an idea to confirm VM health by periodically writing and reading variable to VM as follows, but I don't know this is effective or not. ############################################################################ BOOL writeReadPropertiesToVM(VixHandle vmHandle, BOOL* vmOK) { BOOL status = FALSE; VixError err = VIX_OK; VixHandle jobHandle = VIX_INVALID_HANDLE; char *readValue = NULL; jobHandle = VixVM_WriteVariable(vmHandle, VIX_VM_GUEST_VARIABLE, "myTestVariable", "newValue", 0, // options NULL, // callbackProc NULL); // clientData); err = VixJob_Wait(jobHandle, VIX_PROPERTY_NONE); if (VIX_OK != err) { // Handle the error... const char* errorString = Vix_GetErrorText(err, NULL); printf("VixVM_WriteVariable, status = 0x0%x(%s).\n", err, errorString); goto abort; } printf("VixVM_WriteVariable succeeded.n"); jobHandle = VixVM_ReadVariable(vmHandle, VIX_VM_GUEST_VARIABLE, "myTestVariable", 0, // options NULL, // callbackProc NULL); // clientData); err = VixJob_Wait(jobHandle, VIX_PROPERTY_JOB_RESULT_VM_VARIABLE_STRING, &readValue, VIX_PROPERTY_NONE); if (VIX_OK != err) { // Handle the error... const char* errorString = Vix_GetErrorText(err, NULL); printf("VixVM_ReadVariable, status = 0x0%x(%s).\n", err, errorString); goto abort; } printf("VixVM_ReadVariable succeeded.\n"); *vmOK = TRUE; status = TRUE; abort: Vix_FreeBuffer(readValue); Vix_ReleaseHandle(jobHandle); return status; } Thanks and regards, Shigemi
I have a question how a remote program can monitor VM is normally running or not on VMware. My environment is VMware ESX 4.0 and VIX API 1.7. My C++ program can successfully access VMware... See more...
I have a question how a remote program can monitor VM is normally running or not on VMware. My environment is VMware ESX 4.0 and VIX API 1.7. My C++ program can successfully access VMware from remote workstation, monitor power state of VM, power on or shutdown VM. And I want to monitor VM health state in order to confirm VM is normally running, that is power state of VM is running and also VM is not in hang condition. In case of Hyper-V of Microsoft, VM object, Msvm_ComputerSystem, has HealthState and OperationStatus properties. So it is possible to monitor VM is normally running by periodically monitoring those properties, I think. In case of VMware, VM object has not such a property. So if anyone has an idea to know health state of VM, please let me know. I have an idea to confirm VM health by periodically writing and reading variable to VM as follows, but I don't know this is effective or not. ############################################################################ BOOL writeReadPropertiesToVM(VixHandle vmHandle, BOOL* vmOK) { BOOL status = FALSE; VixError err = VIX_OK; VixHandle jobHandle = VIX_INVALID_HANDLE; char *readValue = NULL; jobHandle = VixVM_WriteVariable(vmHandle, VIX_VM_GUEST_VARIABLE, "myTestVariable", "newValue", 0, // options NULL, // callbackProc NULL); // clientData); err = VixJob_Wait(jobHandle, VIX_PROPERTY_NONE); if (VIX_OK != err) { // Handle the error... const char* errorString = Vix_GetErrorText(err, NULL); printf("VixVM_WriteVariable, status = 0x0%x(%s).\n", err, errorString); goto abort; } printf("VixVM_WriteVariable succeeded.n"); jobHandle = VixVM_ReadVariable(vmHandle, VIX_VM_GUEST_VARIABLE, "myTestVariable", 0, // options NULL, // callbackProc NULL); // clientData); err = VixJob_Wait(jobHandle, VIX_PROPERTY_JOB_RESULT_VM_VARIABLE_STRING, &readValue, VIX_PROPERTY_NONE); if (VIX_OK != err) { // Handle the error... const char* errorString = Vix_GetErrorText(err, NULL); printf("VixVM_ReadVariable, status = 0x0%x(%s).\n", err, errorString); goto abort; } printf("VixVM_ReadVariable succeeded.\n"); *vmOK = TRUE; status = TRUE; abort: Vix_FreeBuffer(readValue); Vix_ReleaseHandle(jobHandle); return status; } Thanks and regards, Shigemi