QEMU, increase graphics memory

6,098

You need to add a device to your VM. For example, if you decided to use VGA adapter (mode), your code should look like this:

qemu-system-x86_64 -enable-kvm -m 4G -cdrom "OS.iso" -boot order=c -drive file=image_file,if=virtio -device VGA,vgamem_mb=256

You can get the list of the devices that is possible to add to the VM by running the following command (print a list of QEMU supported devices by category):

qemu-system-x86_64 -device help

Additionally, the options per device can be determined by running:

qemu-system-x86_64 -device device_name,help

For the example with VGA adapter:

qemu-system-z86_64 -device VGA,help

Here is a similar post: How to set video memory with KVM/QEMU virtualization?

Share:
6,098

Related videos on Youtube

Jenia Ivanov
Author by

Jenia Ivanov

Updated on September 18, 2022

Comments

  • Jenia Ivanov
    Jenia Ivanov almost 2 years

    I need to get more graphics memory on my QEMU Windows client.

    I decided to install Virtio drivers for QEMU to achieve that purpose.

    I create an imagine_file like this:

    qemu-img create -f raw image_file 4G
    

    Also, I ran the windows-install like this:

    qemu-system-x86_64 -enable-kvm -m 4G -cdrom "OS.iso" -boot order=c -drive file=image_file,if=virtio
    

    But when Windows ran, it didn't find any hard-drive (the image_file basically). It asked for some drivers instead. I think it wanted drivers to communicate with the hard-drive (image_file).

    Running the install without Virtio works though:

    qemu-system-x86_64 -enable-kvm -m 4G -cdrom "OS.iso" -boot order=d -drive file=image_file,format=raw
    

    The difference betweeen the two commands is:

    order=c vs order=d
    

    and

    if=virtio vs format=raw
    

    How do I install windows with Virtio in QEMU?

    My original goal is to get 512 MB of graphics memory on Windows (running as a guest in QEMU). Unfortunately, by default (no Virtio) I get 8MB of video memory which is not enough for my purposes

    Thanks

    P.S. My OS is Arch-Linux