1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/virt-sysprep.md
Managor 3f89500f41
virt-sysprep: add an example and sudo (#15593)
* Update virt-sysprep.md

* Update virt-sysprep.md

* Update virt-sysprep.md

* Update virt-sysprep.md

* Update virt-sysprep.md

* Update pages/common/virt-sysprep.md

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

* Update virt-sysprep.md

* Update virt-sysprep.md

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2025-02-06 17:26:04 +01:00

24 lines
899 B
Markdown

# virt-sysprep
> Reset, unconfigure, or customize a virtual machine image.
> More information: <https://manned.org/virt-sysprep>.
- List all supported operations (enabled operations are indicated with asterisks):
`virt-sysprep --list-operations`
- Remove sensitive system data from a virtual machine image:
`sudo virt-sysprep --add {{path/to/image.qcow2}}`
- Specify a virtual machine by its name and run all enabled operations but don't actually apply the changes:
`sudo virt-sysprep --domain {{vm_name}} --dry-run`
- Run only the specified operations:
`sudo virt-sysprep --domain {{vm_name}} --operations {{operation1,operation2,...}}`
- Generate a new `/etc/machine-id` file and enable customizations to be able to change the host name to avoid network conflicts:
`sudo virt-sysprep --domain {{vm_name}} --enable {{customizations}} --hostname {{host_name}} --operation {{machine-id}}`