<commit_before>#+TITLE: XenServer Admin Scripts
These are works in progress for performing common XenServer CLI tasks. They are somewhat site-specific and have some known bugs.

* Assumptions
  - name labels are unique among each type of object (VM, SR, network...)
  - host name label is same as hostname
  - each host's local storage has name label 'Local storage'

* Environment variables
  - XE_SERVER
  - XE_PORT
  - XE_USER
  - XE_PASSWORD

* Reasons
  - =vm-uninstall= leaves orphan VDIs
  ...to be completed...

* Remaining work
** xs-* scripts [19/27]
   - [ ] set arg vars to avoid env vars; always initialize vars!
   - [X] change (( 1 )) loops
   - [X] convert *-param-get() xs-functions to param()
   - [X] use have_required()
   - [X] param() to param_value()
   - [X] *_uuid() to uuid() or uuids()
   - [X] use prompt() in install-from-template
   - [ ] NFS mount scripts from XenGateway
   - [ ] refactor scripts
   - [X] xe configuration in xs-functions
   - [X] prompt with extra arg in xs-functions
   - [X] match vdi name labels to vm name labels
   - [X] xs-vm-vdi-rename
   - [X] destroy unused vdis
   - [X] generalize xs-vm-migrate
   - [X] spaces in name-label
   - [ ] "vm-make-golden-master"
   - [ ] vm-start
   - [X] default to localhost for xs-vm-provision-local
   - [ ] generalize xs-vm-provision
   - [ ] vm-summary is a mess
   - [ ] vm-vnc-toggle for PV
   - [X] consider IFS=, instead of sed for UUID lists
   - [X] vif-destroy -i -v
   - [X] vif-create
   - [X] accomodate duplicate name-labels in xs-function *_uuid
   - [X] xcp_ scripts to xs-
*** xs-vm-install-from-template
    - [ ] cli bug?
    - [X] set VCPUs
    - [ ] memory limits options
    - [ ] interactive bugs
      - [ ] empty string for dist
      - [ ] empty string for arch
      - [ ] empty string for version?
    - [ ] text/vnc console connection option
<commit_msg>update doc to reflect changes to vm_host()<commit_after>#+TITLE: XenServer Admin Scripts
These are works in progress for performing common XenServer CLI tasks. They are somewhat site-specific and have some known bugs.

* Assumptions
  - name labels are unique among each type of object (VM, SR, network...)
  - host name label is same as hostname
  - each host's local storage has name label 'Local storage'

* Environment variables
  - XE_SERVER
  - XE_PORT
  - XE_USER
  - XE_PASSWORD

* Reasons
  - =vm-uninstall= leaves orphan VDIs
  ...to be completed...

* Remaining work
** xs-* scripts [20/27]
   - [ ] set arg vars to avoid env vars; always initialize vars!
   - [X] change (( 1 )) loops
   - [X] convert *-param-get() xs-functions to param()
   - [X] use have_required()
   - [X] param() to param_value()
   - [X] *_uuid() to uuid() or uuids()
   - [X] use prompt() in install-from-template
   - [ ] NFS mount scripts from XenGateway
   - [ ] refactor scripts
   - [X] xe configuration in xs-functions
   - [X] prompt with extra arg in xs-functions
   - [X] match vdi name labels to vm name labels
   - [X] xs-vm-vdi-rename
   - [X] destroy unused vdis
   - [X] generalize xs-vm-migrate
   - [X] spaces in name-label
   - [ ] "vm-make-golden-master"
   - [ ] vm-start
   - [X] default to localhost for xs-vm-provision-local
   - [ ] generalize xs-vm-provision
   - [X] vm-summary is a mess
   - [ ] vm-vnc-toggle for PV
   - [X] consider IFS=, instead of sed for UUID lists
   - [X] vif-destroy -i -v
   - [X] vif-create
   - [X] accomodate duplicate name-labels in xs-function *_uuid
   - [X] xcp_ scripts to xs-
*** xs-vm-install-from-template
    - [ ] cli bug?
    - [X] set VCPUs
    - [ ] memory limits options
    - [ ] interactive bugs
      - [ ] empty string for dist
      - [ ] empty string for arch
      - [ ] empty string for version?
    - [ ] text/vnc console connection option

{'fraction_non_alphanumeric': 0.11954509389050516, 'fraction_numerical': 0.0026448029621793175, 'mean_word_length': 2.488929889298893, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4345081', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1258, 'n_words': 451}