VMware {code} Community
strnbrg
Contributor
Contributor

Getting started with VIX and WS6.5.1

The powerOn.c example program isn't working for me. First of all, in powerOn.c, HOST is #defined as the empty string. I tried setting it to "127.0.0.1", to $HOSTNAME (with and without my domain name). No dice. Here's what the log file (/tmp/vix-21334.log) says:

Jun 01 09:35:52.459: app| Log for Vix pid=21334 version=-1 build=build-126130 option=Release

Jun 01 09:35:52.459: app| Host codepage=UTF-8 encoding=UTF-8

Jun 01 09:35:52.459: app| Foundry Init: setting up global state (0 threads)

Jun 01 09:35:52.461: app| Vix_InitializeGlobalState: Use Preference. vixLogLevel = 0

Jun 01 09:35:52.461: app| Vix_InitializeGlobalState: vixDebugPanicOnVixAssert = 0

Jun 01 09:35:52.461: app| Vix_InitializeGlobalState: vixLogRefcountOnFinalRelease = 0

Jun 01 09:35:52.773: app| UUID: SMBIOS UUID is reported as '80 cc e4 58 b4 77 12 10-b6 c3 af 51 2d 50 23 97'.

Jun 01 09:35:52.791: app| HostDeviceInfoFindHostIDECDROMs: /proc/ide could not be explored. Unable to enumerate host IDE cdroms.

Jun 01 09:35:52.849: app| HOSTINFO: Seeing AMD CPU, numCoresPerCPU 2 numThreadsPerCore 1.

Jun 01 09:35:52.850: app| HOSTINFO: This machine has 1 physical CPUS, 2 total cores, and 2 logical CPUs.

Jun 01 09:35:53.063: app| VixHost_ConnectEx: version -1, hostType 3, hostName trhj.homeunix.net, hostPort 0, options 0

Jun 01 09:35:53.064: app| VixVM_FinalRelease: Close VM socket.

There's a second log file, vixWrapper-21334.log:

Jun 01 09:35:38.516: app| Log for VixWrapper pid=21334 version=1 build=build-126130 option=Release

Jun 01 09:35:38.517: app| Host codepage=UTF-8 encoding=UTF-8

Jun 01 09:35:38.517: app| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/32bit/libvix.so'

Jun 01 09:35:38.517: app| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/32bit/libvix.so'

Jun 01 09:35:38.517: app| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/32bit/libvix.so'

Jun 01 09:35:38.517: app| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/32bit/libvix.so'

Jun 01 09:35:38.517: app| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/32bit/libvix.so'

Jun 01 09:35:38.517: app| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/32bit/libvix.so'

Jun 01 09:35:38.518: app| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/32bit/libvix.so'

Jun 01 09:35:38.518: app| config points to non-existent implementation library '/usr/lib/vmware-vix/ws_server_esx-4/32bit/libvix.so'

Jun 01 09:35:38.518: app| Workstation installed version is 6.5.1

Jun 01 09:35:38.518: app| Loading Vix implementation library /usr/lib/vmware-vix/Workstation-6.5.0/32bit/libvix.so

The bottom line is that I'm hoping to power on a VM, and that VM is definitely not getting powered on.

The powerOn program (compiled without -DUSE_WORKSTATION) works fine for me on VMware Server 2.0.

Tags (2)
Reply
0 Kudos
8 Replies
lemke
VMware Employee
VMware Employee

How does it fail? What error?

There's no need for a hostname when talking to Workstation, because it will only use the local computer.

Reply
0 Kudos
strnbrg
Contributor
Contributor

At the shell there's no error at all -- no message, and $? is 0. The log files I supplied are the only visible results of launching the powerOn program.

Reply
0 Kudos
lemke
VMware Employee
VMware Employee

Is a ui log file created? Do you have $DISPLAY set in the shell?

You can add vix.debugLevel = "9" to /etc/vmware/config and generate more detail in the debug output.

strnbrg
Contributor
Contributor

There's no file under /tmp/vmware-root that has "ui" in its name. DISPLAY is localhost:10.0.

Thanks for the vix.debugLevel="9" tip. It looks like the problem might be with how I've specified my VM. I typed "[standard] Centos4/Centos4.vmx". That's the syntax that works with VMware Server 2.0, is it perhaps wrong for WS 6.5? Here's the whole log file:

Jun 01 11:08:31.773: app| Log for Vix pid=21766 version=-1 build=build-126130 option=Release

Jun 01 11:08:31.774: app| Host codepage=UTF-8 encoding=UTF-8

Jun 01 11:08:31.774: app| Foundry Init: setting up global state (0 threads)

Jun 01 11:08:31.775: app| Vix_InitializeGlobalState: Use Preference. vixLogLevel = 9

Jun 01 11:08:31.775: app| Vix_InitializeGlobalState: vixDebugPanicOnVixAssert = 0

Jun 01 11:08:31.775: app| Vix_InitializeGlobalState: vixLogRefcountOnFinalRelease = 0

Jun 01 11:08:32.088: app| UUID: SMBIOS UUID is reported as '80 cc e4 58 b4 77 12 10-b6 c3 af 51 2d 50 23 97'.

Jun 01 11:08:32.114: app| HostDeviceInfoFindHostIDECDROMs: /proc/ide could not be explored. Unable to enumerate host IDE cdroms.

Jun 01 11:08:32.171: app| HOSTINFO: Seeing AMD CPU, numCoresPerCPU 2 numThreadsPerCore 1.

Jun 01 11:08:32.171: app| HOSTINFO: This machine has 1 physical CPUS, 2 total cores, and 2 logical CPUs.

Jun 01 11:08:32.327: app| LOCALE en_US.UTF-8 -> NULL

Jun 01 11:08:32.327: app| Vix: : FoundryAsyncOp_StartWorkerThread. generateFakeProgressEvents = 1

Jun 01 11:08:32.327: app| Vix: : FoundryAsyncOp_StartWorkerThread. fakeProgressIntervalInMs = 1000

Jun 01 11:08:32.327: app| Vix: : Vix_InitializeGlobalState: Compiled for VMware Workstation

Jun 01 11:08:32.327: app| Vix: : Vix_InitializeGlobalState: Build type Release

Jun 01 11:08:32.327: app| Vix: : Vix_InitializeGlobalState: Build number build-126130

Jun 01 11:08:32.327: app| Vix: : Vix_InitializeGlobalState: Product version string 6.5.1 build-126130

Jun 01 11:08:32.327: app| Vix: : Vix_InitializeGlobalState: Config version 8

Jun 01 11:08:32.327: app| DICT --- USER PREFERENCES

Jun 01 11:08:32.328: app| DICT --- USER DEFAULTS

Jun 01 11:08:32.328: app| DICT --- HOST DEFAULTS

Jun 01 11:08:32.328: app| DICT product.name = VMware Workstation

Jun 01 11:08:32.328: app| DICT vix.libdir = /usr/lib/vmware-vix

Jun 01 11:08:32.328: app| DICT vmware.fullpath = /usr/bin/vmware

Jun 01 11:08:32.328: app| DICT NETWORKING = yes

Jun 01 11:08:32.328: app| DICT VMBLOCK_CONFED = yes

Jun 01 11:08:32.328: app| DICT gksu.rootMethod = su

Jun 01 11:08:32.328: app| DICT libdir = /usr/lib/vmware

Jun 01 11:08:32.328: app| DICT VMCI_CONFED = yes

Jun 01 11:08:32.328: app| DICT VSOCK_CONFED = yes

Jun 01 11:08:32.328: app| DICT initscriptdir = /etc/init.d

Jun 01 11:08:32.328: app| DICT authd.fullpath = /usr/sbin/vmware-authd

Jun 01 11:08:32.328: app| DICT bindir = /usr/bin

Jun 01 11:08:32.328: app| DICT product.buildNumber = 126130

Jun 01 11:08:32.328: app| DICT product.version = 6.5.1

Jun 01 11:08:32.328: app| DICT vix.debugLevel = 9

Jun 01 11:08:32.328: app| DICT --- SITE DEFAULTS

Jun 01 11:08:32.328: app| DICT tag.help = introduction.htm

Jun 01 11:08:32.328: app| DICT tag.configurationEditor = config_editor_newvm.htm

Jun 01 11:08:32.328: app| DICT tag.ideConfig = devices_virtualdrive.htm

Jun 01 11:08:32.328: app| DICT tag.floppyConfig = devices_floppy.htm

Jun 01 11:08:32.328: app| DICT tag.mouseConfig = devices_mouse.htm

Jun 01 11:08:32.328: app| DICT tag.netConfig = devices_netadapter.htm

Jun 01 11:08:32.328: app| DICT tag.parallelConfig = devices_parallel.htm

Jun 01 11:08:32.328: app| DICT tag.serialConfig = devices_serial.htm

Jun 01 11:08:32.328: app| DICT tag.soundConfig = devices_sound.htm

Jun 01 11:08:32.328: app| DICT tag.memConfig = configvm_memory.htm

Jun 01 11:08:32.328: app| DICT tag.miscConfig = configvm.htm

Jun 01 11:08:32.328: app| DICT tag.usbConfig = devices_usb.htm

Jun 01 11:08:32.328: app| DICT tag.displayConfig = configvm_display-problems.htm

Jun 01 11:08:32.328: app| DICT tag.tools = vmtools.htm

Jun 01 11:08:32.328: app| Preference GLOBAL_SETTINGS found at /usr/lib/vmware/settings

Jun 01 11:08:32.328: app| Preference USER_PREFERENCES found at /root/.vmware/preferences

Jun 01 11:08:32.328: app| Preference USER_DEFAULTS found at /root/.vmware/config

Jun 01 11:08:32.328: app| Preference HOST_DEFAULTS found at /etc/vmware/config

Jun 01 11:08:32.328: app| Preference SITE_DEFAULTS found at /usr/lib/vmware/config

Jun 01 11:08:32.328: app| VixHost_ConnectEx: version -1, hostType 3, hostName trhj.homeunix.net, hostPort 0, options 0

Jun 01 11:08:32.328: app| Vix: : VixHost_ConnectEx: Actual hostType = 3

Jun 01 11:08:32.328: app| Vix: : VixWorkstationHost_Initialize.

Jun 01 11:08:32.328: app| Vix: : VixJob_StartAsynchOpResultsFromOneVM. jobHandle = 33554495, resultErr = 0

Jun 01 11:08:32.328: app| Vix: : VixJob_FinishAsynchOpResultsFromOneVM. jobHandle = 33554495

Jun 01 11:08:32.328: app| Vix: : VixJob_AllAsyncCallsHaveStarted. jobHandle = 33554495, numCallbacksReceived = 1

Jun 01 11:08:32.328: app| Vix: : VMXI_ReportEvent. Send event 2 to handle 33554495.

Jun 01 11:08:32.328: app| Vix: : VixJob_WaitVargs. Start waiting. jobHandle = 33554495

Jun 01 11:08:32.328: app| Vix: : VixJob_WaitVargs. VixJobIsDone returns TRUE. jobHandle = 33554495

Jun 01 11:08:32.328: app| Vix: : VixJob_WaitVargs. Finished waiting. jobHandle = 33554495, err = 0

Jun 01 11:08:32.328: app| Vix: : FoundryAsyncOp_AllocAsyncOp for VIX_COMMAND_CALL_PROCEDURE (21 cookie 0). jobHandle = 0

Jun 01 11:08:32.328: app| Vix: : FoundryAsyncOp_StartAsyncOp for VIX_COMMAND_CALL_PROCEDURE (21 cookie 0)

Jun 01 11:08:32.328: app| Vix: : VixJob_WaitVargs. Start waiting. jobHandle = 33554493

Jun 01 11:08:32.329: app| Vix: : FoundryAsyncOp_WorkerPollCallback. executing asyncOp VIX_COMMAND_CALL_PROCEDURE (cookie 0)

Jun 01 11:08:32.329: app| Vix: : VixWorkstationOpenVM. vm->vmxFileName = Centos4/Centos4.vmx.

Jun 01 11:08:32.329: app| Vix: : VixWorkstationOpenVM. Failed to open XML file for VM: Centos4/Centos4.vmxVix: [21768 foundryCal

lback.c:4067]: VixJob_AddStringErrorContext. jobHandle = 33554493, strValue = Centos4/Centos4.vmx

Jun 01 11:08:32.329: app| Vix: : VixJob_StartAsynchOpResultsFromOneVM. jobHandle = 33554493, resultErr = 4000

Jun 01 11:08:32.329: app| Vix: : VixJob_FinishAsynchOpResultsFromOneVM. jobHandle = 33554493

Jun 01 11:08:32.329: app| Vix: : VixJob_AllAsyncCallsHaveStarted. jobHandle = 33554493, numCallbacksReceived = 1

Jun 01 11:08:32.329: app| Vix: : VMXI_ReportEvent. Send event 2 to handle 33554493.

Jun 01 11:08:32.329: app| Vix: : VixJob_AllAsyncCallsHaveStarted. Call SyncEvent_Signal

Jun 01 11:08:32.329: app| Vix: : FoundryAsyncOp_FinishAsyncOp for VIX_COMMAND_CALL_PROCEDURE (21 cookie 0). Err = 0

Jun 01 11:08:32.329: app| Vix: : FoundryAsyncOp_GenericCompletion. asyncOpType = VIX_COMMAND_CALL_PROCEDURE (21), jobHandle = 0, err = 0

Jun 01 11:08:32.329: app| Vix: : FoundryAsyncOp_DeleteAsyncOp asyncOp = 8492290

Jun 01 11:08:32.329: app| Vix: : VixVM_FinalRelease 0x8470A80

Jun 01 11:08:32.329: app| VixVM_FinalRelease: Close VM socket.

Jun 01 11:08:32.329: app| Vix: : VixJob_WaitVargs. VixJobIsDone returns TRUE. jobHandle = 33554493

Jun 01 11:08:32.329: app| Vix: : VixJob_WaitVargs. Finished waiting. jobHandle = 33554493, err = 4000

Jun 01 11:08:32.329: app| Vix: : FoundryAsyncOp_AbortAllCommandsOnHost()

Jun 01 11:08:32.329: app| Vix: : VixHost_Disconnect: Deleting a host handle state

Jun 01 11:08:32.329: app| Vix: : FoundryAsyncOp_FlushAsyncOps

t

Reply
0 Kudos
lemke
VMware Employee
VMware Employee

Workstation expects full pathnames to VMs, not the datastore/path used by Server and ESX.

strnbrg
Contributor
Contributor

Thanks! With the full path, something actually happened: the WS6.5 GUI came up and my VM started.

I'm not so happy about the GUI part, though. I'd like to put that powerOn command into my rc.local. I'm not sure the VM is going to start up if I'm not logged in, and it seems to always find another question + dialog box to pop up on me, requiring that I check a box or press a button.

Reply
0 Kudos
strnbrg
Contributor
Contributor

Sure enough. Tried powerOn without DISPLAY and the VM didn't start. Is there any way to get my VMs to start, if my host system reboots on me? I'd use VMware Server 2.0 except it doesn't want to install on my host (SuSE 11.0 -- known issue).

Reply
0 Kudos
lemke
VMware Employee
VMware Employee

Look into 'vmrun start' with the nogui option.

Reply
0 Kudos