305-300 practice question 3 of 15
A clone of a previously used virtual machine should be created. All VM specific information, such as user accounts, shell histories and SSH host keys should be removed from the cloned disk image. Which of the following tools can perform these tasks?
Full set: 121 questionsvirt-sysprep is a command-line tool from the libguestfs-tools package designed specifically to reset or "un-configure" a virtual machine's disk image to prepare it for cloning. It performs a series of modular operations to create a generic "template" image. These operations include removing machine-specific information such as SSH host keys, user accounts, persistent network configurations, and shell histories. This ensures that new virtual machines cloned from this image will start in a clean state, ready for their own unique configuration, without inheriting sensitive or specific data from the original VM.
A. virc-reset is not a standard, recognized command within the libvirt or libguestfs tool suites. It is likely a typographical error or a fabricated name.
B. virt-sparsify is a tool used to make a disk image sparse. It reclaims free space within the image file but does not alter or remove user data or system configuration.
C. virt-rescue provides a rescue shell for a virtual machine. It is used for manual troubleshooting and repair, not for automated sanitization for cloning purposes.
E. sysprep is the Microsoft System Preparation Tool. It performs a similar function but is exclusively for preparing Windows operating systems for imaging, not for general or Linux VMs.
F. virt-wipe is a tool for securely erasing data from a virtual disk to make it unrecoverable. Its purpose is data destruction, not preparing an image for reuse as a template. ---
1. Red Hat Enterprise Linux 8 Documentation: In the "Managing virtual machines with libguestfs-tools" section, virt-sysprep is described as the tool to "Reset a VM to a golden state before creating a clone of it." It lists operations such as removing SSH host keys and user accounts.
Source: Red Hat Customer Portal, Configuring and managing virtualization, Chapter 16. Libguestfs tools, Section 16.8. Resetting a VM to a golden state with virt-sysprep.
2. Libguestfs Official Documentation (Man Page): The manual page for virt-sysprep explicitly states its purpose: "virt-sysprep can reset or unconfigure a virtual machine so that clones can be made from it." It details the available operations, including --operations ssh-hostkeys,user-account,bash-history, which directly correspond to the tasks mentioned in the question.
Source: virt-sysprep(1) — Linux man page. Available from the libguestfs project website or system man pages.
3. University of Edinburgh, School of Informatics Courseware: Materials for the "System Design and Programming" course describe virt-sysprep as a crucial tool for creating VM templates. It is explained as the method to "generalize the VM by removing any host-specific information (e.g. SSH keys, MAC addresses, etc.)".
Source: University of Edinburgh, School of Informatics, Virtualisation using KVM, Section on "Creating VM Templates".
Keep practicing
Take the free 305-300 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 305-300 practice questions
- Question 1Which of the following devices exist by default in an LXC container? (Choose three.)
- Question 2Which functionality is provided by Vagrant as well as by Docker? (Choose three.)
- Question 4Which of the following mechanisms are used by LXC and Docker to create containers? (Choos…
- Question 5Which of the following values are valid in the firmware attribute of a element in a libvi…
- Question 6After creating a new Docker network using the following command: docker network create --…
- Question 7Which of the following commands boots a QEMU virtual machine using hardware virtualizatio…
