VMWare

Posts tagged with #vmware
Total: 4

How SELinux screws with scripts when run over VMware Tools

Notes | 2021-08-08 (updated 2025-10-25) | 1 min read
#ansible #automation #linux #security #selinux #sysadmin #vmware

SELinux by default prohibits certain things from working through VMware tools (Ansible connection or plain API).

This can be solved two ways:

Note: Adding/Changing this policy through a VMware tools connection is thankfully possible

Example policy

This policy is the base for a VMware tools policy and allows entering the rpm context (yum).

module custom-vmtools 1.0;

require {
        type rpm_script_t;
        type vmtools_unconfined_t;
        class process transition;
}

#============= vmtools_unconfined_t ==============

allow vmtools_unconfined_t rpm_script_t:process transition

Vmware Tools Copy Files

Notes | 2020-09-17 (updated 2025-10-25) | 1 min read
#powershell #vmware

Docs

Copy To Guest

$vm = Get-VM -Name TEST
Get-Item "X:\yourfile.txt" | Copy-VMGuestFile -Destination "c:\temp" -VM $vm -LocalToGuest -GuestUser "Administrator" -GuestPassword "Pa$$w0rd"

Copy From Guest

$vm = Get-VM -Name TEST
Copy-VMGuestFile -Source c:\yourfile.txt -Destination c:\temp\ -VM $vm -GuestToLocal -GuestUser "Administrator" -GuestPassword "Pa$$w0rd"

Ansible VMware Connection Plugin & Become

Notes | 2020-07-02 (updated 2025-10-25) | 1 min read
#ansible #vmware

When using VMware as the connection plugin to connect to remote hosts you commonly set two facts for username and password:

ansible_vmware_tools_user: "mkamner"
ansible_vmare_tools_password: "Super Secret PW"

This will work just fine for windows and with many tasks on linux.

However, if you want to use become: true on linux it will fail with the strangest error messages.

For example: apt will fail, because it can’t acquire the lock file

The solution is rather simple, become does not honor the VMware facts set, instead it wants two different facts set:

Read more…

vCenter Cert Bundle

Notes | 2019-05-13 (updated 2025-10-25) | 1 min read
#powershell #vmware

Errors connecting to vCenter or any ESXi server in the cluster without certificate errors?

VMware KB