From 02777231ff477ecdcb33265ccd108e5ce38d7b03 Mon Sep 17 00:00:00 2001 From: Travis Rhoden Date: Tue, 4 Aug 2020 20:23:48 -0600 Subject: [PATCH] Disable Hyper-V KVP daemon for Ubuntu AMI When launching Ubuntu 18.04 AMIs, it can be seen from the console output that that a kernel daemon fails on startup, with the name "Dependency failed for Hyper-V KVP Protocol Daemon." This adds over 60 seconds of boot time to the instance. Since AMIs are only running on AWS, there is no need for a Hyper-V daemon, and it can safely be disabled. The same steps were taken for OVAs/ESX images months ago. --- images/capi/ansible/roles/providers/tasks/aws.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/images/capi/ansible/roles/providers/tasks/aws.yml b/images/capi/ansible/roles/providers/tasks/aws.yml index 1aa14dd4ab..0291fdd2f0 100644 --- a/images/capi/ansible/roles/providers/tasks/aws.yml +++ b/images/capi/ansible/roles/providers/tasks/aws.yml @@ -27,8 +27,8 @@ state: present with_items: - https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm - when: - - ansible_os_family == "RedHat" + when: + - ansible_os_family == "RedHat" - ansible_distribution != "Amazon" - name: install aws agents RPM @@ -57,3 +57,10 @@ state: started enabled: yes when: ansible_distribution == "Ubuntu" + +- name: Disable Hyper-V KVP protocol daemon on Ubuntu + systemd: + name: hv-kvp-daemon + state: stopped + enabled: false + when: ansible_os_family == "Debian"