Running Debian 9 GNOME desktop as a virtual machine under virt-manager is great. A limiting factor for certain scenarios is the default QXL graphics memory of 16MB. My scenario for needing more graphics memory was online video. With this 16MB default, video is choppy, stop/start and not smooth at all.
It is not possible to increase graphics memory under virt-manager, so it must be done on the command line.
Note: This tutorial assumes you have sudo configured.
To edit a virtual machine we use virsh in the form of:
sudo virsh edit domain
Here is where most get confused, even me until I read up. domain is actually the name of the virtual machine you wish to edit. I think someone got creative here and forgot K.I.S.S when naming was done.
So lets edit the virtual machine we want to increase the graphics memory in.
sudo virsh edit debian_9x_gnome_x86_64
Note: The first time you edit, you will most likely be asked to choose your editor of choice. Do so and let us move on.
Scroll down and find the section Video. We edit the ram, vram and vgamem options as below.
Above we have edited to now allocate 128MB for graphics. Why 131072? Well, it is 128MB in KiloBytes.
We now save the file and exit our editor and move back to virt-manager and check our change is good. Open the virtual machine you have just edited and go to View >> Details then find Video QXL.
Run and have fun with smoother video playback.