1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/virt-generalizing-windows-sysprep.adoc
Sabrina Jess 667d35a9c8 small fix
2023-07-26 17:48:35 +00:00

35 lines
1.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * virt/virtual_machines/virt-automating-windows-sysprep.adoc
:_content-type: PROCEDURE
[id="virt-generalizing-windows-sysprep_{context}"]
= Generalizing a Windows VM using sysprep
Generalizing an image allows that image to remove all system-specific configuration data when the image is deployed on a virtual machine (VM).
Before generalizing the VM, you must ensure the `sysprep` tool cannot detect an answer file after the unattended Windows installation.
.Prerequisites
* A running Windows virtual machine with the QEMU guest agent installed.
.Procedure
. In the {product-title} console, click *Virtualization* -> *VirtualMachines*.
. Select a Windows VM to open the *VirtualMachine details* page.
. Click *Configuration* -> *Disks*.
. Click the Options menu {kebab} beside the `sysprep` disk and select *Detach*.
. Click *Detach*.
. Rename `C:\Windows\Panther\unattend.xml` to avoid detection by the `sysprep` tool.
. Start the `sysprep` program by running the following command:
+
[source,terminal]
----
%WINDIR%\System32\Sysprep\sysprep.exe /generalize /shutdown /oobe /mode:vm
----
. After the `sysprep` tool completes, the Windows VM shuts down. The disk image of the VM is now available to use as an installation image for Windows VMs.
You can now specialize the VM.