VM Explorer Practitioner Forum
Showing results for 
Search instead for 
Do you mean 

Need VMX sqlite database encryption password

Occasional Contributor

Need VMX sqlite database encryption password

Hello, I am writing a script to make a copy of the VMX database to another drive, and extract information out of it with Python.  However the database appears to be password protected.  

When I try to browse the database copy with SQLiteStudio, it prompts me for a password.  When I try to list the databases with Python, I get the follwoing.  Is there any way to discover what the password is?

D:\Shared\SystemSync>python gettrilead.py
Traceback (most recent call last):
File "gettrilead.py", line 4, in <module>
cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")
sqlite3.DatabaseError: file is encrypted or is not a database

6 REPLIES
HPE Expert

Re: Need VMX sqlite database encryption password

The SQLite database contains user names and credentials.
The password for the database is randomly generated when creating the database.
The password for the database is written in the configuration (VMX.conf).
The configuration is encrypted.
This means that if you would like to store the database for future use you also need to save the related VMX.config configuration file.

Occasional Contributor

Re: Need VMX sqlite database encryption password

I'm assuming the answer to this is "no", but is there any way to decrypt the configuraiton and view the DB encryption password?

HPE Expert

Re: Need VMX sqlite database encryption password

Technically this is possible, but we (HPE) will keep this area closed for security reasons.

Why would you like to see the content of the SQLite database?
It contains the VM Explorer users and their credentials.
This is information you have entered before, so you already know what is in there.

Occasional Contributor

Re: Need VMX sqlite database encryption password

[ Edited ]

We have multiple backup solutions, and I was basically looking schedule a periodic text file dump of a "host list" of VM's that were included in active backup jobs for an auditing report.

I have since figured out I can pull this from VMTaskhistory.xml, and wrongly assumed it was stored in the DB.  :)  Sorry!

FYI - Maybe this will save someone else some time.  When looking at the timestamp in VMTaskhistory.xml, it looks like this:

StartTime="636244407153688066"

 636244407153688066 is the number of nanoseconds since 01/01/0001 00:00.

Here is a powershell script to convert that:

$timestamp = 636244407153688066 / 10000000

$epochDate = [datetime]"01/01/0001 00:00"

$epochDate.AddSeconds($timestamp)

 

HPE Expert

Re: Need VMX sqlite database encryption password

The task history is a good place to look into, because this tells you if a VM has been backed up.
The config would only tell you if a task exists, but not if it ever has been executed.

Thanks for the power shell hint!

HPE Blogger

Re: Need VMX sqlite database encryption password

[ Edited ]

You might also want to take a look at the ReportingAPI, available in the Enterprise Edition of VM Explorer.


-Stephen.
//Add this to "OnDomLoad" event