Hyperv Debian + UEFI
This commit is contained in:
@@ -28,12 +28,22 @@ autoinstall:
|
||||
allow-pw: yes
|
||||
user-data:
|
||||
disable_root: false
|
||||
package_update: false # These will be done by Ansible after install
|
||||
package_update: false
|
||||
package_upgrade: false
|
||||
late-commands:
|
||||
- echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant
|
||||
- echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >> /target/etc/sudoers.d/vagrant
|
||||
- chmod 440 /target/etc/sudoers.d/vagrant
|
||||
- >-
|
||||
curtin in-target --target=/target --
|
||||
bash -c 'if [ "$(systemd-detect-virt)" == "microsoft" ]; then
|
||||
apt-get update;
|
||||
apt-get install -y linux-azure;
|
||||
fi'
|
||||
# There is no efibootmgr in the install CD, so we need in-target to fetch the data first
|
||||
- |-
|
||||
TARGET="$(curtin in-target --target=/target -- efibootmgr | grep -i ubuntu | awk '{print $1}' | sed -E 's/[^0-9]//g')"
|
||||
curtin in-target --target=/target -- efibootmgr --bootnext "${TARGET}"
|
||||
- curtin in-target --target=/target -- logger "finished late-commands"
|
||||
packages:
|
||||
- ca-certificates
|
||||
|
||||
Reference in New Issue
Block a user