2023年1月6日 星期五

Detect if a VM is running in Google Compute Engine

Detect if a VM is running in Compute Engine

sudo dmidecode -s system-product-name | grep "Google Compute Engine"
這個需要 root 權限,實際上是去讀取 /sys/firmware/dmi/tables/DMI
用 strings /sys/firmware/dmi/tables/DMI | grep "Google Compute Engine" 也行

若程式沒有 root 權限,可以去讀取 /etc/hosts 有沒有包含 Added by Google 字樣
grep "Added by Google" /etc/hosts

沒有留言:

Update ESXi to 8.0.3d using depot file

本例是從 8.0U3 升到 8.0U3d,若從更舊的版本升級,不確定是否適用 先把所有 VM 關機,進入維護模式 把 depot 升級檔 VMware-ESXi-8.0U3d-24585383-depot.zip 放到機器內 ssh ESXi 先查看 depot 有那些 Prof...