[root@UA-HA ~]# virt-sysprep --list-operations
abrt-data * Remove the crash data generated by ABRT
bash-history * Remove the bash history in the guest
blkid-tab * Remove blkid tab in the guest
ca-certificates Remove CA certificates in the guest
crash-data * Remove the crash data generated by kexec-tools
cron-spool * Remove user at-jobs and cron-jobs
customize * Customize the guest
dhcp-client-state * Remove DHCP client leases
dhcp-server-state * Remove DHCP server leases
dovecot-data * Remove Dovecot (mail server) data
firewall-rules Remove the firewall rules
flag-reconfiguration Flag the system for reconfiguration
fs-uuids Change filesystem UUIDs
kerberos-data Remove Kerberos data in the guest
logfiles * Remove many log files from the guest
lvm-uuids * Change LVM2 PV and VG UUIDs
machine-id * Remove the local machine ID
mail-spool * Remove email from the local mail spool directory
net-hostname * Remove HOSTNAME in network interface configuration
net-hwaddr * Remove HWADDR (hard-coded MAC address) configuration
pacct-log * Remove the process accounting log files
package-manager-cache * Remove package manager cache
pam-data * Remove the PAM data in the guest
puppet-data-log * Remove the data and log files of puppet
rh-subscription-manager * Remove the RH subscription manager files
rhn-systemid * Remove the RHN system ID
rpm-db * Remove host-specific RPM database files
samba-db-log * Remove the database and log files of Samba
script * Run arbitrary scripts against the guest
smolt-uuid * Remove the Smolt hardware UUID
ssh-hostkeys * Remove the SSH host keys in the guest
ssh-userdir * Remove ".ssh" directories in the guest
sssd-db-log * Remove the database and log files of sssd
tmp-files * Remove temporary files
udev-persistent-net * Remove udev persistent net rules
user-account Remove the user accounts in the guest
utmp * Remove the utmp file
yum-uuid * Remove the yum UUID
[root@UA-HA ~]#
-a file Add disk image file
--add file Add disk image file
-c uri Set libvirt URI
--chmod PERMISSIONS:FILE Change the permissions of a file
--connect uri Set libvirt URI
-d domain Set libvirt guest name
--debug-gc Debug GC and memory allocations (internal)
--delete PATH Delete a file or directory
--domain domain Set libvirt guest name
--dry-run Perform a dry run
--dryrun Perform a dry run
--dump-pod Dump POD (internal)
--dump-pod-options Dump POD for options (internal)
--edit FILE:EXPR Edit file using Perl expression
--enable operations Enable specific operations
--firstboot SCRIPT Run script at first guest boot
--firstboot-command 'CMD+ARGS' Run command at first guest boot
--firstboot-install PKG,PKG.. Add package(s) to install at first boot
--format format Set format (default: auto)
--hostname HOSTNAME Set the hostname
--install PKG,PKG.. Add package(s) to install
--keep-user-accounts users Users to keep
--link TARGET:LINK[:LINK..] Create symbolic links
--list-operations List supported operations
--long-options List long options
--mkdir DIR Create a directory
--mount-options opts Set mount options (eg /:noatime;/var:rw,noatime)
-n Perform a dry run
--no-logfile Scrub build log file
--no-selinux-relabel Compatibility option, does nothing
--operation Enable/disable specific operations
--operations Enable/disable specific operations
--password USER:SELECTOR Set user password
--password-crypto md5|sha256|sha512 Set password crypto
-q Don't print log messages
--quiet Don't print log messages
--remove-user-accounts users Users to remove
--root-password SELECTOR Set root password
--run SCRIPT Run script in disk image
--run-command 'CMD+ARGS' Run command in disk image
--script script Script or program to run on guest
--scriptdir dir Mount point on host
--scrub FILE Scrub a file
--selinux-relabel Relabel files with correct SELinux labels
--timezone TIMEZONE Set the default timezone
--update Update core packages
--upload FILE:DEST Upload local file to destination
-v Enable debugging messages
-V Display version and exit
--verbose Enable debugging messages
--version Display version and exit
--write FILE:CONTENT Write file
-x Enable tracing of libguestfs calls
-help Display this list of options
--help Display this list of options
[root@UA-HA ~]# virsh list --all
Id Name State
----------------------------------------------------
18 UAKVM2 running
- UACLONE shut off
[root@UA-HA ~]# virsh start UACLONE
Domain UACLONE started
[root@UA-HA ~]#
[root@UA-HA ~]# virsh list
Id Name State
----------------------------------------------------
18 UAKVM2 running
28 UACLONE running
[root@UA-HA ~]#
[root@UA-HA ~]# virt-viewer 28 ------> 28 is VM ID
** (virt-viewer:10053): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-6XZ1eVgijP: Connection refused
(virt-viewer:10053): Gdk-CRITICAL **: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed