lorax-composer: Add cloud-init support to the vhd image
This adds cloud-init support to the vhd image. Also limits the cloud-init datasource to Azure, and includes cloud-utils-growpart to expand the filesystem to fit the available space. Resolves: rhbz#1754711
This commit is contained in:
parent
cc689c0cb9
commit
f7688f9c8d
@ -23,7 +23,7 @@ bootloader --location=mbr --append="no_timer_check console=ttyS0,115200n8 earlyp
|
|||||||
reqpart --add-boot
|
reqpart --add-boot
|
||||||
|
|
||||||
# Basic services
|
# Basic services
|
||||||
services --enabled=sshd,chronyd,waagent
|
services --enabled=sshd,chronyd,waagent,cloud-init,cloud-init-local,cloud-config,cloud-final
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Remove random-seed
|
# Remove random-seed
|
||||||
@ -47,6 +47,19 @@ PEERDNS=yes
|
|||||||
IPV6INIT=no
|
IPV6INIT=no
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Restrict cloud-init to Azure datasource
|
||||||
|
cat > /etc/cloud/cloud.cfg.d/91-azure_datasource.cfg << EOF
|
||||||
|
# Azure Data Source config
|
||||||
|
datasource_list: [ Azure ]
|
||||||
|
datasource:
|
||||||
|
Azure:
|
||||||
|
apply_network_config: False
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Setup waagent to work with cloud-init
|
||||||
|
sed -i 's/Provisioning.Enabled=y/Provisioning.Enabled=n/g' /etc/waagent.conf
|
||||||
|
sed -i 's/Provisioning.UseCloudInit=n/Provisioning.UseCloudInit=y/g' /etc/waagent.conf
|
||||||
|
|
||||||
# Add Hyper-V modules into initramfs
|
# Add Hyper-V modules into initramfs
|
||||||
cat > /etc/dracut.conf.d/10-hyperv.conf << EOF
|
cat > /etc/dracut.conf.d/10-hyperv.conf << EOF
|
||||||
add_drivers+=" hv_vmbus hv_netvsc hv_storvsc "
|
add_drivers+=" hv_vmbus hv_netvsc hv_storvsc "
|
||||||
@ -66,9 +79,11 @@ selinux-policy-targeted
|
|||||||
chrony
|
chrony
|
||||||
|
|
||||||
WALinuxAgent
|
WALinuxAgent
|
||||||
|
|
||||||
# Requirements of WALinuxAgent
|
|
||||||
python3
|
python3
|
||||||
net-tools
|
net-tools
|
||||||
|
|
||||||
|
cloud-init
|
||||||
|
cloud-utils-growpart
|
||||||
|
gdisk
|
||||||
|
|
||||||
# NOTE lorax-composer will add the recipe packages below here, including the final %end
|
# NOTE lorax-composer will add the recipe packages below here, including the final %end
|
||||||
|
Loading…
Reference in New Issue
Block a user