Skip to content

Instantly share code, notes, and snippets.

gowatana

  • Japan
Block or report user

Report or block gowatana

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gowatana
gowatana / create_vm-snapshot.py
Created Dec 3, 2018
Nutanix AHV で VM スナップショットを作成する。
View create_vm-snapshot.py
import sys
import json
import requests
args = sys.argv
conf_file = args[1]
vm_uuid = args[2]
snapshot_name = args[3]
def main():
View lab-vcsa-67u1.json
{
"__version": "2.13.0",
"__comments": "deploy a VCSA with an embedded-PSC on an ESXi host.",
"new_vcsa": {
"esxi": {
"hostname": "192.168.1.20",
"username": "root",
"password": "VMware1!",
"deployment_network": "VM Network",
"datastore": "datastore1"
@gowatana
gowatana / NotSupported_H5ClientHacks-Xmas.sh
Created Dec 1, 2018 — forked from lamw/gist:a744df89a5b8aab18c2b69af9399565b
Add custom color to vSphere HTML5 UI Header/Footer in vSphere 6.7 Update 1
View NotSupported_H5ClientHacks-Xmas.sh
NEW_HEADER_HEX_COLOR=006400
NEW_BOTTOM_HEX_COLOR=8b0000
BACKUP_FILE=/usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war.bak
if [ ! -e ${BACKUP_FILE} ]; then
cp /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war ${BACKUP_FILE}
fi
mkdir -p /root/work
cd /root/work
cp /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war .
unzip h5ngc.war
@gowatana
gowatana / create_pd-snapshot.py
Created Nov 21, 2018
Nutanix REST API v2 で Protection Domain の Snapshotを作成してみる。
View create_pd-snapshot.py
import sys
import json
import requests
import time
args = sys.argv
conf_file = args[1]
pd_name = args[2]
seconds_to_wait_snapshot_report = 5
@gowatana
gowatana / set_vm_power-state.py
Created Nov 11, 2018
Nutanix CE の VM を パワーオン / オフする。
View set_vm_power-state.py
import sys
import json
import requests
import time
args = sys.argv
conf_file = args[1]
vm_list_file = args[2]
power_state = args[3]
seconds_to_wait_task_report = 5
@gowatana
gowatana / get_ntnx_vm-host.py
Created Nov 6, 2018
Nutanix CE の Prism から起動中 VM の AHV ホストを取得する。
View get_ntnx_vm-host.py
import sys
import json
import requests
import datetime
args = sys.argv
conf_file = args[1]
with open(conf_file, "r") as file:
conf = file.read()
View get_ntnx_host_stats.py
#!/bin/python
import sys
import json
import requests
import datetime
args = sys.argv
conf_file = args[1]
View lab-vc-02.json
{
"__version": "2.13.0",
"__comments": "deploy a VCSA with an embedded-PSC as a replication partner to another embedded-VCSA, on an ESXi host.",
"new_vcsa": {
"esxi": {
"hostname": "infra-esxi-06.go-lab.jp",
"username": "root",
"password": "パスワード",
"deployment_network": "dvpg-vc-deploy-0000",
"datastore": "vsanDatastore"
View lab-vc-01.json
{
"__version": "2.13.0",
"__comments": "deploy a VCSA with an embedded-PSC on an ESXi host.",
"new_vcsa": {
"esxi": {
"hostname": "infra-esxi-06.go-lab.jp",
"username": "root",
"password": "パスワード",
"deployment_network": "dvpg-vc-deploy-0000",
"datastore": "vsanDatastore"
@gowatana
gowatana / .netrc
Created Aug 7, 2018
GItHubログインむけ。
View .netrc
machine github.com
login ユーザ名
password APIキー
You can’t perform that action at this time.