Actions

Azure/Generalising OS

From Ever changing code

< Azure

Generalising Windows machine before creating an image

  1. Create Windows VM
  2. Provision/baseline your VM by RDPing and installing software
  3. Generalise your system using sysprep to create System Out-of-Box Experience (OOBE)
    1. Win+R, type sysprep, it will take you to C:\Windows\System32\Sysprep and run sysprep.exe
      • System Cleanup Action: Enter System Out-of-Box Experience (OOBE)
      • Generalize: Yes (tick)
      • Shutdown Options: Reboot
    2. Optional run: C:\Windows\System32\Sysprep\sysprep.exe /oobe /generalize /shutdown /mode:vm
    3. You will be disconnected from RDP but the instance still run generalising and will stop once done
  4. Go to Azure portal and click on Capture to create an image now
  5. You find new image in Images service where you can create new VM from

Generalising Linux machine before creating an image

  1. Create Linux VM
  2. Provision/baseline your VM by SSHing to provisioning your software
  3. Generalise your system using Azure Linux Agent - waagent
      • sudo waagent -deprovision+user
      • account you are currently logged in will be completly deleted including home
      • Linux system does not neet to be shut
  4. Go to Azure portal and click on Capture to create an image now
  5. You find new image in Images service where you can create new VM from