Making Changes to Virtual Machines

VMware’s VI Client can be used to edit virtual machine configurations. Making changes to a virtual machine under Xen or KVM can be a little trickier. You can make some changes (such as memory settings) using xm or virsh. For more complex changes with Xen, you could change the configuration files located under /etc/xen/. These are in a text format, and most of the settings you will want to change will be easy to figure out.

virsh provides one common way to make complex changes:

  1. Run virsh dumpxml to get an XML configuration file for the domain you wish to change.

  2. Use a text editor to edit the XML file.

  3. Shut down the virtual system if it is still running.

  4. Run virsh define to remove the old configuration from the hypervisor and replace it with the configuration in your edited XML file.

You can now start the domain with your new configuration.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.