A system administrator needs to dynamically increase the RAM allocated to a running KVM virtual machine named db-server-01 from 2GiB to 4GiB. The change must be applied immediately without restarting the VM and should not persist after a reboot. Which command should the administrator use?
The correct command is virsh setmem db-server-01 4G --live. The virsh setmem command is used to change the current memory allocation for a virtual machine. The --live flag applies this change to the running instance of the VM. The change will not be persistent unless the --config flag is also used. The virsh edit command only opens the XML configuration file for editing and does not apply changes to a live VM. The virsh setmaxmem command sets the maximum memory limit the VM can ever be allocated, but does not change its current memory allocation. The virsh update-device command is used for changing device configurations from an XML file, not for simple memory adjustments like this.
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 does the `--live` flag do in the `virsh setmem` command?
Open an interactive chat with Bash
What is the difference between the `virsh setmem` and `virsh setmaxmem` commands?
Open an interactive chat with Bash
Why is `virsh update-device` not appropriate for changing memory allocation?
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