2929PATH=" /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
3030# set -x
3131# exec 3>&0 4>&1 > /var/log/test.log 2>&1
32+ # start hv_kvp daemon
33+ /usr/sbin/hv_kvp_daemon
3234
3335# Fix haproxy directory issue
3436mkdir -p /var/lib/haproxy
@@ -134,7 +136,9 @@ get_boot_params() {
134136 # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon
135137 # waiting for the hv_kvp_daemon to start up
136138 # sleep 30 need to fix the race condition of hv_kvp_daemon and cloud-early-config
139+ sleep 5
137140 cp -f /var/opt/hyperv/.kvp_pool_0 /var/cache/cloud/cmdline
141+ cat /dev/null > /var/opt/hyperv/.kvp_pool_0
138142 ;;
139143 esac
140144
987991 fi
988992 if [ -n " $MGMTNET " -a -n " $LOCAL_GW " ]
989993 then
990- if [ " $hyp " == " vmware" ]
994+ if [ " $hyp " == " vmware" ] || [ " $hyp " == " hyperv " ] ;
991995 then
992996 ip route add $MGMTNET via $LOCAL_GW dev eth0
993997
@@ -1087,7 +1091,7 @@ setup_secstorage() {
10871091
10881092 cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4
10891093 cp /etc/iptables/iptables-secstorage /etc/iptables/rules
1090- if [ " $hyp " == " vmware" ]; then
1094+ if [ " $hyp " == " vmware" ] || [ " $hyp " == " hyperv " ] ; then
10911095 setup_sshd $ETH1_IP " eth1"
10921096 else
10931097 setup_sshd $ETH0_IP " eth0"
@@ -1113,7 +1117,7 @@ setup_console_proxy() {
11131117 echo " $public_ip $NAME " >> /etc/hosts
11141118 cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4
11151119 cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules
1116- if [ " $hyp " == " vmware" ]; then
1120+ if [ " $hyp " == " vmware" ] || [ " $hyp " == " hyperv " ] ; then
11171121 setup_sshd $ETH1_IP " eth1"
11181122 else
11191123 setup_sshd $ETH0_IP " eth0"
0 commit comments