Common problems and solutions fer the azlin restore command.
Start with these commands:
# Check platform detection
azlin restore --dry-run
# Verify VMs are running
azlin list
# Check configuration
azlin config show
# Test SSH connectivity
ssh -i ~/.ssh/id_rsa azureuser@<vm-ip>Error: No running VMs found in resource group
Run 'azlin list' to see available VMs
Cause 1: No VMs are running
# Check VM status
azlin list --all
# Start VMs
azlin start my-vmCause 2: Wrong resource group
# Check default resource group in config
cat ~/.azlin/config.toml | grep default_resource_group
# Override resource group
azlin restore --resource-group correct-rgCause 3: Azure authentication expired
# Re-authenticate
az login
# Verify access
az vm list --output tableError launching terminals: Terminal launch failed
Check terminal configuration in ~/.azlin/config.toml
Cause: AppleScript execution disabled
# Enable accessibility permissions
# System Preferences → Security & Privacy → Privacy → Automation
# Check "Terminal" and "azlin"
# Test manual open
open -a TerminalCause: Terminal.app not in default location
# Find Terminal.app
mdfind "kMDItemFSName == 'Terminal.app'"
# Force using macOS terminal
azlin restore --terminal macos_terminalCause: Windows Terminal not installed
# Install Windows Terminal
winget install Microsoft.WindowsTerminal
# Verify installation
where wtCause: wt.exe not in PATH
# Add to PATH temporarily
$env:Path += ";C:\Users\$env:USERNAME\AppData\Local\Microsoft\WindowsApps"
# Or add permanent path in config
@"
windows_terminal_path = "C:\Users\$env:USERNAME\AppData\Local\Microsoft\WindowsApps\wt.exe"
"@ | Out-File -Append $HOME\.azlin\config.tomlCause: Windows Terminal path not found
# Find Windows Terminal manually
find /mnt/c/Users -name "wt.exe" 2>/dev/null
# Add path to config
cat >> ~/.azlin/config.toml << 'EOF'
windows_terminal_path = "/mnt/c/Users/YourName/AppData/Local/Microsoft/WindowsApps/wt.exe"
EOFCause: Permission denied accessing Windows filesystem
# Check mount permissions
mount | grep /mnt/c
# Remount with correct permissions (temporary)
sudo mount -o remount,rw /mnt/cCause: gnome-terminal not installed
# Ubuntu/Debian
sudo apt install gnome-terminal
# Fedora
sudo dnf install gnome-terminal
# Verify
which gnome-terminalCause: DISPLAY variable not set
# Check DISPLAY
echo $DISPLAY
# Set if missing
export DISPLAY=:0
# Make permanent
echo 'export DISPLAY=:0' >> ~/.bashrcTerminal opens but SSH connection fails
ssh: connect to host 10.0.1.4 port 22: Connection refused
Cause 1: Wrong SSH key
# Verify SSH key exists
ls -la ~/.ssh/id_rsa
# Test SSH connection manually
ssh -i ~/.ssh/id_rsa azureuser@<vm-ip>
# Update config with correct key path
cat >> ~/.azlin/config.toml << 'EOF'
ssh_key_path = "~/.ssh/correct_key"
EOFCause 2: SSH key permissions too open
# Fix permissions
chmod 600 ~/.ssh/id_rsa
chmod 700 ~/.ssh
# Test again
azlin restoreCause 3: Wrong username
# Check VM configuration
azlin config show
# Override in config
cat >> ~/.azlin/config.toml << 'EOF'
default_ssh_user = "azureuser" # or your custom username
EOFCause 4: VM not accessible (firewall/NSG)
# Check VM network settings
az vm show --name my-vm --resource-group my-rg --query "networkProfile"
# Test connectivity
ping <vm-ip>
nc -zv <vm-ip> 22
# Check NSG rules
az network nsg rule list --nsg-name my-nsg --resource-group my-rg --output tableTerminal opens but shows:
error connecting to /tmp/tmux-1000/default (No such file or directory)
Cause 1: Tmux not installed on VM
# SSH to VM manually
ssh -i ~/.ssh/id_rsa azureuser@<vm-ip>
# Install tmux
sudo apt install tmux # Ubuntu/Debian
sudo yum install tmux # RHEL/CentOSCause 2: Wrong session name
# Check existing sessions on VM
ssh -i ~/.ssh/id_rsa azureuser@<vm-ip> tmux list-sessions
# Update config with correct session name
cat >> ~/.azlin/config.toml << 'EOF'
[session_names]
"my-vm" = "correct-session-name"
EOFCause 3: Stale tmux socket
# SSH to VM
ssh -i ~/.ssh/id_rsa azureuser@<vm-ip>
# Kill tmux server
tmux kill-server
# Retry restore
azlin restoreWindows Terminal opens but only shows one tab
Expected: 3 tabs for 3 VMs
Actual: 1 tab
Cause 1: Multi-tab disabled in config
# Check config
cat ~/.azlin/config.toml | grep terminal_multi_tab
# Enable multi-tab
cat >> ~/.azlin/config.toml << 'EOF'
terminal_multi_tab = true
EOFCause 2: Windows Terminal version too old
# Check version
wt --version
# Update Windows Terminal
winget upgrade Microsoft.WindowsTerminalCause 3: WSL path issues
# Check Windows Terminal path
ls -la /mnt/c/Users/*/AppData/Local/Microsoft/WindowsApps/wt.exe
# Update path in config if wrong
cat >> ~/.azlin/config.toml << 'EOF'
windows_terminal_path = "/mnt/c/Users/YourName/AppData/Local/Microsoft/WindowsApps/wt.exe"
EOFError: Terminal launch timed out after 30 seconds
Cause 1: Slow network connection
# Increase timeout in config
cat >> ~/.azlin/config.toml << 'EOF'
restore_timeout = 90 # 90 seconds
EOFCause 2: VM slow to respond
# Check VM is fully booted
azlin status my-vm
# Wait fer VM to fully start
azlin wait my-vm
# Retry restore
azlin restoreCause 3: WSL overhead
# WSL has additional overhead, increase timeout
cat >> ~/.azlin/config.toml << 'EOF'
restore_timeout = 120 # 2 minutes fer WSL
EOFWarning: 2 sessions failed to launch
Successfully restored 1 out of 3 sessions
Cause: Some VMs unreachable
# Check which VMs failed
azlin restore --dry-run
# Test each VM individually
azlin connect vm-1 # Works
azlin connect vm-2 # Fails
azlin connect vm-3 # Works
# Focus on failed VM
ssh -v -i ~/.ssh/id_rsa azureuser@<vm-2-ip>
# Look fer errors in verbose outputUsing default configuration (auto-detected)
Expected: Custom config from ~/.azlin/config.toml
Cause 1: Config file doesn't exist
# Check if config exists
ls -la ~/.azlin/config.toml
# Create if missing
mkdir -p ~/.azlin
touch ~/.azlin/config.tomlCause 2: Config file syntax error
# Validate TOML syntax
python3 -c "import tomli; tomli.loads(open('~/.azlin/config.toml').read())"
# Check fer common errors:
# - Missing quotes around strings
# - Wrong section names
# - Duplicate keysCause 3: Config file permissions
# Fix permissions
chmod 644 ~/.azlin/config.toml
# Verify readable
cat ~/.azlin/config.tomlDetecting platform: Linux
Expected: WSL
Cause: WSL detection failed
# Check WSL markers
cat /proc/version | grep -i microsoft
# Force platform in config
cat >> ~/.azlin/config.toml << 'EOF'
platform_override = "wsl"
terminal_launcher = "windows_terminal"
EOF| Problem | Command | Expected Output |
|---|---|---|
| No VMs | azlin list |
Shows running VMs |
| Platform detection | azlin restore --dry-run |
Shows correct platform |
| Config loading | azlin config show |
Shows config values |
| SSH connectivity | ssh -i ~/.ssh/id_rsa user@ip |
SSH prompt |
| Terminal available | which gnome-terminal / where wt |
Path to terminal |
| Tmux on VM | ssh user@ip tmux list-sessions |
List of sessions |
If yer issue isn't covered here:
-
Run diagnostic mode:
azlin restore --dry-run --verbose
-
Check logs:
# macOS/Linux cat ~/.azlin/logs/restore.log # Windows type %USERPROFILE%\.azlin\logs\restore.log
-
File an issue:
- Include output from
azlin restore --dry-run - Include platform (macOS/Windows/WSL/Linux)
- Include error messages
- Include config file (redact sensitive info)
- Include output from