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!

Comments (3)

  1. Anonymous says:


    Following the instructions above, however, I’m getting an error at the joining the domain stage. The error is:

    "Error Message:Failed joining domin ‘domain_name’. The system cannot find the file specified"

    I have checked the credentials of the account used to join the domain and they are OK. Does anybody have any idea what could be the problem?


  2. Leo Jacob says:

    MED-V 1.0 Sp1 does not support adding machine to a nested OU!!  Boo!!! Hiss!!!

    Root level OU only

  3. Steve says:

    @DTF.infrastructureservices, you didn't type the name of the domain where it was requested.. It wanted you to type the name of the domain you wanted to join where it said 'domain_name'.

    I know this was almost a year ago, just adding for anyone else searching the topic.

Skip to main content