vcf_vim_vm_guest¶
Execution module for in-guest VM operations (SOAP via VMware Tools).
- saltext.vcf.modules.vcf_vim_vm_guest.run_command(vm, program_path, arguments='', username=None, password=None, working_directory=None, env=None, profile=None)[source]¶
Start a program inside the guest, return its PID.
CLI Example:
salt '*' vcf_vim_vm_guest.run_command vm-100 /bin/echo "hello" username=root password='<pw>'
- saltext.vcf.modules.vcf_vim_vm_guest.list_processes(vm, username=None, password=None, pids=None, profile=None)[source]¶
List processes in the guest (optionally filtered to pids).
CLI Example:
salt '*' vcf_vim_vm_guest.list_processes vm-100 username=root password='<pw>'
- saltext.vcf.modules.vcf_vim_vm_guest.terminate_process(vm, pid, username=None, password=None, profile=None)[source]¶
Kill a process inside the guest.
CLI Example:
salt '*' vcf_vim_vm_guest.terminate_process vm-100 1234 username=root password='<pw>'
- saltext.vcf.modules.vcf_vim_vm_guest.read_environment(vm, username=None, password=None, names=None, profile=None)[source]¶
Read the guest user’s environment variables.
CLI Example:
salt '*' vcf_vim_vm_guest.read_environment vm-100 username=root password='<pw>' names='["PATH"]'
- saltext.vcf.modules.vcf_vim_vm_guest.upload_file(vm, src_path, dst_path, username=None, password=None, overwrite=True, permissions=420, verify_ssl=False, profile=None)[source]¶
Upload a local file to the guest.
CLI Example:
salt '*' vcf_vim_vm_guest.upload_file vm-100 /tmp/local.sh /root/remote.sh username=root password='<pw>'
- saltext.vcf.modules.vcf_vim_vm_guest.download_file(vm, src_path, dst_path, username=None, password=None, verify_ssl=False, profile=None)[source]¶
Download a file from the guest.
CLI Example:
salt '*' vcf_vim_vm_guest.download_file vm-100 /root/log /tmp/log username=root password='<pw>'
- saltext.vcf.modules.vcf_vim_vm_guest.list_files(vm, path, username=None, password=None, pattern=None, profile=None)[source]¶
List files in a guest directory.
CLI Example:
salt '*' vcf_vim_vm_guest.list_files vm-100 /root username=root password='<pw>'
- saltext.vcf.modules.vcf_vim_vm_guest.delete_file(vm, path, username=None, password=None, profile=None)[source]¶
Delete a file from the guest.
CLI Example:
salt '*' vcf_vim_vm_guest.delete_file vm-100 /root/old.txt username=root password='<pw>'
- saltext.vcf.modules.vcf_vim_vm_guest.make_directory(vm, path, username=None, password=None, create_parents=False, profile=None)[source]¶
Make a directory in the guest (
create_parents=trueformkdir -p).CLI Example:
salt '*' vcf_vim_vm_guest.make_directory vm-100 /opt/app/etc create_parents=true username=root password='<pw>'