Reorganize repository structure and clean up documentation
Clean up and organize the flask-shopdb repository for better maintainability and discoverability: ## Changes - Update .gitignore for build artifacts (publish/, data/, 122M total) - Reorganize .claude/ into 6 subdirectories with README navigation - Consolidate overlapping MCP setup guides into MCP-QUICK-START.md - Move deployment docs from root to docs/deployment/ - Archive dated status reports to .claude/archived/ - Delete temporary files (logs, backups, empty reports, ~50K) ## New Structure .claude/ organized into: - setup/ - MCP, VM, Hyper-V, GitHub setup guides + scripts (17 files) - plans/ - Feature plans and protocols (5 files) - maintenance/ - Deployment checklists and reports (4 files) - archived/ - Historical documentation (9 files) - skills/ - Claude Code automation (5 files) - workflows/ - Security audit workflow (1 file) docs/deployment/ created with 6 deployment guides: - LOCAL-DEV-SETUP.md, DOCKER-SETUP.md, DOCKER-PREBUILT-APPROACH.md - PRODUCTION-READINESS.md, DEPLOY-TO-VM.md, README.md Root directory cleaned to essential docs only: - CLAUDE.md, README.md, CONTRIBUTING.md, CHANGELOG.md Benefits: - Clear navigation via README.md in each subdirectory - No duplicate/overlapping documentation - Large artifacts properly gitignored (won't bloat repository) - Historical context preserved in archived/ See .claude/CLEANUP-SUMMARY.md for complete details. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
245
.claude/archived/ACTIVATE-HYPERV-PERMS.md
Normal file
245
.claude/archived/ACTIVATE-HYPERV-PERMS.md
Normal file
@@ -0,0 +1,245 @@
|
||||
# Activating Hyper-V Permissions
|
||||
|
||||
You've been added to "Hyper-V Administrators" group, but permissions haven't taken effect yet.
|
||||
|
||||
---
|
||||
|
||||
## Current Status
|
||||
|
||||
**Group membership:** ✓ Added to "Hyper-V Administrators"
|
||||
**Active permissions:** ✗ Not yet active in current session
|
||||
**Reason:** Group membership changes require logoff/logon to update security token
|
||||
|
||||
---
|
||||
|
||||
## What's Happening
|
||||
|
||||
When you log in to Windows, your **security token** is created with your current group memberships. Adding you to a new group doesn't update the token of existing sessions - you need to:
|
||||
|
||||
1. Log off
|
||||
2. Log back in
|
||||
3. New security token includes the new group
|
||||
|
||||
---
|
||||
|
||||
## How to Activate
|
||||
|
||||
### Option 1: Log Off and Back On (Recommended)
|
||||
|
||||
```
|
||||
1. Save all work
|
||||
2. Close all applications
|
||||
3. Press Ctrl+Alt+Del -> Sign out
|
||||
4. Log back in as 270015376
|
||||
5. Open new terminal
|
||||
6. Test: Get-VM
|
||||
```
|
||||
|
||||
**This activates the permissions for ALL applications.**
|
||||
|
||||
### Option 2: Just Restart Claude Code Session
|
||||
|
||||
```
|
||||
1. Close Claude Code completely
|
||||
2. Close the terminal/shell it was running in
|
||||
3. Open NEW terminal
|
||||
4. cd C:\Users\270015376\Documents\github\flask-shopdb
|
||||
5. claude
|
||||
```
|
||||
|
||||
**This may work if your terminal was opened after group membership was added, but often you still need Option 1.**
|
||||
|
||||
### Option 3: Use RunAs (For This Session Only)
|
||||
|
||||
```powershell
|
||||
# Run PowerShell as yourself with fresh token
|
||||
runas /user:AEROAD\270015376 "powershell.exe"
|
||||
# Enter your password
|
||||
# In new PowerShell window:
|
||||
Get-VM # Should work
|
||||
```
|
||||
|
||||
**This creates a new process with fresh token, but isolated from current session.**
|
||||
|
||||
---
|
||||
|
||||
## Verification Steps
|
||||
|
||||
### After Logging Off/On
|
||||
|
||||
**1. Check group membership is active in token:**
|
||||
```bash
|
||||
whoami /groups | findstr "Hyper-V"
|
||||
```
|
||||
|
||||
Expected output:
|
||||
```
|
||||
BUILTIN\Hyper-V Administrators Group ...
|
||||
```
|
||||
|
||||
**2. Test Hyper-V cmdlet:**
|
||||
```powershell
|
||||
Get-VM
|
||||
```
|
||||
|
||||
Expected: List of VMs (no permission error)
|
||||
|
||||
**3. Test snapshot cmdlet:**
|
||||
```powershell
|
||||
Get-VMSnapshot -VMName *
|
||||
```
|
||||
|
||||
Expected: List of snapshots or "no snapshots found"
|
||||
|
||||
**4. Re-run MCP test suite:**
|
||||
```powershell
|
||||
cd C:\Users\270015376\Documents\github\flask-shopdb
|
||||
.\\.claude\test-mcp-servers.ps1
|
||||
```
|
||||
|
||||
Expected: All tests pass (7/7)
|
||||
|
||||
---
|
||||
|
||||
## What Will Work After Activation
|
||||
|
||||
### PowerShell Hyper-V Cmdlets
|
||||
|
||||
```powershell
|
||||
# View VMs
|
||||
Get-VM
|
||||
Get-VM -Name "SFTest"
|
||||
|
||||
# Start/Stop
|
||||
Start-VM -Name "SFTest"
|
||||
Stop-VM -Name "SFTest"
|
||||
|
||||
# Snapshots
|
||||
Checkpoint-VM -Name "SFTest" -SnapshotName "Baseline"
|
||||
Get-VMSnapshot -VMName "SFTest"
|
||||
Restore-VMSnapshot -Name "Baseline" -VMName "SFTest"
|
||||
Remove-VMSnapshot -Name "OldSnapshot" -VMName "SFTest"
|
||||
|
||||
# Status
|
||||
Get-VM | Select-Object Name, State, Uptime, Status
|
||||
```
|
||||
|
||||
### Automated Snapshot Scripts
|
||||
|
||||
All PowerShell snapshot operations in:
|
||||
- `VM-SNAPSHOT-GUIDE.md`
|
||||
- Custom automation scripts
|
||||
- Claude Code-driven snapshot management
|
||||
|
||||
### Test Suite
|
||||
|
||||
`test-mcp-servers.ps1` will pass all checks:
|
||||
```
|
||||
[6/7] Checking Hyper-V VMs...
|
||||
OK: Found 1 VM(s)
|
||||
- SFTest: Running
|
||||
|
||||
[7/7] Checking VM snapshots...
|
||||
OK: Found X snapshot(s)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## What Already Works (No Change)
|
||||
|
||||
These worked before and still work:
|
||||
- VM MCP via SSH (doesn't use Hyper-V API)
|
||||
- Hyper-V Manager GUI (different permission model)
|
||||
- MySQL, Gortex, Browser MCP servers
|
||||
- Database access
|
||||
- All documentation and scripts
|
||||
|
||||
---
|
||||
|
||||
## Testing After Activation
|
||||
|
||||
### Quick Test
|
||||
```powershell
|
||||
# After logging back in:
|
||||
Get-VM -Name "SFTest"
|
||||
```
|
||||
|
||||
Expected output:
|
||||
```
|
||||
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status
|
||||
---- ----- ----------- ----------------- ------ ------
|
||||
SFTest Running 2 4096 01:23:45.1234567 Operating normally
|
||||
```
|
||||
|
||||
### Full Test
|
||||
```powershell
|
||||
cd C:\Users\270015376\Documents\github\flask-shopdb
|
||||
.\\.claude\test-mcp-servers.ps1
|
||||
```
|
||||
|
||||
Expected: 7/7 tests passing (or 6/7 if VM not started)
|
||||
|
||||
---
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Still Getting Permission Error After Logoff/Logon
|
||||
|
||||
**Possible causes:**
|
||||
1. Terminal was opened before you logged off (close and reopen)
|
||||
2. PowerShell session was started before (restart PowerShell)
|
||||
3. Claude Code still using old token (restart completely)
|
||||
|
||||
**Fix:** Restart everything - new logon, new terminal, new Claude Code
|
||||
|
||||
### "Access Denied" in Hyper-V Manager
|
||||
|
||||
**This is different issue** - Hyper-V Manager uses different permission model.
|
||||
Should still work even if cmdlets don't.
|
||||
|
||||
### Group Membership Shows But Cmdlets Fail
|
||||
|
||||
**Check your token:**
|
||||
```bash
|
||||
whoami /groups | findstr "Hyper-V"
|
||||
```
|
||||
|
||||
If no output, your token doesn't have the group yet. Log off and back on.
|
||||
|
||||
---
|
||||
|
||||
## Timeline
|
||||
|
||||
1. **Now:** Group membership added ✓
|
||||
2. **After logoff/logon:** Permissions active ✓
|
||||
3. **First test:** `Get-VM` should work ✓
|
||||
4. **Full test:** Run test-mcp-servers.ps1 ✓
|
||||
|
||||
**Total downtime:** ~2 minutes for logoff/logon
|
||||
|
||||
---
|
||||
|
||||
## Documentation Updates
|
||||
|
||||
After activation, these will work as written:
|
||||
- All PowerShell examples in `VM-SNAPSHOT-GUIDE.md`
|
||||
- Automated snapshot workflows in `MCP-INTEGRATION-GUIDE.md`
|
||||
- PowerShell sections in `HYPER-V-PERMISSIONS.md`
|
||||
|
||||
No code changes needed - just activation of existing permissions.
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. **Save your work**
|
||||
2. **Log off** (Ctrl+Alt+Del -> Sign out)
|
||||
3. **Log back in** as 270015376
|
||||
4. **Open new terminal**
|
||||
5. **Test:** `Get-VM`
|
||||
6. **Re-run:** `.\\.claude\test-mcp-servers.ps1`
|
||||
7. **Celebrate:** All tests passing!
|
||||
|
||||
---
|
||||
|
||||
**Ready to log off and activate your new permissions!**
|
||||
Reference in New Issue
Block a user