How to get Virtual Machine log from Opennebula 5.0.2 using XML-RPC? Where will that log data is stored?

(Ranjith Kumar) #1

I’m trying to get log of each and every virtual machine from opennebula. Please tell me how to get those log?

(Miguel Ángel Alvarez Cabrerizo) #2

I’m afraid I have no experience with OpenNebula’s XML-RPC interface but according to docs maybe you can try to get some info using the action. Sorry I can’t send you a code snippet but haven’t tried the API directly and also it would depend on your programming language.

By default logs are stored in the /var/log/one directory and you can find logs there for the opennebula service, sunstone service… Also each machine has a log with the VM ID followed by *.log e.g (0.log, 1.log…). Have a look at to find more about log configuration (e.g sending logs to other systems like syslog).


(Ranjith Kumar) #3

Thanks for the reply:slight_smile:

(Ranjith Kumar) #4

What is time format of log time of virtual machine in log file in var/log/one path? Which country format is it?

(Miguel Ángel Alvarez Cabrerizo) #5

English date, I guess. Anyway it doesn’t seem very difficult to parse, isn’t it it?

This is a sample though you have plenty of it in that folder to play with: Wed Oct 5 11:47:09 2016 [Z0][VMM][I]: Driver loaded.

Check your parser or favourite programming language documentation to know how to parse that dates… seems standard so you’ll find many examples. I can’t share a code snippet as I haven’t done that in the past, sorry.


(Anton Todorov) #6

The format is as ctime(t) which is string representation of
<day of week> <month> <day of month> <hour>:<minute>:<second> <year>


Kind Regards,
Anton Todorov

(Harpreet Singh) #7


I’m using PHP language to run openNebula API. I’ve tried “” API but there is not vm log in this API result.

Can you please help me to get VM logs?