Skip to content

Commit 7ae5f4c

Browse files
[Doc-a-THon] Updating OpenBSD VHD
Added `doas` at the beginning on several commands under the block code section. Added a note for deprovisioning process.
1 parent 225ed24 commit 7ae5f4c

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

articles/virtual-machines/linux/create-upload-openbsd.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,57 +31,59 @@ On the VM where you installed the OpenBSD operating system 6.1, which added Hype
3131
1. If DHCP is not enabled during installation, enable the service as follows:
3232

3333
```sh
34-
echo dhcp > /etc/hostname.hvn0
34+
doas echo dhcp > /etc/hostname.hvn0
3535
```
3636

3737
2. Set up a serial console as follows:
3838

3939
```sh
40-
echo "stty com0 115200" >> /etc/boot.conf
41-
echo "set tty com0" >> /etc/boot.conf
40+
doas echo "stty com0 115200" >> /etc/boot.conf
41+
doas echo "set tty com0" >> /etc/boot.conf
4242
```
4343

4444
3. Configure Package installation as follows:
4545

4646
```sh
47-
echo "https://ftp.openbsd.org/pub/OpenBSD" > /etc/installurl
47+
doas echo "https://ftp.openbsd.org/pub/OpenBSD" > /etc/installurl
4848
```
4949

5050
4. By default, the `root` user is disabled on virtual machines in Azure. Users can run commands with elevated privileges by using the `doas` command on OpenBSD VM. Doas is enabled by default. For more information, see [doas.conf](https://man.openbsd.org/doas.conf.5).
5151

5252
5. Install and configure prerequisites for the Azure Agent as follows:
5353

5454
```sh
55-
pkg_add py-setuptools openssl git
56-
ln -sf /usr/local/bin/python2.7 /usr/local/bin/python
57-
ln -sf /usr/local/bin/python2.7-2to3 /usr/local/bin/2to3
58-
ln -sf /usr/local/bin/python2.7-config /usr/local/bin/python-config
59-
ln -sf /usr/local/bin/pydoc2.7  /usr/local/bin/pydoc
55+
doas pkg_add py-setuptools openssl git
56+
doas ln -sf /usr/local/bin/python2.7 /usr/local/bin/python
57+
doas ln -sf /usr/local/bin/python2.7-2to3 /usr/local/bin/2to3
58+
doas ln -sf /usr/local/bin/python2.7-config /usr/local/bin/python-config
59+
doas ln -sf /usr/local/bin/pydoc2.7 /usr/local/bin/pydoc
6060
```
6161

6262
6. The latest release of the Azure agent can always be found on [GitHub](https://github.com/Azure/WALinuxAgent/releases). Install the agent as follows:
6363

6464
```sh
65-
git clone https://github.com/Azure/WALinuxAgent
66-
cd WALinuxAgent
67-
python setup.py install
68-
waagent -register-service
65+
doas git clone https://github.com/Azure/WALinuxAgent
66+
doas cd WALinuxAgent
67+
doas python setup.py install
68+
doas waagent -register-service
6969
```
7070

7171
> [!IMPORTANT]
7272
> After you install Azure Agent, it's a good idea to verify that it's running as follows:
7373
>
74-
> ```bash
75-
> ps auxw | grep waagent
74+
> ```sh
75+
> doas ps auxw | grep waagent
7676
> root 79309 0.0 1.5 9184 15356 p1 S 4:11PM 0:00.46 python /usr/local/sbin/waagent -daemon (python2.7)
77-
> cat /var/log/waagent.log
77+
> doas cat /var/log/waagent.log
7878
> ```
7979

80-
7. Deprovision the system to clean it and make it suitable for reprovisioning. The following command also deletes the last provisioned user account and the associated data:
80+
7. Deprovision the system to clean it and make it suitable for deprovisioning. The following command also deletes the last provisioned user account and the associated data:
8181

8282
```sh
83-
waagent -deprovision+user -force
83+
doas waagent -deprovision+user -force
8484
```
85+
> [!NOTE]
86+
> If you are migrating a specific virtual machine and do not wish to create a generalized image, skip the deprovision step.
8587

8688
Now you can shut down your VM.
8789

0 commit comments

Comments
 (0)