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-initI 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 rebootI have had no luck with these methods. Is there another way to enable fullscreen mode?
66 Answers
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
No other way worked for me except setting the screen size explicitly following this video: (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.
2This 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
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):bashapt-get update apt-get install linux-virtual-lts-xenialTo install the virtual HWE kernel on 14.04, run the following commands as root (or
sudo): bashapt-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-trustyOn 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-xenialTo 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-xenialTo 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-trustyWhenever 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-virtualOn 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-virtualWhenever 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/EFICopy the ubuntu directory in to a new directory named boot: bash
sudo cp -r ubuntu/ bootChange directory to the newly created boot directory: bash
cd bootRename the shimx64.efi file: bash
sudo mv shimx64.efi bootx64.efiThere is also this: that I found useful.
Update
New sources, check out these links:
Discussion with Linux Kernel Developer
Set VM-Video in PowerShell
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 RDPto 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
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.
Go to the Hyper-V Settings then Physical GPUs then uncheck the RemoteFX settings.
sudo sed -i 's/"quiet splash"/"quiet splash video=hyperv_fb:1920x1080"/g' /etc/default/grub && sudo update-grub && sudo rebootIt will do the magic be careful it will also reboot after setting the screen for hyper-v.