linux - Debian Jessie VM on Hyper-V needs two restarts before hyperv_daemons start -
i'm trying create debian (jessie) vm on hyper-v using packer, preseed file late_command install hyperv_daemons, described here: https://wiki.xdroop.com/space/debian/jessie/hyper-v+integration
the problem that, when vm reboots after install, daemons not seem running, hyper-v can't see vm's ip address, can't ssh it, deletes after timeout.
if manually turn vm off , on again [sic] when restarts, hyper-v magically able access ip address , packer build completes.
the relevant preseed command is:
d-i preseed/late_command string \ echo '#!/bin/bash' > /target/usr/bin/hv_get_dhcp_info ; \ echo 'if_file="/etc/network/interfaces"' >> /target/usr/bin/hv_get_dhcp_info ; \ echo 'dhcp=$(grep "$1 inet dhcp" $if_file 2>/dev/null)' >> /target/usr/bin/hv_get_dhcp_info ; \ echo 'if [ "$dhcp" != "" ];' >> /target/usr/bin/hv_get_dhcp_info ; \ echo 'then' >> /target/usr/bin/hv_get_dhcp_info ; \ echo 'echo "enabled"' >> /target/usr/bin/hv_get_dhcp_info ; \ echo 'else' >> /target/usr/bin/hv_get_dhcp_info ; \ echo 'echo "disabled"' >> /target/usr/bin/hv_get_dhcp_info ; \ echo 'fi' >> /target/usr/bin/hv_get_dhcp_info ; \ chmod +x /usr/bin/hv_get_dhcp_info ; \ echo '#!/bin/bash' > /target/usr/bin/hv_get_dns_info ; \ echo "cat /etc/resolv.conf 2>/dev/null | awk '/^nameserver/ { print $2 }'" >> /target/usr/bin/hv_get_dns_info ; \ chmod +x /usr/bin/hv_get_dns_info ; \ echo 'deb http://http.debian.net/debian jessie-backports main' > /target/etc/apt/sources.list.d/backports.list ; \ in-target apt-get update ; \ in-target apt-get install hyperv-daemons d-i finish-install/reboot_in_progress note
how can either perform second reboot automatically, or make work without?
update:
looks problem hyper-v, see last comment here:
Comments
Post a Comment