Short version: See docs.microsoft.com link below.
sudo apt-get update
sudo apt-get install linux-image-virtual linux-tools-virtual linux-cloud-tools-virtual
sudo apt-get update
sudo apt-get install linux-virtual-lts-xenial linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial
To confirm run systemctl status hv-fcopy-daemon.service
and you will see output
similar to this:
● hv-fcopy-daemon.service - Hyper-V File Copy Protocol Daemon
Loaded: loaded (/lib/systemd/system/hv-fcopy-daemon.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2018-06-30 13:37:34 CDT; 11min ago
Process: 718 ExecStart=/usr/sbin/hv_fcopy_daemon -n (code=exited, status=2)
Main PID: 718 (code=exited, status=2)
Jun 30 13:37:34 ubuntu-1604-test hv_fcopy_daemon[718]: WARNING: hv_fcopy_daemon not found for kernel 4.13.0-45
Jun 30 13:37:34 ubuntu-1604-test hv_fcopy_daemon[718]: You may need to install the following packages for this specific kernel:
Jun 30 13:37:34 ubuntu-1604-test hv_fcopy_daemon[718]: linux-tools-4.13.0-45-generic
Jun 30 13:37:34 ubuntu-1604-test hv_fcopy_daemon[718]: linux-cloud-tools-4.13.0-45-generic
Jun 30 13:37:34 ubuntu-1604-test hv_fcopy_daemon[718]: You may also want to install one of the following packages to keep up to date:
Jun 30 13:37:34 ubuntu-1604-test hv_fcopy_daemon[718]: linux-tools-generic
Jun 30 13:37:34 ubuntu-1604-test hv_fcopy_daemon[718]: linux-cloud-tools-generic
Jun 30 13:37:34 ubuntu-1604-test systemd[1]: hv-fcopy-daemon.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 30 13:37:34 ubuntu-1604-test systemd[1]: hv-fcopy-daemon.service: Unit entered failed state.
Jun 30 13:37:34 ubuntu-1604-test systemd[1]: hv-fcopy-daemon.service: Failed with result 'exit-code'.
Explanation:
When installing later releases of Ubuntu 16.04 (e.g., .3, .4, etc) a newer kernel is included. This kernel is set as the active kernel and will not work with the "tools" packages installed by following the earlier instructions.
To fix this, you have to either downgrade to the LTS kernel or install the "tools" packages for the active version of the kernel like so:
sudo apt-get update
export running_kernel=$(uname -r); sudo apt-get install linux-tools-${running_kernel} linux-cloud-tools-${running_kernel}
sudo reboot
An alternative for step 2 is to run:
sudo apt-get install -s linux-cloud-tools-generic-hwe-16.04 linux-tools-generic-hwe-16.04
Result:
ubuntu@ubuntu-1604-test:~$ dpkg -l | grep linux | grep -E "image|tools" | awk '{print $2, $3}' | sort
linux-base 4.5ubuntu1~16.04.1
linux-cloud-tools-4.13.0-45-generic 4.13.0-45.50~16.04.1
linux-cloud-tools-4.4.0-128 4.4.0-128.154
linux-cloud-tools-4.4.0-128-generic 4.4.0-128.154
linux-cloud-tools-common 4.4.0-128.154
linux-cloud-tools-generic 4.4.0.128.134
linux-cloud-tools-virtual 4.4.0.128.134
linux-cloud-tools-virtual-lts-xenial 4.4.0.128.134
linux-hwe-cloud-tools-4.13.0-45 4.13.0-45.50~16.04.1
linux-hwe-tools-4.13.0-45 4.13.0-45.50~16.04.1
linux-image-4.10.0-28-generic 4.10.0-28.32~16.04.2
linux-image-4.13.0-45-generic 4.13.0-45.50~16.04.1
linux-image-4.4.0-128-generic 4.4.0-128.154
linux-image-extra-4.10.0-28-generic 4.10.0-28.32~16.04.2
linux-image-extra-4.13.0-45-generic 4.13.0-45.50~16.04.1
linux-image-generic-hwe-16.04 4.13.0.45.64
linux-image-virtual 4.4.0.128.134
linux-signed-image-4.13.0-45-generic 4.13.0-45.50~16.04.1
linux-signed-image-generic-hwe-16.04 4.13.0.45.64
linux-tools-4.13.0-45-generic 4.13.0-45.50~16.04.1
linux-tools-4.4.0-128 4.4.0-128.154
linux-tools-4.4.0-128-generic 4.4.0-128.154
linux-tools-common 4.4.0-128.154
linux-tools-generic 4.4.0.128.134
linux-tools-virtual 4.4.0.128.134
linux-tools-virtual-lts-xenial 4.4.0.128.134
By default the screen size is small ...
- Open Terminal
- Type:
sudo nano /etc/default/grub
- Find the line starting with
GRUB_CMDLINE_LINUX_DEFAULT
, and addvideo=hyperv_fb:DESIRED_RESOLUTION
. The resolution I want is1280x720
. So my line ends up looking like this:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1280x720"
- Write the changes and quit nano.
- Run:
sudo update-grub
- Reboot the virtual machine
The resolution should now be set as specified.
- Open Terminal
- Type:
sudo nano /etc/default/grub
- Find the line starting with
GRUB_CMDLINE_LINUX_DEFAULT
, and addelevator=noop
. My line ends up looking like this:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1280x720 elevator=noop"
- Write the changes and quit nano.
- Run:
sudo update-grub
- Reboot the virtual machine
Future tweaks will likely be applied to the content in the https://github.com/deoren/config-files repo only.