A KVM host uses external snapshots for one of its guests. After several disk-only snapshots, the backing-file chain for the guest's vda disk is now:
base.img ← snap1.qcow2 ← active-overlay (current)
The guest must stay online, but the administrator wants to merge all data in the overlays back into base.img and immediately pivot the running VM so it continues to use base.img, allowing the overlay files to be deleted. Which single virsh command will perform this task?
The virsh blockcommit sub-command copies data from the top of a backing-file chain down into a specified base image while the virtual machine is running. Using the options --active and --pivot performs a live commit of the overlay data into base.img and then switches (pivots) the guest to use the consolidated base image, so the overlay files are no longer needed.
blockpull moves data in the opposite direction (from the backing file up into the active overlay), leaving the chain length unchanged.
snapshot-revert changes the VM to a previous snapshot state rather than merging disk images.
blockcopy creates a new copy of a block device but does not collapse an existing snapshot chain.
Therefore, the only command that both merges the overlays into the base image and pivots the running guest in one step is blockcommit with the --active and --pivot options.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the '--active' option in the virsh blockcommit command?
Open an interactive chat with Bash
What is the difference between 'blockpull' and 'blockcommit' in libvirt?
Open an interactive chat with Bash
What does the '--pivot' option do in the context of virsh blockcommit?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access