VMware Communities > Developer Community > VMware Virtual Machine Automation APIs (VIX API) > Discussions

This Question is Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
10 Replies Last post: Jan 26, 2009 5:50 AM by wadcyr8
Reply

problem with sample powerOn.c

Jan 6, 2009 2:22 AM

Click to view wadcyr8's profile Novice wadcyr8 7 posts since
Jan 6, 2009
hello,
I installed VMWare server2.0 (Linux host) and VIX API 1.6.2. I created a XP Pro guest which working very well but i can't use samples.
for the PowerOn i have an error during the VixVM_Open, it returns me an error code : VIX_E_VM_NOT_FOUND
but i don't know how to resolve that. My VM exist and when i launch the script in the server i have a "find virtual machine by datastore" success.

thanks for your help
wad
Reply Re: problem with sample powerOn.c Jan 8, 2009 12:05 AM
Click to view wadcyr8's profile Novice wadcyr8 7 posts since
Jan 6, 2009
nobody can help me ?

just for precision : my host is un Ubuntu 8.04.1 64bits and i use VMWare Server 2.0
Reply Re: problem with sample powerOn.c Jan 8, 2009 5:56 AM
in response to: wadcyr8
Click to view fixitchris's profile Hot Shot fixitchris 387 posts since
Dec 8, 2006
Can you post the relevant code and what you pass to OPENVM function?

Also post the relevant guest logs (vmware.log) and the vmware server log (

C:\Documents and Settings\All Users\Application Data\VMware\VMware Server on Windows)

Reply Re: problem with sample powerOn.c Jan 19, 2009 12:48 AM
in response to: fixitchris
Click to view wadcyr8's profile Novice wadcyr8 7 posts since
Jan 6, 2009
here is the code of the sample (adapted to my case (IP, ...) there are some printf to help the debug :
code comme from : /usr/share/doc/vmware-vix/VMwareVix/samples/powerOn.c

I launched it with this command line :
./powerOn [standard] XP_Pro_64/XP_PRo_64.vmx

and it returns me :
ERROR : The virtual machine cannot be found

for the guest log, i had nothing because there is still no interaction with it.

On the server logs : /var/log/vmware/hostd.log

[2009-01-19 09:33:07.420 'PropertyProvider' 1075181904 verbose] RecordOp ASSIGN: info, haTask--vmodl.query.PropertyCollector.Filter.destroy-148
[2009-01-19 09:33:07.426 'PropertyProvider' 1079327056 verbose] RecordOp ASSIGN: info, haTask--vmodl.query.PropertyCollector.Filter.destroy-149
[2009-01-19 09:33:07.430 'PropertyProvider' 1077594448 verbose] RecordOp ASSIGN: info, haTask--vmodl.query.PropertyCollector.Filter.destroy-150
[2009-01-19 09:33:07.433 'PropertyProvider' 1077016912 verbose] RecordOp ASSIGN: info, haTask--vmodl.query.PropertyCollector.Filter.destroy-151
[2009-01-19 09:33:07.436 'PropertyProvider' 1092327760 verbose] RecordOp ASSIGN: info, haTask--vmodl.query.PropertyCollector.Filter.destroy-152
[2009-01-19 09:33:07.441 'PropertyProvider' 1104898384 verbose] RecordOp ASSIGN: info, haTask--vmodl.query.PropertyCollector.Filter.destroy-153
[2009-01-19 09:33:07.443 'PropertyProvider' 1079327056 verbose] RecordOp ASSIGN: info, haTask--vmodl.query.PropertyCollector.Filter.destroy-154
[2009-01-19 09:33:07.558 'PropertyProvider' 1092327760 verbose] RecordOp ASSIGN: info, haTask-16-vim.EnvironmentBrowser.queryConfigOption-155
[2009-01-19 09:33:07.868 'PropertyProvider' 1102231888 verbose] RecordOp ASSIGN: info, haTask-16-vim.EnvironmentBrowser.queryConfigTarget-156
[2009-01-19 09:33:26.363 'ha-eventmgr' 1104898384 info] Event 28 : User root@127.0.0.1 logged in
[2009-01-19 09:33:26.363 'PropertyProvider' 1104898384 verbose] RecordOp ASSIGN: latestEvent, ha-eventmgr
[2009-01-19 09:33:26.364 'PropertyProvider' 1104898384 verbose] RecordOp ADD: sessionList, ha-sessionmgr
[2009-01-19 09:33:26.449 'TaskManager' 1083140432 info] Task Created : haTask--vim.SearchIndex.findByDatastorePath-157
[2009-01-19 09:33:26.449 'PropertyProvider' 1083140432 verbose] RecordOp ADD: recentTask, ha-taskmgr
[2009-01-19 09:33:26.450 'TaskManager' 1083140432 info] Task Completed : haTask--vim.SearchIndex.findByDatastorePath-157
[2009-01-19 09:33:26.450 'PropertyProvider' 1083140432 verbose] RecordOp ASSIGN: info, haTask--vim.SearchIndex.findByDatastorePath-157
[2009-01-19 09:33:26.494 'PropertyProvider' 1077016912 verbose] RecordOp REMOVE: sessionList, ha-sessionmgr
[2009-01-19 09:33:26.494 'ha-eventmgr' 1077016912 info] Event 29 : User root logged out
[2009-01-19 09:33:26.494 'PropertyProvider' 1077016912 verbose] RecordOp ASSIGN: latestEvent, ha-eventmgr
[2009-01-19 09:33:26.494 'PropertyProvider' 1077016912 verbose] RecordOp ASSIGN: info, haTask--vim.SessionManager.logout-158
[2009-01-19 09:34:28.845 'PropertyProvider' 1092327760 verbose] RecordOp REMOVE: recentTask, ha-taskmgr

Attachments:
Reply Re: problem with sample powerOn.c Jan 19, 2009 6:25 AM
in response to: wadcyr8
Click to view fixitchris's profile Hot Shot fixitchris 387 posts since
Dec 8, 2006
Is your datastore called 'datastore' or 'datastore1'? Otherwise the syntax looks correct.
Reply Re: problem with sample powerOn.c Jan 19, 2009 6:30 AM
in response to: fixitchris
Click to view wadcyr8's profile Novice wadcyr8 7 posts since
Jan 6, 2009
my datastore is called "standard" it's the default datastore created by the installation.

I hope my syntax is correct, it's a sample given with VIP API :D
Reply Re: problem with sample powerOn.c Jan 23, 2009 12:28 AM
in response to: wadcyr8
Click to view wadcyr8's profile Novice wadcyr8 7 posts since
Jan 6, 2009
little up please ???
Reply Re: problem with sample powerOn.c Jan 24, 2009 9:54 AM
in response to: wadcyr8
Click to view akoeplinger's profile Novice akoeplinger 18 posts since
Nov 29, 2008
Hi!

Maybe you need to enclose your vmx-path in quotation marks in the command line, eg. ./powerOn "[standard] XP_Pro_64/XP_PRo_64.vmx" ?

Regards, Alex

Reply Re: problem with sample powerOn.c Jan 25, 2009 11:57 PM
in response to: akoeplinger
Click to view wadcyr8's profile Novice wadcyr8 7 posts since
Jan 6, 2009
Damn ! I'm so stupid !
It works now. I still have an error which says : "ERROR : The operation was successfull" but it works :d
Thanks akoeplinger.
Reply Re: problem with sample powerOn.c Jan 26, 2009 5:40 AM
in response to: wadcyr8
Click to view fixitchris's profile Hot Shot fixitchris 387 posts since
Dec 8, 2006

I've made that type of command interpreter mistake many times...

The ERROR you're getting sounds like a handled exception. (Just like when Windows attempts to read from RAM and it gets an exception, then it knows to read from the paging file instead.)

Reply Re: problem with sample powerOn.c Jan 26, 2009 5:50 AM
in response to: fixitchris
Click to view wadcyr8's profile Novice wadcyr8 7 posts since
Jan 6, 2009
yes it was, it just i was forcing to read the Error ouput and when it's working, it's still sending a message on this output
Actions