Last active
December 22, 2019 15:32
-
-
Save agrawalreetika/92964461a827b87613c2b83f981a60d7 to your computer and use it in GitHub Desktop.
This script is used for cloud init installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum makecache fast | |
sudo yum install -y gdisk cloud-utils-growpart | |
sudo yum install -y cloud-init | |
sudo sed -i 's/Provisioning.Enabled=y/Provisioning.Enabled=n/g' /etc/waagent.conf | |
sudo sed -i 's/Provisioning.UseCloudInit=n/Provisioning.UseCloudInit=y/g' /etc/waagent.conf | |
sudo sed -i 's/ResourceDisk.Format=y/ResourceDisk.Format=n/g' /etc/waagent.conf | |
sudo sed -i 's/ResourceDisk.EnableSwap=y/ResourceDisk.EnableSwap=n/g' /etc/waagent.conf | |
sudo cloud-init clean | |
echo "datasource_list: [ Azure ]" > /etc/cloud/cloud.cfg.d/91-azure_datasource.cfg | |
#De-provision the VM | |
sudo waagent -deprovision -force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment