All new azlin VMs automatically install Claude Code during initial provisioning via cloud-init. This ensures developers have immediate access to AI-powered coding assistance when connecting to VMs.
Claude Code is installed using the official install script:
curl -fsSL https://claude.ai/install.sh | bashThis installation:
- Runs during VM creation (cloud-init phase)
- Executes as the
azureuseruser - Installs Claude Code to
~/.local/bin/claude - Automatically adds Claude Code to PATH
- Completes before the VM is accessible via SSH
After SSH'ing into a new VM, verify Claude Code is installed:
claude --versionExpected output:
Claude Code CLI version X.Y.Z
Launch Claude Code interactively:
claudeOr use specific commands:
claude chat
claude codeIf claude command is not found after VM creation:
-
Check if installation completed successfully:
tail -100 /var/log/cloud-init-output.log | grep -i claude -
Verify binary exists:
ls -la ~/.local/bin/claude -
Check PATH configuration:
echo $PATH | grep .local/bin
-
If needed, manually add to PATH:
export PATH="$HOME/.local/bin:$PATH" echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
Location: src/azlin/vm_provisioning.py
Method: _generate_cloud_init()
The installation command is added to the runcmd section of the cloud-init YAML, executed after other development tools (Docker, Azure CLI, GitHub CLI, etc.) are installed.