diff --git a/cdsmcp/AGENTS.md b/cdsmcp/AGENTS.md index 534bf0d..e22c680 100644 --- a/cdsmcp/AGENTS.md +++ b/cdsmcp/AGENTS.md @@ -13,6 +13,8 @@ This folder contains the VMware/vCenter + MigrateOps runbook for CDS MCP workflo - VM lookup, datastore reporting, and FC/disk assignment workflow - `docs/cmc-install-reference.md` - CMC install, uninstall, and reinstall fallback reference +- `docs/iscsi-cleanup-reference.md` + - guest-level iSCSI target cleanup reference - `docs/run-learnings.md` - run-specific learnings only when a run adds new information - `templates/vmw.yaml` @@ -25,6 +27,7 @@ This folder contains the VMware/vCenter + MigrateOps runbook for CDS MCP workflo - Use `docs/esxvm-guide.md` for direct vCenter VM hardware changes such as new disks, existing-disk attach, and PCI passthrough assignment. - Use `docs/vm-lookup-and-assignment.md` for VM lookup responses and FC/disk assignment requests. - Use `docs/cmc-install-reference.md` for CMC install/uninstall commands and fallback reinstall notes. +- Use `docs/iscsi-cleanup-reference.md` for guest-level iSCSI target logout and node-record cleanup. - Use `templates/vmw.yaml` as the starting operation template. - Treat `docs/run-learnings.md` as evidence/history, not baseline procedure. @@ -55,4 +58,5 @@ This folder contains the VMware/vCenter + MigrateOps runbook for CDS MCP workflo - Update `docs/esxvm-guide.md` only when direct vCenter hardware workflow/default behavior changes. - Update `docs/vm-lookup-and-assignment.md` only when lookup/assignment workflow behavior changes. - Update `docs/cmc-install-reference.md` only when install or reinstall reference behavior changes. +- Update `docs/iscsi-cleanup-reference.md` only when the default iSCSI target cleanup workflow changes. - Update `docs/run-learnings.md` only when a run reveals a new learning/failure pattern/required check. diff --git a/cdsmcp/README.md b/cdsmcp/README.md index b71f05c..8746c68 100644 --- a/cdsmcp/README.md +++ b/cdsmcp/README.md @@ -12,6 +12,8 @@ This folder contains the VMware/vCenter and MigrateOps runbook material used for - CMC install and uninstall reference: - `docs/cmc-install-reference.md` - includes the Windows SSH + PowerShell install/reinstall path +- iSCSI target cleanup reference: + - `docs/iscsi-cleanup-reference.md` - Run-specific learnings: - `docs/run-learnings.md` - Base operation template: diff --git a/cdsmcp/docs/iscsi-cleanup-reference.md b/cdsmcp/docs/iscsi-cleanup-reference.md new file mode 100644 index 0000000..915bb4e --- /dev/null +++ b/cdsmcp/docs/iscsi-cleanup-reference.md @@ -0,0 +1,37 @@ +# iSCSI Cleanup Reference + +This file contains the standard iSCSI target cleanup sequence for Linux guests used in CDS MCP workflows. + +## Scope +- Use this reference when the user asks to clean up saved iSCSI targets on a machine. +- This is a guest-level cleanup workflow and is separate from CMC install or CDC project cleanup. + +## Standard Sequence +1. Log out of all current targets: + +```bash +iscsiadm --mode node --logoutall=all +``` + +2. List saved node records and note the target IQN values: + +```bash +iscsiadm -m node +``` + +3. Remove each target by IQN: + +```bash +iscsiadm -m node -o delete -T +``` + +4. Re-list nodes and confirm the list is empty: + +```bash +iscsiadm -m node +``` + +## Notes +- One IQN can appear on multiple portals; deleting by IQN removes the saved node records for that target. +- `No records found` is an acceptable result if the machine is already clean. +- Unless the user asks otherwise, perform the logout step before deleting saved node records.