Article ID: 116475, created on Jul 17, 2013, last review on Nov 27, 2014

  • Applies to:
  • Virtuozzo 6.0
  • Virtuozzo containers for Windows

Symptoms

It is impossible to start a container or a virtual machine with an an Active Directory (AD) controller inside. The error code returned by Windows is C00002E2.

For a container following error can be found in the vzctl.log:

Container 101 raised hard error with a status C00002E2 and will be shutdown

Virtual Machine will produce following BSOD on the startup:

STOP: c00002e2 Directory Services could not start because of the following error:

The specified procedure could not be found

Error status: 0xc000007a.

or:

STOP: c00002e2 Directory Services could not start because of the following error:

A device attached to the system is not functioning.

Error status: 0xc0000001

Cause

There was an unexpected shutdown and an Active Directory database became corrupted.

For a container you can check it by running esentutl (the container should be mounted first):

C:\>esentutl /m D:\vz\root\101\C\Windows\NTDS\ntds.dit
State
State: Dirty Shutdown

(Replace "D:\vz\root\101\C" with the actual path to the container's mounted directory.)

Resolution

The instructions to resolve database inconsistency on unclean shutdown depend on the virtualization type:

AD in a PCW container

To resolve this issue for a container (CTID #101 in this example), it is necessary to repair the AD database following these steps:

  1. Mount the container:

    C:\>vzctl mount 101
    
  2. Copy ntds.dit into a backup folder:

    C:\>copy D:\vz\root\101\C\Windows\NTDS\ntds.dit C:\backup\
    

    (Here and below, Replace "D:\vz\root\101\C" with the actual path to the container's root directory.)

  3. Check integrity of the database:

    C:\>esentutl /g D:\vz\root\101\C\Windows\NTDS\ntds.dit
    Integrity check completed.
    Database is CORRUPTED, the last full backup of this database was on 05/15/2012 01:59:08
    Operation terminated with error -1206 (JET_errDatabaseCorrupted, Non database file or corrupted db) after 9.656 seconds.
    
  4. Repair the database:

    C:\>esentutl /p D:\vz\root\101\C\Windows\NTDS\ntds.dit
    
  5. Move NTDS log files to the backup folder:

    C:\>move D:\vz\root\101\C\Windows\NTDS\*.log C:\backup\
    
  6. Start the container:

    C:\>vzctl start 101
    

AD in a PCS/PSBM virtual machine

If this happens in a Virtual Machine, steps will be a bit different:

  1. Mount the virtual machine:

    ~# prlctl mount myvm
    

    (You may need to start/restart the service prl_mounterd if there is a mount error.)

  2. Determine the mount path for the virtual machine's partitions:

    ~# prlctl mount testvm --info
    Volume 1:        /var/parallels/myvm.pvm/config.pvs
        filesystem             NTFS
        size                   63 G
        free space             54 G
        ID:  1;               /vz/mnt/{ba5d9b48-a68b-4b5f-a5de-195433d1b5fe}/volume_1
    
  3. Check the database integrity and repair it on Windows machine as described above, the database is accessible using the path from the previous step:

    /vz/mnt/\{ba5d9b48-a68b-4b5f-a5de-195433d1b5fe\}/volume_1/Windows/NTDS/ntds.dit
    
  4. Rename NTDS log files:

    ~# mv /vz/mnt/\{ba5d9b48-a68b-4b5f-a5de-195433d1b5fe\}/volume_1/Windows/NTDS/edb00004.log{,.bak}
    ~# mv /vz/mnt/\{ba5s9b48-a68b-4b5f-a5de-195433d1b5fe\}/volume_1/Windows/NTDS/edb.log{,.bak}
    

    (Log file names may differ, check the files first.)

  5. Unmount and start virtual machine:

    ~# prlctl umount myvm
    ~# prlctl start myvm
    

In case it does not fix the issue, it is necessary to download ntds.dit file from virtual machine to another Windows computer and repair the file with esentutl (approach is the same as described above, for the containers).

Search Words

A device attached to the system is not functioning

C00002E2

Directory Services could not start

Directory Services could not start because of the following error

0xc000007a

0xc0000001

The specified procedure could not be found

c00002e2 Directory Services could not start because of the following error

hard error with a status C00002E2 and will be shutdown

0dd5b9380c7d4884d77587f3eb0fa8ef 2897d76d56d2010f4e3a28f864d69223 965b49118115a610e93635d21c5694a8 d02f9caf3e11b191a38179103495106f c62e8726973f80975db0531f1ed5c6a2

Email subscription for changes to this article
Save as PDF