3

I'm having trouble switching to fullscreen size in Ubuntu 14.04 under hyper-v.

I have tried installing and activating linux integration services as suggested by other posts.

apt-get install linux-tools-3.11.0-15-generic
apt-get install hv-kvp-daemon-init

I have also tried updating the grub file like so suggested by other posts.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1200"

Followed by

sudo grub-update
sudo reboot

I have had no luck with these methods. Is there another way to enable fullscreen mode?

6
  • 1
    did you also do sudo update-grub as suggested here? blogs.msdn.microsoft.com/virtual_pc_guy/2014/09/19/…
    – SimonS
    May 25 '16 at 13:37
  • Yes. I did and I have rebooted and tried several other resolutions aswell. May 25 '16 at 15:00
  • 1
    Pretty sure the integration tools for HyperV only ever supported up to 1920*1080 which may have been the root of the problem Aug 19 '17 at 23:51
  • @Sinaesthetic How can get M$ to fix this missing resolution?
    – Damian
    Mar 19 '19 at 5:43
  • 1
    @Damian if you choose QuickCreate when creating a new VM, you can choose the latest version of Ubuntu which will be pre-optimized for Hyper-V and you should get full resolution. As for existing VMs, I think you're on your own. There might be some preconfigured base images out there. Mar 19 '19 at 17:16
4

Make sure to remove the remoteFX video card that might be configured for the VM.

Step-by-step

  • turn off your VM
  • in the Hyper-V manager, right-click on the VM, then click on "Parameters"
  • in the "hardware" section, if there is a "3D RemoteFX graphics card", click on it and then click on "remove".
  • click OK
  • start your VM
5
  • How do I do this? Jun 1 '16 at 11:08
  • Please add more details, like a step by step instruction. Otherwise your answer is not very useful as you can see from the question for clarification by the OP. Jun 1 '16 at 11:14
  • 3
    In windows 10 hyper v there is no 'Parameters' option, it's 'Settings'. I didnt have the RemoteFX hardware loaded so I tried adding it which made things worse. Bottom line, dont use HyperV if you can avoid it. Virtual Box or VMWare are much better.
    – Jonesie
    Feb 22 '17 at 20:51
  • 1
    What if there is no 3D RemoteFX graphicxs card?
    – copper.hat
    Dec 8 '17 at 19:38
  • 1
    @copper.hat this comment down below seems to have the updated options Feb 26 '19 at 22:11
4

No other way worked for me except setting the screen size explicitly following this video: https://www.youtube.com/watch?v=Tb-p9NOkcT8 (I used Debian, the video uses Ubuntu)

Step 1:

Edit /etc/default/grub change the relevant line to: GRUB_CMDLINE_LINUX_DEFAULT="quiet video=hyperv_fb:3840x2160" (You can change 3840x2160 to whatever screen size you want)

Step 2

Run: sudo update-grub

Step 3

Reboot

Steps must be retaken every time you want to change screen size.

2
  • 1
    This method worked for me with the edits I have made to the answer
    – SimonN
    Dec 13 '19 at 15:07
  • 1
    for lazy people: sudo sed -i 's/"quiet splash"/"quiet splash video=hyperv_fb:1920x1080"/g' /etc/default/grub && sudo update-grub && sudo reboot Aug 25 at 19:46
2

This is an old question, but people are still struggling with this me things. I am not sure why its so dang hard. I've seen the first answer. Didn't work. (add the line to /etc/default/grub/). I tried the video card thing, first without. Then with. Nah didnt. work. Then I found the below. To be frank- still didnt work. Im on 18.04. But I throw it here for completeness. These are the 3 most common answers I've seen. Some of these must work for each person.

Source https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/supported-ubuntu-virtual-machines-on-hyper-v

  1. Static IP injection may not work if Network Manager has been configured for a given Hyper-V-specific network adapter on the virtual machine. To ensure smooth functioning of static IP injection please ensure that Network Manager is turned off completely or has been turned off for a specific network adapter through its ifcfg-ethX file. While using virtual fiber channel devices, ensure that logical unit number 0 (LUN 0) has been populated. If LUN 0 has not been populated, a Linux virtual machine might not be able to mount fiber channel devices natively. If there are open file handles during a live virtual machine backup operation, then in some corner cases, the backed-up VHDs might have to undergo a file system consistency check (fsck) on restore. Live backup operations can fail silently if the virtual machine has an attached iSCSI device or direct-attached storage (also known as a pass-through disk). On long term support (LTS) releases use latest virtual Hardware Enablement (HWE) kernel for up to date Linux Integration Services. To install the virtual HWE kernel on 16.04, run the following commands as root (or sudo): bash

     apt-get update
     apt-get install linux-virtual-lts-xenial
    

    To install the virtual HWE kernel on 14.04, run the following commands as root (or sudo): bash

    apt-get update apt-get install linux-virtual-lts-xenial

12.04 ** does not have a separate virtual kernel. To install the generic HWE kernel on **12.04, run the following commands as root (or sudo): bash

 apt-get update
 apt-get install linux-generic-lts-trusty

On Ubuntu ** 12.04, 14.04, and 16.04 **the following Hyper-V daemons are in a separately installed package: VSS Snapshot daemon - This daemon is required to create live Linux virtual machine backups.

KVP daemon - This daemon allows setting and querying intrinsic and extrinsic key value pairs.

fcopy daemon- This daemon implements a file copying service between the host and guest. To install these Hyper-V daemons on 16.04, run the following commands as root (or sudo): bash

 apt-get install linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial

To install these Hyper-V daemons on 14.04, run the following commands as root (or sudo). bash

  apt-get install hv-kvp-daemon-init linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial

To install the KVP daemon on **12.04, ** run the following commands as root (or sudo). bash

    apt-get install hv-kvp-daemon-init linux-tools-lts-trusty linux-cloud-tools-generic-lts-trusty

Whenever the kernel is updated, the virtual machine must be rebooted to use it. On Ubuntu 17.04 and 16.10, use the latest virtual kernel to have up-to-date Hyper-V capabilities. To install the virtual kernel on **17.04 and 16.10, **run the following commands as root (or sudo): bash

  apt-get update
  apt-get install linux-image-virtual

On Ubuntu **17.04 and 16.10 **the following Hyper-V daemons are in a separately installed package: VSS Snapshot daemon- This daemon is required to create live Linux virtual machine backups. KVP daemon - This daemon allows setting and querying intrinsic and extrinsic key value pairs. fcopy daemon - This daemon implements a file copying service between the host and guest. To install these Hyper-V daemons on 17.04 and 16.10, run the following commands as root (or sudo): bash

  apt-get install linux-tools-virtual linux-cloud-tools-virtual

Whenever the kernel is updated, the virtual machine must be rebooted to use it. [...] On Windows Server 2012 R2, Generation 2 virtual machines have secure boot enabled by default and some Linux virtual machines will not boot unless the secure boot option is disabled. You can disable secure boot in the Firmware section of the settings for the virtual machine in Hyper-V Manager or you can disable it using Powershell:

 Powershell
 Set-VMFirmware -VMName "VMname" -EnableSecureBoot Off   

Before attempting to copy the VHD of an existing Generation 2 VHD virtual machine to create new Generation 2 virtual machines, follow these steps: Log in to the existing Generation 2 virtual machine. Change directory to the boot EFI directory: bash

  cd /boot/efi/EFI

Copy the ubuntu directory in to a new directory named boot: bash

  sudo cp -r ubuntu/ boot

Change directory to the newly created boot directory: bash

   cd boot

Rename the shimx64.efi file: bash

  sudo mv shimx64.efi bootx64.efi

There is also this: https://www.altaro.com/hyper-v/remotefx-windows-10-client-hyper-v/ that I found useful.

Update

New sources, check out these links:

Discussion with Linux Kernel Developer

https://github.com/LIS/lis-next/issues/318

https://github.com/dcui/linux/commit/c031eec626cd2c41ae1c0e70f51c03284017edf9

https://github.com/dcui/linux/blob/master/drivers/video/fbdev/hyperv_fb.c

Set VM-Video in PowerShell

https://github.com/MicrosoftDocs/windows-powershell-docs/blob/master/docset/windows/hyper-v/set-vmvideo.md

https://docs.microsoft.com/en-us/powershell/module/hyper-v/set-vmvideo?view=win10-ps I think I tried the above without benefit though

What I currently recommend is just using an RDP - remote desktop connection to connect. It is much easier.

  • Use Sudo Apt-get search RDP to find a package that might work. Install what works for your system.
  • Get the IP from within the VM, or from the network status box in the Hyper-VM dashboard on the Host.
  • Connect, using RDP on the machine you want to use.
    Win+R and type "RDP" to open the Remote Desktop app on a Windows Machine, use the IP that you collected.
  • Finally log in with your Linux Login and Password.

That said, to the above commands, I have these recommendations for settings on the HOST.

These are detailed on the links above.
In PowerShell Try the following

Set-VMVideo -VMName "<VM name>" -HorizontalResolution 1920 -VerticalResolution 1200 -ResolutionType Maximum

3
  • I want to revise this comment a bit. I will have to agree with @Tony Apuzzo- with much much much more exploration, I believe the best way to complete this objective is to use RDP as he suggests. XRDP is fine, though there are others. I found a discussion involving one of the people who works on the Linux kernel with Linus Torvald, et. al. He says there are limitations to what Hyper-V can handle due to the amount of space allocated by the frame buffer. The discussion decides that it is not possible in Hyper-V to increase the resolution, until this is updated.
    – Andy T
    Sep 21 '18 at 22:04
  • At the same time, I also use the Windows 10 Dev environment. This will output 3x 3820x2860 monitors simultaneously. This is 12x the limitation of what I have been able too achieve via Hyper-V for Linux. Thus I don't necessarily buy this answer. Importantly check out these sources:
    – Andy T
    Sep 21 '18 at 22:09
  • github.com/dcui/linux/commit/…
    – Andy T
    Sep 21 '18 at 22:10
1

I have settled on using XRDP to get full-screen GUI for Linux guests running on Windows 10 Hyper-V hosts. It is functional but still not as performent as VMware Workstation. Install xrdp and xrdp-sesman, start the services. Then you can connect from your host to the guest using Windows' RDP client.

Most current distributions should work with XRDP out of the box as installed by the package manager. CentOS 7 requires that you have gnome-session-classic installed via yum for XRDP to work even if you are using a different DE.

Clipboard sharing works and you can resize the screen to full-screen. Performance is sluggish but OK for general use.

If you happen to be using Vagrant, once you've install XRDP then you can use vagrant rdp to connect from the host.

1

Go to the Hyper-V Settings then Physical GPUs then uncheck the RemoteFX settings.enter image description here

0
 sudo sed -i 's/"quiet splash"/"quiet splash video=hyperv_fb:1920x1080"/g' /etc/default/grub && sudo update-grub && sudo reboot

It will do the magic be careful it will also reboot after setting the screen for hyper-v.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.