LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   How to change screen resolution of KVM virtual machine? (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/how-to-change-screen-resolution-of-kvm-virtual-machine-4175696936/)

ddenial 06-26-2021 07:42 AM

How to change screen resolution of KVM virtual machine?
 
Hi

I want to change the initial screen resolution of KVM guest from 1024x768 to 1280x720. This screen size is not what you define when the operating system is already installed into the client. This is the size that will be used when installing the operating system; it will be 1024x768 or 800x600 by default.

VirtualBox has settings for a similar situation:
Code:

$ VBoxManage setextradata <guest name> "VBoxInternal2/EfiGraphicsResolution" "1280x720"
This will change the VirtualBox guest size from 1080x768 to 1280x720 when you are installing the OS. When the guest OS is installed, the resolution set there will take over.

I'm looking for a similar solution for KVM.

Is there any?

Thanks

berndbausch 06-27-2021 08:57 PM

According to the documentation, you can set the resolution of the VM's video device.

ddenial 06-29-2021 07:54 AM

I found the solution. If anyone is interested, the procedures to change screen resolution are as follows.
  1. Start the KVM Guest from the 'Virtual Machine Manager'. When it starts hit F2 (or ESC) to load BIOS Menu.
  2. Go to Device Manager -> OVMF Platform Configuration
  3. In Change Preferred, change the resolution to 1280x720, or whatever.
  4. Hit Commit Changes and Exit. Then ESC to exit.
  5. Finally hit Reset to reboot the VM with the resolution of 1280x720.

When the VM restarts, from the View menu, click the 'Resize to VM' option. Done.


All times are GMT -5. The time now is 12:46 PM.