Skip to content

Commit fa3186a

Browse files
fixing sudo commands
1 parent 91c8bc0 commit fa3186a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

articles/virtual-machines/linux/suse-create-upload-vhd.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ As an alternative to building your own VHD, SUSE also publishes BYOS (Bring Your
7373
7. Update waagent and cloud-init configuration
7474

7575
```console
76+
sudo -i
7677
sed -i 's/Provisioning.UseCloudInit=n/Provisioning.UseCloudInit=y/g' /etc/waagent.conf
7778
sed -i 's/Provisioning.Enabled=y/Provisioning.Enabled=n/g' /etc/waagent.conf
7879

79-
sudo sh -c 'printf "datasource:\n Azure:" > /etc/cloud/cloud.cfg.d/91-azure_datasource.cfg'
80-
sudo sh -c 'printf "reporting:\n logging:\n type: log\n telemetry:\n type: hyperv" > /etc/cloud/cloud.cfg.d/10-azure-kvp.cfg'
80+
sh -c 'printf "datasource:\n Azure:" > /etc/cloud/cloud.cfg.d/91-azure_datasource.cfg'
81+
sh -c 'printf "reporting:\n logging:\n type: log\n telemetry:\n type: hyperv" > /etc/cloud/cloud.cfg.d/10-azure-kvp.cfg'
82+
exit
8183
```
8284

8385
8. Edit the "/etc/default/grub" file to ensure console logs are sent to the serial port by adding the following line:
@@ -127,8 +129,10 @@ As an alternative to building your own VHD, SUSE also publishes BYOS (Bring Your
127129
Previously, the Azure Linux Agent was used to automatically configure swap space by using the local resource disk that is attached to the virtual machine after the virtual machine is provisioned on Azure. However this is now handled by cloud-init, you **must not** use the Linux Agent to format the resource disk or create the swap file. Use these commands to modify `/etc/waagent.conf` appropriately:
128130

129131
```console
132+
sudo -i
130133
sed -i 's/ResourceDisk.Format=y/ResourceDisk.Format=n/g' /etc/waagent.conf
131134
sed -i 's/ResourceDisk.EnableSwap=y/ResourceDisk.EnableSwap=n/g' /etc/waagent.conf
135+
exit
132136
```
133137

134138
Please see the [Linux agent configuration](/azure/virtual-machines/extensions/agent-linux#configuration) documentation for more information on the waagent.conf configuration options.

0 commit comments

Comments
 (0)