XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    VM Display Resolution

    Scheduled Pinned Locked Moved XCP-ng
    3 Posts 2 Posters 46 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • acebmxerA Online
      acebmxer
      last edited by

      So i was trying out a new Linux distro Umarchy and had issues with the screen resolution.

      Looks like this can be done by creating new vm templates with this UEFI setting preset.

      Is that something Vates and work on when pushing new templates?

      Checked the official docs — short version: there's no supported way to change the OVMF default. It's per-VM only, done inside the guest's UEFI setup, and XCP-ng/XO expose no pool setting, template field, or xe parameter for it.

      What the official docs actually say
      docs.xcp-ng.org/vms/ has a "Manage screen resolution" section, but it only covers the OS layer:

      BIOS VM — set it in the guest OS (Display settings).
      UEFI VM — install the XCP-ng Standard VGA Display Driver (part of the Windows Guest Tools package); after that the guest OS controls resolution normally.
      The OVMF Platform Configuration menu itself isn't documented there. On the forum, Vates support (Darkbeldin) answered the exact question you're asking with "to my knowledge it's not possible inside the template." That's still the state of things.

      Setting it per VM
      Device Manager → OVMF Platform Configuration → Change Preferred → pick resolution → F10 to save → Esc back out → Reset (a full reboot; it does not apply to the current boot).

      Getting into setup is the annoying part since boot wait is 0s — either spam Esc at the Tianocore logo, or from the GRUB screen press c and type fwsetup.

      Making new VMs come up at 1024x768+
      The practical workaround, since the setting lives in the VM's UEFI NVRAM (varstored) and NVRAM is part of the VM record:

      Build one VM, set the OVMF preferred resolution, shut it down.
      Convert it to a template.
      VMs cloned from that template inherit the NVRAM, including the resolution.
      Caveats: this won't help VMs created from XCP-ng's built-in templates, and there are reports of guest UEFI NVRAM not persisting in some cases, so verify on a clone before rolling it out.

      Related knob worth checking first
      Separate from the OVMF preference, the emulated adapter caps what modes are available:

      xe vm-param-set uuid=$UUID platform:vga=std
      xe vm-param-set uuid=$UUID platform:videoram=16
      In XO these are the VGA toggle and Video RAM field on the VM's Advanced tab. 16 MiB is the max and is what people use for 1080p and above — with the default low videoram the higher modes may not even be offered in the OVMF menu.

      Sources:

      Virtual Machines (VMs) | XCP-ng Documentation
      Set default resolution for UEFI | XCP-ng forum
      VGA on Xen Orchestra | XCP-ng forum
      Guest VM UEFI NVRAM not saved / not persistent | XCP-ng forum
      How to set screen size for UEFI VMs on XCP-NG | TechOverflow

      poddingueP 1 Reply Last reply Reply Quote 0
      • poddingueP Online
        poddingue Vates 🪐 @acebmxer
        last edited by

        To me, the template idea does hold up, at least the part I could check.

        On an 8.3 host I cloned a UEFI VM, then turned that clone into a template and cloned it again.
        The NVRAM field came back byte-identical both times, so whatever sits in a VM's UEFI variables really does travel into VMs built from it.

        What I didn't test is the preferred-resolution setting itself, so I can't promise the resolution survives and applies, only that the place it lives in does.
        So it's half an answer. 🤷

        The "would Vates do this" part isn't mine to answer, and https://feedback.vates.tech is where that gets counted rather than a forum thread.

        Worth saying there that https://docs.xcp-ng.org/vms/#manage-screen-resolution only covers the guest-OS side, so the firmware route you wrote up isn't documented anywhere official.

        You can say so by clicking at the bottom of the page on :

        Was this page helpful?
        Yes/No

        Or even click on:

        Edit this page

        poddingueP 1 Reply Last reply Reply Quote 0
        • poddingueP Online
          poddingue Vates 🪐 @poddingue
          last edited by

          It was too tempting not to test, so I went and tested the other half.
          On an 8.3 host I set the preferred resolution to 800x600 in the OVMF menu on a UEFI Debian VM, turned that VM into a template, and cloned it.
          The clone came up at 800x600.
          A control clone of the same original, with nothing set, came up at 1024x768.
          So your workaround holds, the resolution really does ride along into VMs built from the template.

          For anyone who wants to poke at it, the setting is a UEFI variable called PlatformConfig under GUID 7235c51c-0c80-4cab-87ac-3b084a6304b1. It only appears in NVRAM once you commit it in the menu, and it stores width and height as plain little-endian integers, which is why it travels with the VM record.

          One thing I didn't expect: the OVMF help text says the mode list is filtered against video RAM size, but the VM I used had the default 4 MB and still offered everything up to 1280x1024.
          So you may not need to raise videoram for the common ones.

          ⚠ Fair warning though, I measured the console at the firmware stage rather than after the distro's own driver takes over, so a guest that sets its own mode later could still override it.
          At least, that's my understanding. 🤷

          1 Reply Last reply Reply Quote 1

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post