Skip to content

VLMCSD & License Manager

ねこ 白い edited this page Feb 10, 2024 · 9 revisions

VLMCSD & License Manager

Docker Tracker

VLMCSD is a free, open-source software to provide an activation service (KMS) for any computer using Office and Windows products

License Manager is a free, open-source software to manage licenses of local or remote computers

For detailed information (written by the original developers), see here

Original Contributors

Contributor Description
Linus Torvalds Original developer of Linux kernel, used in VLMCSD on Floppy
Hotbird64 Original developer of VLMCSD, License Manager, VLMCSD on Floppy, VLMCSD on WSL
Erik Andersen Original developer of VLMCSD
Waldemar Brodkorb Original developer of VLMCSD
Denys Vlasenko Original developer of VLMCSD
H. Peter Anvin Original developer of VLMCSD
Wind4 Contributor of VLMCSD
kkkgo Contributor of VLMCSD, VLMCSD on Floppy
HarukaMa Contributor of VLMCSD, VLMCSD on Floppy
Nang Contributor of VLMCSD database
shiroinekotfs Contributor of VLMCSD, License Manager, VLMCSD on Floppy, VLMCSD on WSL, VLMCSD Database

The Files and Folders

Folder Name Description
database-config Database for vlmcsd, License Manager, and MSSQL 2022. It also contains getkey.py and Microsoft SQL Server 2022 key management notebook
license-manager License Manager source folder
vlmcsd-floppy vlmcsd on floppy disk
vlmcsd-wsl vlmcsd for Windows Subsystem for Linux
vlmcsd vlmcsd base source code

Use VLMCSD & License Manager

Use the VLMCSD command line

VLMCSD App Description Command line
vlmcs vlmcs is a program that can be used to test a KMS server that provides activation for Microsoft products. It supports KMS 4, KMS 5, and KMS 6 protocol. See the document
vlmcsd vlmcsd is a fully Microsoft-compatible KMS server that provides product activation services to clients. It is a drop-in replacement for a Microsoft KMS server. It supports KMS 4, KMS 5, and KMS 6 protocol. See the document
vlmcsdmulti vlmcsdmulti is a multi-call binary that contains vlmcs and vlmcsd in a single binary. Since both programs share much code and data, the combined binary is significantly smaller than the sum of both files. See the document

Use VLMCSD on Docker

On a system having too many applications running, using docker is the better way to deploy, maintain, and retire vlmcsd

Containerized vlmcsd for both Linux and Windows are available on Docker Hub. By default, the container will expose port 1688.

  • For Windows Server editions, these images are available for Windows Server 2016 and up. You can try to run these images by using these following command lines
:: Windows Server 2016 container
docker run -p 1688:1688 theflightsims/vlmcsd:ltsc2016-amd64

:: Windows Server 2019 container
docker run -p 1688:1688 theflightsims/vlmcsd:ltsc2019-amd64

:: Windows Server 2022 container
docker run -p 1688:1688 theflightsims/vlmcsd:ltsc2022-amd64
  • For Linux, containerized images are available for supporting architectures. You can try these available architectures by using following command lines
# AMD64
docker run -p 1688:1688 theflightsims/vlmcsd:linux-amd64

# ARM64
docker run -p 1688:1688 theflightsims/vlmcsd:linux-arm64

# S390X
docker run -p 1688:1688 theflightsims/vlmcsd:linux-s390x

# PPC64LE
docker run -p 1688:1688 theflightsims/vlmcsd:linux-ppc64le

# RISCv64
docker run -p 1688:1688 theflightsims/vlmcsd:linux-riscv64

# MIPS64LE
docker run -p 1688:1688 theflightsims/vlmcsd:linux-mips64le

Use the VLMCSD on Floppy

Typically, VLMCSD can be installed and running as an activation service, but in some cases, VLMCSD on Floppy provides a light-weight activation service for the lab to test; or provide an internal activation for the host (the error 0x8007000D prevents Windows from activating locally)

Note:

  • When creating a VM on Hyper-V that uses VLMCSD floppy, make sure that you choose Generation 1 because of the incompatible with the Hyper-V Generation 2.
  • When creating a VM on VMWare or Virtual Box, you must configure your boot OS as Linux (x86) to sync the VM BIOS with the OS

1. Disk-less System

The VLMCSD on Floppy is a disk-less system that works entirely on RAM. The file system is a RAM disk created from the initrd file on the floppy image. That means anything you have made from inside the virtual machine will be lost when you reboot the machine.

2. System startup

The kernel boots up while the init script (/sbin/init) waits 5 seconds. While this, you can:

Press m to enter IPv4 & timezone configuration
Press t to start configure timezone configuration only
Press s to enter pre—vlmcsd—service shell.

You can skip waiting for 5 seconds by pressing any other key. You also will see the IP addresses and a table containing user names and passwords.

3. Logging into the system

5 local login shells are provided on /dev/tty2 to /dev/tty6. To switch between the logins, you can press ALT and F2 to F6, or return to the service logs by pressing ALT-F1. This allows users can use multiple terminals at once.

The floppy image only provides basic Unix commands—type busybox or /bin to get a list. The only editor available is vi. If you don't like vi, you may transfer config files via FTP to edit them with the editor of your choice and transfer them back.

4. The menu system

You may need some just-in-time commands by pressing ALT-F8.

1. Restart vlmcsd service                             
2. Stop vlmcsd service                                
3. Restart network service (includes telnet and ftp)  
4. Stop network service (includes telnet and ftp)     
5. Change the timezone                                
6. Show all kernel boot parameters                    
7. Show boot log                                      
8. Show TCP/IP configuration                          
9. Show running processes                             
                                                        
k. Change keyboard layout                             
                                                        
s. Shutdown the computer                              
r. Reboot the computer                                

Use the VLMCSD on WSL

VLMCSD on WSL is recommended for multi-system on Windows. To see how WSL works, see here

You can use VLMCSD on WSL as you do on Floppy. However, the changes you have made on the WSL distro are permanent.

To use VLMCSD on WSL, import it into the WSL database. To do this, change your active directory on the terminal to the folder (project path)/vlmcsd-beta/wsl

wsl --import <Your Distro Name> <Your installation directory> vlmcsd.tar

Use the License Manager

This guide only applies to License Manager, version 5.5.0, built and released by TheFlightSims. If you use your own copy of License Manager, or repack by others, the guide may differ.

1. The User Interface

image

(1) License Manager tools (stores in tabs and quick access tools)

(2) Connection credential and selected edition

(3) Verbose license information

(4) Verbose machine information

(5) Progress bar

2. Install a Generic Key for the local computer

image

Click on Install a Generic Key, and select the key that you want to install. You can copy-n-paste the key, or click Check and then click Install on the Product Finder window.

For Microsoft Visual Studio, Microsoft SQL Server, and Microsoft SCCM, you need to copy-n-paste in the product key box. License Manager cannot install these keys on your machine

3. Activate your Windows or Office using KMS Server

To activate using KMS Server, your destination computer needs a Generic Volume License Key (GVLK) installed. See this document to know how. Normally, the product keys stores in the License Manager that you can install are public GVLKs, so you will not need to find it on the Internet!

image

You will need to determine which server responds to your request by entering the field Override KMS Host data with the IP Address or DNS Name, or you just need to determine the KMS Domain. Don't forget to save the settings!

Pro tip: if you use the Server edition, License Manager can verify whether the server can respond with your product activation in "Start a KMS Client"

image

4. Install or verify a product key

image

You can just simply click on Product Finder and paste your product key: you will see your product key details, including its EPID and Complete PID.

You can choose to Install it or Check the availability online.

Note that you can only verify Microsoft Office, Microsoft Windows, and Microsoft Visual Studio. However, Microsoft Visual Studio cannot be installed - you must enter the product key manually.

5. Export to Database

You can export to these specific files in License Manager:

Export format File extension Description
VLMCSD .kmd This format used by vlmcsd, as the external (add-on) database
py-kms classic .txt This format used by py-kms (KMS for Python 2)
Generic C/C++/C# .txt, .c, .cpp, .h, .hpp, .cs This format helps developers to modify the vlmcsd source code
License Manager database, py-kms .xml This format used by License Manager

Build VLMCSD, License Manager & Edit Database

Build VLMCSD on Visual Studio (recommended)

    1. Open winser-mgmttools.sln, then click on vlmcsd.sln and open with Visual Studio

image

If the VS 2022 selection isn't in Open With, you can add VS2022 within the Add Program

image

    1. After opening this, you can build VLMCSD

image

The Final build locates in the !bin!

Build VLMCSD on Floppy

You must know to edit the Floppy.

Note that the floppy does NOT contain mkinitrd.guide file. It helps our developers in rebuilding the initrd

File in floppy Description
bzImage Linux kernel, version 3.12
initrd initial RAM disk, compressed as CPIO + LZMA
ldlinux.sys Linux bootloader for floppy
syslinux.cfg Linux System Configuration

Note: We sort by zero which means you have to follow these instructions in order, do it in order of sections.

  1. Configure and rebuild initrd

To follow more straightforward, we use the default path (project path)/vlmcsd-beta/vlmcsd-floppy/vlmcsd-floppy-content. You must configure your terminal to this path to this path to follow this guide easier

  • Configure initrd

    The list of files below helps you to determine each purpose of the files in initrd in floppy disk

    In here, we use the Linux root path, which is extracted in the folder (project path)/vlmcsd-beta/vlmcsd-floppy/vlmcsd-floppy-content/initrd

  • Rebuild the initrd by using these commands in WSL (recommend Debian or Ubuntu) or run them in Linux

#You must configure your terminal to (project path)/vlmcsd-beta/floppy/vlmcsd-floppy-content
rm initrd 
cd initrd-sources 
find . | cpio -o -H newc > ../initrd~
cd ..
lzma initrd~
mv initrd~.lzma initrd

You still can change the behavior of the compression model (e.g., compress with a smaller packet size), but you must know what you do. To understand how to use WSL, you can see here. Although WSL1 and WSL2 can do the same, we recommend WSL2 because more stable and secure for your device

  1. Edit the virtual floppy disk

You may need to use OSFMount to mount the formatted-FAT16-floppy disk.

After mounting the floppy disk, copy-n-paste the files you have already edited.

Build License Manager

    1. Open winser-mgmttools.sln, then click on LicenseManager.sln and open with Visual Studio image

If the VS 2022 selection isn't in Open With, you can add VS2022 within the Add Program

image

    1. After opening this, you can build License Manager

image

Build & Manage Database

  • License Manager database

Since the PR #37, we have merged external LMDB within the application. That means, you can no longer use external databases.

VLMCSD Service configuration (or known as vlmcsd.ini) is as vlmcsd service configuration.

VLMCSD Database (or known as vlmcsd.kmd) is the binary, external vlmcsd database. You can configure it in vlmcsd.ini, or you can use CLI.

In the vlmcsd.kmd, make sure that Microsoft Visual Studio, Microsoft SQL Server and Microsoft SCCM keys are not in vlmcsd.kmd because these are NOT KMS keys and cannot be activated as KMS protocols, and cause vlmcsd service crash to desktop (CTD).

To use the database, restore the database from the file PDKDB.bak

The database is only readable on Microsoft SQL Server 2022. Consider to upgrade your own SQL Server to use it.

To manage the Product Key database, use the Azure Data Studio to open Product Key Notebook.ipynb, and use it to connect and manage the Product Key database.

  • Product Key tables are the .csv portable file that can open on Microsoft Excel, or WPS Excel.

Activation Error Codes & Limitations

Limitation

Check the list of product keys that VLMCSD can activate

Error codes

Error code Error message Activation type
0x8007000D The KMS host you are using cannot handle your product. It only supports legacy versions. KMS client
0x8004FE21 This computer is not running genuine Windows. MAK/KMS client
0x80070005 Access denied. The requested action requires elevated privileges. MAK/KMS client/KMS host
0x8007007b DNS name does not exist. KMS client
0x80070490 The product key you entered didn't work. Check the product key and try again, or enter a different one. MAK
0x800706BA The RPC server is unavailable. KMS client
0x8007232A DNS server failure. KMS host
0x8007232B DNS name does not exist. KMS client
0x8007251D No records found for DNS query. KMS client
0x80092328 DNS name does not exist. KMS client
0xC004B100 The activation server determined that the computer could not be activated. MAK
0xC004C001 The activation server determined the specified product key is invalid MAK
0xC004C003 The activation server determined the specified product key is blocked MAK
0xC004C008 The activation server determined that the specified product key could not be used. KMS
0xC004C020 The activation server reported that the Multiple Activation Key has exceeded its limit. MAK
0xC004C021 The activation server reported that the Multiple Activation Key extension limit has been exceeded. MAK
0xC004F009 The Software Protection Service reported that the grace period expired. MAK
0xC004F00F The Software Licensing Server reported that the hardware ID binding is beyond level of tolerance. MAK/KMS client/KMS host
0xC004F014 The Software Protection Service reported that the product key is not available MAK/KMS client
0xC004F02C The Software Protection Service reported that the format for the offline activation data is incorrect. MAK/KMS client
0xC004F035 The Software Protection Service reported that the computer could not be activated with a Volume license product key. KMS client/KMS host
0xC004F038 The Software Protection Service reported that the computer could not be activated. The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator. KMS client
0xC004F039 The Software Protection Service reported that the computer could not be activated. The Key Management Service (KMS) is not enabled. KMS client
0xC004F041 The Software Protection Service determined that the Key Management Server (KMS) is not activated. KMS needs to be activated. KMS client
0xC004F042 The Software Protection Service determined that the specified Key Management Service (KMS) cannot be used. KMS client
0xC004F050 The Software Protection Service reported that the product key is invalid. MAK/KMS/KMS client
0xC004F051 The Software Protection Service reported that the product key is blocked. MAK/KMS
0xC004F064 The Software Protection Service reported that the non-genuine grace period expired. MAK
0xC004F065 The Software Protection Service reported that the application is running within the valid non-genuine period. MAK/KMS client
0xC004F06C The Software Protection Service reported that the computer could not be activated. The Key Management Service (KMS) determined that the request timestamp is invalid. KMS client
0xC004F074 The Software Protection Service reported that the computer could not be activated. No Key Management Service (KMS) could be contacted. Please see the Application Event Log for additional information. KMS client

List of activation keys

Click to see the list of product keys and the list of keys available. Note that each product can only see 5 public keys.

To see the complete list of product keys, you can check out the Wiki to learn how to import and list from SQL Database.