What SQL queries can I run to export virtual machine and ESXi host configuration from vCenter's database?
After connecting to the VCDB database, run `SELECT * FROM vc.vpx_vm;` to retrieve VM configuration (e.g., file_name, guest_os, ip_address) and `SELECT * FROM vc.vpx_host;` for ESXi host info. For ESXi passwords, use `SELECT name,username,password FROM vc.vpxv_hosts;` to get the encrypted vpxuser password. These commands are essential for penetration testing as explained in vSphere Development Guide 4 - PostgreSQL.
SQL queryvpx_vmvpx_hostvpxv_hostsvirtual machine configurationESXi configuration