In step 1, we gathered some memory statistics for the running KVM instance. From the output, we can see that the VM is configured with 1 GB of memory indicated by the actual parameter, and it's currently using 333644 KB of memory.
In step 2, we updated the available memory to 2 GB and then proceeded to update the maximum memory that can be allocated to the instance in step 4. In order to perform that operation, the instance had to be stopped first, as shown in step 3.
In steps 6, 7, and 8, we made sure that the updates took place by first invoking the dommemstat subcommand, then connected to the VMs console and finally checked the current configuration by dumping the instance definition.
The virsh command provides few subcommands ...