This page describes how to create a Windows base image. These instructions should work regardless of the provisioning engine being used (KVM, VMware, etc.).


Requirements

You will need the following:

  • Windows installation ISO file
  • Windows product key or KMS server address

 The following must be done before an image can be captured:

  • The web, database, and management node has been installed and the management node is checking into the database.
  • A computer for the machine being captured has already been added to the VCL database
  • A VM host computer on which the guest is running as been added to the VCL database
  • The guest VM has been assigned to the VM host via the Virtual Hosts link on the VCL website

These instructions assume you have root access and are using a bash shell.

Create a Virtual Machine

KVM, VMware ESXi, vCenter

The instructions assume that the VM host has been configured with the following bridged networks:

  • Private: bridged to private interface: eth0
  • Public: bridged to public interface: eth1

Use an interactive client for your hypervisor to create a VM with

  • 2 NICs (use MAC addresses from a VM you've already assigned to the VM host under Virtual Hosts in the VCL web interface)
    • use e1000 as the adapter type
  • disk image large enough for the OS install, updates, and any desired software (typically 50-100 GB)
  • 1 to 2 cores (typically)
  • 4 to 8 GB RAM (typically)
  • ensure all devices are configured to be attached at power on

Example instructions specifically for VMware vSphere:

  • Click File New Virtual Machine
  • Configuration: Custom
  • Name: win10
  • Datastore: datastore
  • Virtual Machine Version: 7
  • Guest Operating System: Windows
    • Version: Microsoft Windows 10 (64-bit)
  • Number of virutal sockets: 2
  • Number of cores per virtual socket: 1
  • Memory Size: 4 GB
  • How many Nics: 2
    • NIC 1: Private, Adapter: E1000, Connect at Power On: Yes
    • NIC 2: Public, Adapter: E1000, Connect at Power On: Yes
  • SCSI controller: LSI Logic SAS
  • Disk: Create a new virtual disk
    • Capacity: 50 GB
    • Disk Provisioning: Thin Provision
    • Location: Specify a datastore or datastore cluster
      • Click Browse
      • Select the local datastore
      • Click OK
  • Virtual Device Node: SCSI (0:0)
    • Mode: Not Independent (unchecked)
  • Edit the virtual machine settings before completion: Yes
  • In the Hardware pane, select Add...
    • Device Type: CD/DVD Drive
    • Select CD/DVD Media: Use ISO image
    • Select ISO Image:
      • Click Browse
      • Select the location datastore (were the ISO is located) 
      • Click Open
      • Select Windows10.iso
      • Click Open
    • Connect at power on: Yes (checked)

Select the New NIC (adding) entry with Private listed next to it** Under MAC Address, select Manual

    • Enter the private MAC address you retrieved earlier
    • Click Finish
  • Click Finish

Start the VM and Install Windows

  • Start the VM
  • Follow the installation process for Windows
  • When asked for an initial user
    • use root as the username
      • ensure root is an admin user
    • use a password you will remember (VCL will change it later to what is configured in /etc/vcl/vcld.conf on the management node
  • Complete the installation process
  • Log in as the root user

Enable RDP

  • Right click on the Windows start icon
  • Open Control Panel > System and Security > System
  • Click Remote settings
  • Select Allow remote connections to this computer
  • Click OK

Connect via RDP

  • Find the IP address assigned to your VM on the Public port:
    • Start->Search
    • Enter cmd
    • Run cmd
    • type ipconfig and look your public IPv4 address x.x.x.x address
  • Connect to the computer using Remote Desktop
  • Login to the RDP session as root

Disable User Account Control

 

User Account Control (UAC) is the mechanism that causes may of the pop-up windows to appear when you attempt to run programs on Windows. VCL will disable it when the image is captured but you can disable it while configuring the base image to make things a little easier.

  1. Open the Control Panel
  2. Click System and Security > Change User Account Control settings (Under Security and Maintenance)
  3. Move the slider to the bottom: Never notify
  4. Click OK
  5. Reboot the computer

Addition Windows install notes (mostly outdated):

Install Windows for a Base Image

VMware Only: Install VMware Tools

  1. Power on the VM if it is not already powered on
  2. Install VMWare Tools  (Note: you must have a CD-ROM drive configured for the VM in order to install VMware Tools)
    1. Click on the VM menu and select "Install VMWare Tools"
    2. Select Typical and proceed through the setup pages accepting the defaults
    3. Reboot the VM when installation is complete

Install Cygwin SSHD

Follow the steps: Install and Configure Cygwin SSHD

Capture the Base Image

Run vcld -setup

  1. Run the following command on the management node:

    /usr/local/vcl/bin/vcld --setup

  2. Navigate the menu options
    (Note: the names and numbers of the menu items may not match your installation):
    1. Choose an operation: Image Management → Capture Base Image
    2. Enter the VCL login name or ID of the user who will own the image:
      Enter your VCL user ID or the user ID of the user you want to own the image.  Pressing Enter without entering a user login ID will cause admin to be the owner of the new base image.
    3. Enter the hostname or IP address of the computer to be captured:
      Enter the name or private IP address of the computer which has already added to the VCL database.
    4. Select the OS to be captured (NOTE in the list, VMware means virtual and is not specific to the VMware hypervisor):
      1. Generic Linux (VMware)
      2. OSX Snow Leopard (VMware)
      3. Ubuntu (VMware)
      4. Windows 10.x (VMware)
      5. Windows 2003 Server (VMware)
      6. Windows 7 (VMware)
      7. Windows 8.x (VMware)
      8. Windows Server 2008 (VMware)
      9. Windows Server 2012 (VMware)
      10. Windows Server 2016 (VMware)
      11. Windows Vista (VMware)
      12. Windows XP (VMware ESX)
      13. Windows XP (VMware)
    5. Image architecture:
      1. x86
      2. x86_64
    6. Use Sysprep:
      1. Yes
      2. No
      Sysprep is usually only required if the image will be loaded on bare metal computers with varying different hardware.
    7. Enter the name of the image to be captured:
      The name you enter is the name that will be displayed in the list of environments.  It may contain spaces but including other special characters is not recommended.

The following happens once you enter an image name and press enter:

  • A new image is added to the VCL database
  • An imaging request is added to the VCL database
  • The vcld -setup automatically initiates 'tail -f /var/log/vcld.log' to monitor the vcld log file.  The output will be displayed on the screen for several seconds and then tail will be stopped. However, the capture process will continue. Manually running 'tail -f /var/log/vcld.log' will allow you to continue monitoring the capture process.

Watch the vcld logfile output to determine if the image capture process is successful or terminated because a problem occurred.  When the capture process terminates, there will either be a message near the end of the output saying "image capture successful" or there will be several WARNING messages, the last of which says something to the effect "image failed to be captured".  Further troubleshooting is required if the image fails to be captured.

Add the Base Image to an Image Group

The vcld -setup utility does not add the new base image to any image groups.  You must add the image to an image group using the VCL website after the image capture process is complete.  Reservations for the image cannot be made until this is done.  To add the image to an image group, browse to the VCL website and select Manage Images > Edit Image Grouping.

  • No labels