> ## Documentation Index
> Fetch the complete documentation index at: https://phalanetwork.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Update, roll back, and tear down safely

> Monitor Your Application

## Step 7:

Monitor and troubleshoot

### View Logs

**From the Web Interface:**

1. Open VMM dashboard at `http://localhost:9080`
2. Click on your deployment
3. Go to the **"Logs"** tab for real-time logs

**From the CLI:**

```bash theme={null}
# Stream logs in real-time
python3 vmm-cli.py --url http://localhost:8080 logs <vm-id> --follow

# Get last 100 lines
python3 vmm-cli.py --url http://localhost:8080 logs <vm-id> --lines 100
```

**Direct HTTP API:**

```bash theme={null}
curl 'http://<app-id>.app.example.com:9090/logs/<container_name>?follow=true&text=true&timestamps=true'
```

### Check Application Status

```bash theme={null}
# List all VMs and their status
python3 vmm-cli.py --url http://localhost:8080 lsvm --verbose

# List available images
python3 vmm-cli.py --url http://localhost:8080 lsimage
```

### VM Management

```bash theme={null}
# Start a VM
python3 vmm-cli.py --url http://localhost:8080 start <vm-id>

# Stop a VM
python3 vmm-cli.py --url http://localhost:8080 stop <vm-id>

# Remove a VM
python3 vmm-cli.py --url http://localhost:8080 remove <vm-id>
```

***

## Common Issues & Solutions

### Application fails to start

```bash theme={null}
# Check VM logs for errors
python3 vmm-cli.py --url http://localhost:8080 logs <vm-id>

# Verify VM status
python3 vmm-cli.py --url http://localhost:8080 lsvm -v
```

### Cannot access application URL

```bash theme={null}
# Check if VM is running
python3 vmm-cli.py --url http://localhost:8080 lsvm

# Test connectivity
curl -I https://<app-id>.example.com

# Check gateway VM logs (find gateway VM ID first)
python3 vmm-cli.py --url http://localhost:8080 logs <gateway-vm-id> --follow
```

### Attestation verification fails

1. Ensure the CVM is fully initialized
2. Verify TDX is enabled on your hardware
3. Check app endpoint is accessible via Unix socket

***

## What You've Accomplished

✅ **Deployed** an application to a Trusted Execution Environment\
✅ **Verified** it's running securely with attestation\
✅ **Accessed** it through secure HTTPS endpoints\
✅ **Monitored** logs and system status

**Next Steps:**

* Deploy more applications: [Deploying Applications guide](/docs/getting-started/first-deployment-steps/deploying-applications.mdx)
* Get help: [Community](/docs/community-section/community.mdx)

***
