scp ~/.ssh/authorized_keys esxi:/etc/ssh/keys-root/authorized_keys
ssh esxi "echo 'ChallengeResponseAuthentication no' >> /etc/ssh/sshd_config"
ssh esxi "echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config"
### GPU
ssh esxi "lspci -v | grep -iA 1 Display"
ssh esxi "echo '1002 731f bridge false' >> /etc/vmware/passthru.map"
ssh esxi "echo '1002 731f link false' >> /etc/vmware/passthru.map"
ssh esxi "echo '1002 731f d3d0 false' >> /etc/vmware/passthru.map"
ssh esxi "echo '/device/0000:05:00.0/owner = \"passthru\"' >> /etc/vmware/esx.conf"
### GPU END
### USB
ssh esxi "lsusb"
ssh esxi "echo 'usb.generic.allowHID = \"TRUE\"' >> /etc/vmware/config"
ssh esxi "echo 'usb.quirks.device0 = \"0x046d:0xc52b allow\"' >> /etc/vmware/config"
echo '"kernelopt=autoPartition=FALSE CONFIG./USB/quirks=0x046d:0xc52b::0xffff:UQ_KBD_IGNORE" : /bootbank/boot.cfg'
### USB END
# WIFI
echo '一般情况 WiFi 带蓝牙 注意直通 USB 蓝牙'
ssh esxi "lspci | grep Network"
ssh esxi "echo '8086 2725 bridge false' >> /etc/vmware/passthru.map"
ssh esxi "echo '8086 2725 link false' >> /etc/vmware/passthru.map"
ssh esxi "echo '8086 2725 d3d0 false' >> /etc/vmware/passthru.map"
ssh esxi "echo '/device/0000:0a:00.0/owner = \"passthru\"' >> /etc/vmware/esx.conf"
ssh esxi "lsusb -v | grep -i Bluetooth | grep Bus"
ssh esxi "echo 'usb.quirks.device1 = \"0x8087:0x0032 allow\"' >> /etc/vmware/config"
echo '"kernelopt=autoPartition=FALSE CONFIG./USB/quirks=0x046d:0xc52b::0xffff:UQ_KBD_IGNORE:0x8087:0x0032::0xffff:UQ_KBD_IGNORE" : /bootbank/boot.cfg'
### WIFI END
### Update
echo 'esxcli software vib install -d $PWD/nvme-community-driver_1.0.1.0-3vmw.700.1.0.15843807-component-18902434.zip'
echo 'esxcli software vib install -v $PWD/nvme.vib'
echo 'esxcli software sources profile list -d $PWD/VMware-ESXi-8.0a-20842819-depot.zip'
echo 'esxcli software profile update -d $PWD/VMware-ESXi-8.0a-20842819-depot.zip -p ESXi-8.0a-20842819-standard'
echo 'vmkfstools -i OpenWrt1.vmdk -d thin OpenWrt.vmdk'
echo 'vmkfstools -K OpenWrt.vmd'
### Update END
### Windows
echo 'hypervisor.cpuid.v0:FALSE'
echo 'pciPassthru0.msiEnabled : FALSE'
echo 'pciPassthru1.msiEnabled : FALSE'
echo 'pciPassthru.64bitMMIOSizeGB : 16'
echo 'pciPassthru.use64bitMMIO : TRUE'
### Windows END
### macOS
echo 'pciPassthru0.msiEnabled : FALSE'
echo 'pciPassthru1.msiEnabled : FALSE'
echo 'pciPassthru.64bitMMIOSizeGB : 16'
echo 'pciPassthru.use64bitMMIO : TRUE'
echo 'smbios.reflectHost : FALSE'
echo 'hw.model.reflectHost : FALSE'
echo 'board-id.reflectHost : FALSE'
echo 'serialNumber.reflectHost : FALSE'
echo 'smbios.use12CharSerialNumber : TRUE'
echo 'hw.model : MacPro7,1'
echo 'serialNumber : F5KZR05YP7QM'
echo 'board-id : Mac-27AD2F918AE68F61'
### macOS END
### OpenWrt
echo 'hypervisor.cpuid.v0:FALSE'
echo 'pciPassthru0.msiEnabled : FALSE'
echo 'pciPassthru.64bitMMIOSizeGB : 16'
echo 'pciPassthru.use64bitMMIO : TRUE'
echo 'vmkernel.boot.disableACScheck : TRUE'
### OpenWrt END
rm -rf /tmp/*.txt
rm -f /var/log/*.log
XRSec has the right to modify and interpret this article. If you want to reprint or disseminate this article, you must ensure the integrity of this article, including all contents such as copyright notice. Without the permission of the author, the content of this article shall not be modified or increased or decreased arbitrarily, and it shall not be used for commercial purposes in any way