Author Archives: Kaven Gagnon


About Kaven Gagnon

System Engineer / Network Administrator

Windows : VMware Workstation VM fail to boot after crash with snapshot

Well this is embarrassing, my 11 years old workstation crashed while I had several VMware Workstation guests running (thanks for all those years of flawless runtime!).

All my VMs had auto-snapshots enabled, meaning that VMware Workstation was automatically taking snapshots of my development VMs every day. Guests VMs with snapshot does not react so well when hard crash occur – unfortunately this was my case.

Once I had my new computer up, connected my old data drives and attempted to start the VMs – Surprise! – The following error occurred :

The process cannot access the file because another process has locked a portion of the file

Cannot open the disk ‘X:\Path\To\VM\Guest-000001.vmdk’ or one of the snapshot disks it depends on.

Module ‘Disk’ power on failed.

Failed to start the virtual machine.

First of all, I copied all VMs to a safe location before attempting any further actions. Then, did the following attempts :

1. Remove all “*.lck” files/folders ;
2. Import the VM guest(s) to VMware Workstation ;
3. Take a new snapshot ;
4. Delete the oldest snapshot ;
5. [Optional step based on the state of your vDisk] VMware Workstation may complain about vDisk that require repair – if this is the case, using the Command Prompt. go to :

And run the following command to repair the vDisk :

6. Have a look in the Snapshot Manager if any snapshot remains – delete if required – if it fail, take a new one and delete ;
7. Start the guest VM.

Note : Step 3, taking a new snapshot before removing the existing ones did all the difference in my case, just deleting existing snapshots bricked the vmdk files, taking a new one first worked the magic!

At this point, your old guest(s) VM(s) should be starting without issue, hopefully!

Windows : Nmap error dnet: Failed to open device eth0

Experiencing the following issue with Nmap on Windows?

$ nmap -P0 -sS -T5
Starting Nmap 7.70 ( ) at 2019-06-04 03:14 ric
dnet: Failed to open device eth0

It appears that some version of Npcap (or WinPcap) is causing issues. Updating Npcap to version 0.995 solve this issue.

If you are running Windows 10 build 1607 and use WinPcap, please know that a strict driver signing requirement has been introduced from this version and does work with WinPcap, please install Npcap instead which is fully compatible with latest Windows 10 releases.

Linux : cPanel Unknown API Error when attempting to contact the remote system

Having the following message while trying to setup a DNS cluster with cPanel?

Unknown API Error when attempting to contact the remote system

This error is usually caused by firewall blocked port (most likely tcp-2087) and/or DNS record pointing to the wrong IP.

To find out, have a look at the following log file :

You should be able to see an entry similar as the one below :

Could not connect to Could not connect to ‘’: Connection refused

Windows : Show available memory with PowerShell

Here is the command how to show the available system memory on Windows with PowerShell command :

Example :

Linux : How to manage Exim mail queue

Here are some useful commands to manage the Exim mail server queue.

Show the mail queue content :

Show the amount of mail in the queue :

Delete a specific message in the queue, with the help of the first command in this example (exim -bp) to get the message ID :

Example :

Delete the full content of the mail queue :

There are some circumstances where you may want to need to flush the entire mail server (Exim) queue – infected computers/users are common these days and a situation may easily degenerate when the queue hit an unmanageable amount of mails. if you get to that point, the following command will flush absolutely ALL emails in the queue :

Windows : Multiple connections to a server or shared resource by the same user, are not allowed

Having this error message when you login your Windows session :

An error occurred while reconnecting X: to
Microsoft Windows Network: Multiple connections to a server
or shared resource by the same user, are not allowed. Disconnect all previous
connections to the server or shared resource and try again.

This connection has not been restored.

If your computer is member of an Active Directory domain, this error may happen if you have a mapped drive that was attempted to be authenticated without success (marked with a red X) with a local account and a Groupe Policy Object (GPO) attempt to map the same resource on your computer.

If such conditions are met, try to manually unmap/disconnect the drive manually, logoff and login your session again.

Linux : Export Roundcube webmail contact from SQL to CSV

Here is a procedure how to export the saved address book contacts from Roundcube webmail directly from the MySQL database to a CSV file (please note that Roundcube natively support exporting contacts from the Webmail itself to CSV – this method is only in case you want to pull out old contacts from a database).

1. Using the shell, access to the Roundcube database with the MySQL client :

2. Issue the select command below with the exact syntax, only modify the section ‘user@domain.tld’ with the actual user email address from where you want to export the contacts from :

Output example :

3. Optional : To view the existing contacts in this user address book, issue the following command :

Output example :

4. Quit the MySQL client :

5. Create the CSV file scheme using the following command :

6. Issue this command to export the contacts to our previously defined CSV file (replace as needed the name of the CSV file output) :

Linux : How to install same package version between old and new RHEL/CentOS system

I recently had to provision a RedHat Enterprise Linux 6 system for a customer that owned a production system that I have provisioned four years ago. The new system requirement was to match the same package version as the old system (that they left un-updated since the deployment – fortunately for them it was an internal system!).

Here is what I did to deliver the system as per the customer’s request.

1. Install the OS using the same major and minor version as the source system (ex: v6.4). You can easily find out on the source system using the following command :

2. On the source system, issue the following command as root :

3. Copy that file list (pkg.txt) on the new system – example :

4. On the new system, execute the following command (this example assume that the “pkg.txt” file has been placed under “/root” home folder :

This will take a while to process. Using this method, I have seen sometime that some dependencies failed because specific packages versions were no longer available in the repo. In that case you will have to manually play with exclusion to make it work.


Web : ownCloud error Memcache \OC\Memcache\APCu not available for local cache

Encountering the following error with ownCloud?

“Memcache \OC\Memcache\APCu not available for local cache Is the matching PHP module installed and enabled?”

This usually mean that either the Memcache/APC module isn’t installed (or enabled), or a mistake in the ownCloud configuration is present.

1. Make sure the APC package is present on your system (the commands below show how to proceed on a Debian distribution) :

NOTE : If the package is present, go to step 3 as the module is likely not loaded.

2. If the package isn’t present on your system, simply run the following command to install it :

3. Enable the module :

4. Restart Apache :