mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-13 00:47:55 +00:00
Update cheatsheets
This commit is contained in:
33
tldr/linux/virt-sysprep
Normal file
33
tldr/linux/virt-sysprep
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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 {{[-a|--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 {{[-d|--domain]}} {{vm_name}} {{[-n|--dry-run]}}`
|
||||
|
||||
- Run only the specified operations:
|
||||
|
||||
`sudo virt-sysprep {{[-d|--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 {{[-d|--domain]}} {{vm_name}} --enable {{customizations}} --hostname {{host_name}} --operation {{machine-id}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`virt-sysprep {{[-he|--help]}}`
|
||||
Reference in New Issue
Block a user