How to Join a VM to a Domain?

You can easily join your VM to a specific domain using the following steps:

Note: VM has to be installed with Windows XP that has VLK (Volume License Key), Retail/MSDN/OEM Installations will not work.

Step 1: SID creation

  1. This step is relevant when you want to join one or more VMs that are created from the same base machine. Otherwise, skip to Step 2
  2. Download Microsoft Sysprep tool (Sysprep link for XP VM machine: Windows XP Service Pack 2 Deployment Tools ).
  3. From the Microsoft Sysprep Tool folder run Setup Manager (setupmgr.exe).
    1. Click Create New and then click Next.
    2. Choose your Type of Setup by selecting Sysprep setup and then click Next.
    3. Select your Windows product, and then click Next.
    4. Select Yes, fully automate installation and then click Next.
    5. Fill out the relevant information, in particular the following settings:
      • Name and Organization
      • Product Key
      • Computer Name (you can select the automatic option)
      • Administrator Password (The admin needs to have permission to add a machine to the domain). Select the When a destination computer starts, automatically log on as Administrator check box.
    6. Click Finish.
    7. Verify that you have created an answer with the settings you have provided (sysprep.inf should have the VM settings).
    8. Run Sysprep.exe.
    9. Select the Don't reset grace period for activation check box
    10. Select the Mini-Setup check box.
    11. Click Reseal.
    12. Click OK.

Step 2: MED-V management settings

  1. Start the Management Console.
  2. Click Policy.
  3. Click the Virtual Machine tab and then select the following check boxes:
    • Logon to Windows in VM using MED-V credentials (SSO).
    • Synchronize Workspace time zone with host
  4. Click the VM Setup tab.
  5. Select the Run VM Setup checkbox.
  6. Click Script Editor and then click Add. Then add the following scripts in the order that they appear:
    1. Rename computer
    2. Restart Windows
    3. Join Domain (complete the domain details)
    4. Disable Auto-Login
  7. Click OK.
  8. Click Commit.
  9. Click the Virtual Machine tab and verify that the VM appears as the Assigned Image.

Now the VM has been joined to the domain!