Article ID: 118059, created on Oct 20, 2013, last review on May 16, 2014

  • Applies to:
  • Virtuozzo 6.0
  • Virtuozzo containers for Linux 4.7
  • Virtuozzo containers for Windows 4.6
  • Virtual Automation

Symptoms

I can see RDBMS errors in the logs of Parallels Virtual Automation (PVA) Agent (/var/log/pva/agent). For example:

RDBMS error (-2147483648) : DBMS Error #HY000:1:1:no such table: vSecurity (1) 
SELECT T140735578562040.[operation] FROM vSecurity T140735578562040 WHERE ((T140735578562040.[objId]='0ca08c4d-21ab-174a-a495-85b0e0bfd5a4') AND (T140735578562040.[sid] IN ('AQEAAAAAAAAAAAAA','AQEAAAAAAAAAAAAA'))) AND (T140735578562040.[operation] IN ('0','99')) "

or

T=11:28:20:184; L=(err); PID=146508; TID=461f0; P=VZLDBSchema [VZL::onRdbmsError] RDBMS error (-2147483648) : DBMS Error #HY000:1:11:database disk image is malformed (11)

How do I fix PVA Agent database corruptions?

Resolution

Follow these steps to bring the PVA Agent database to a consistent state:

  • For Linux

  1. Stop the PVA Agent service:

     ~# pvaagent stop
     Shutting pvaagentd:                                        [  OK  ]
    
  2. Dump the old database into a new one:

     ~# echo ".dump" | sqlite3 /var/opt/pva/agent/etc/VZAgentDB.sqldb | sqlite3 /var/opt/pva/agent/etc/VZAgentDB.sqldb.new
    
  3. From the following output, you can see that the size of the two database files differs, which points to the inconsistencies in the former one:

    ~# ls -alh /var/opt/pva/agent/etc/VZAg*
    -rw-r-----  1 root root 309M Oct 17 14:27 /var/opt/pva/agent/etc/VZAgentDB.sqldb
    -rw-r--r--  1 root root 288M Oct 17 14:30 /var/opt/pva/agent/etc/VZAgentDB.sqldb.new
    
  4. Replace the old database with the newer one (keep the old copy for backup purposes):

    ~# mv /var/opt/pva/agent/etc/VZAgentDB.sqldb{,.corrupted}
    ~# mv /var/opt/pva/agent/etc/VZAgentDB.sqldb.new /var/opt/pva/agent/etc/VZAgentDB.sqldb
    
  5. Start the PVA Agent service again:

    ~# pvaagent start
    Starting pvaagentd:                                        [  OK  ]
    

  • For Windows

  1. Stop the PVA Agent service:

     net stop pvaagent
    
  2. Dump the old database into a new one:

    cd "C:\Program Files (x86)\Parallels\Parallels Virtual Automation\Agent\bin"
    echo .dump | sqlite3exe.exe C:\vz\PVA\Agent\Data\etc\VZAgentDB.sqldb | sqlite3exe.exe C:\vz\PVA\Agent\Data\etc\VZAgentDB.sqldb.new
    
  3. From the following output, you can see that the size of the two database files differs, which points to the inconsistencies in the former one:

    dir C:\vz\PVA\Agent\Data\etc | findstr VZAg
     Directory of C:\vz\PVA\Agent\Data\etc
    07/16/2013  04:19 AM           115,414 VZAgentDB.sqldb
    07/16/2013  04:21 AM           98,763 VZAgentDB.sqldb.new
    
  4. Replace the old database with the newer one (keep the old copy for backup purposes):

    move C:\vz\PVA\Agent\Data\etc\VZAgentDB.sqldb{,.corrupted}
    move C:\vz\PVA\Agent\Data\etc\VZAgentDB.sqldb.new  C:\vz\PVA\Agent\Data\etc\VZAgentDB.sqldb
    
  5. Start the PVA Agent service again:

     net start pvaagent
    

Note:

For Linux, depending on the type of installation, the PVA Agent data directory can be located inside /vz/pva/agent/etc directory.

For Windows, depending on the type of installation, the VZ data directory can be located on different drive, so the VZAgentDB.sqldb file path may change. For example: E:\vz\PVA\Agent\Data\etc\VZAgentDB.sqldb

Search Words

RDBMS error

corruption

VZAgentDB.sqldb

fix

DBMS Error

inconsistency

corrupt

database disk image is malformed

backup

-

Log error

VZPP stop/start/restart commands do not work

319940068c5fa20655215d590b7be29b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f 965b49118115a610e93635d21c5694a8 e8e50b42231236b82df27684e7ec0beb 0c05f0c76fec3dd785e9feafce1099a9 6c20476fe6c3408461ce38cbcab6d03b 0dd5b9380c7d4884d77587f3eb0fa8ef c62e8726973f80975db0531f1ed5c6a2

Email subscription for changes to this article
Save as PDF