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 / vdisk_usage_printer_5990.txt
Created Mar 22, 2020
Nutanix CVM のコマンド出力例。CVM$ vdisk_usage_printer -vdisk_id=5990 > vdisk_usage_printer_5990.txt
View vdisk_usage_printer_5990.txt
Egid # eids UT Size T Size Ratio Garbage Orphans T Type Replicas(disk/svm/block/rack) AES Egroup
6367 4 3.06 MB 3.06 MB 100% 0.00 KB 0 none [51*/6/41/0][57*/8/48/0] No
6368 4 4.00 MB 4.00 MB 100% 0.00 KB 0 none [50*/6/41/0][53*/7/34/0] No
7717 4 4.00 MB 4.00 MB 100% 0.00 KB 0 none [51*/6/41/0][56*/8/48/0] No
7720 4 4.00 MB 4.00 MB 100% 0.00 KB 0 none [51*/6/41/0][57*/8/48/0] No
7721 4 4.00 MB 4.00 MB 100% 0.00 KB 0 none [50*/6/41/0][54*/7/34/0] No
7718 4 4.00 MB 4.00 MB 100% 0.00 KB 0 none [50*/6/41/0][53*/7/34/0] No
7722 4 4.00 MB 4.00
@gowatana
gowatana / ce-2019.11.22-stable.vmdk
Created Feb 26, 2020
Nutanix CE の .img ファイルむけ .vmdk ディスクリプタ ファイル
View ce-2019.11.22-stable.vmdk
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=fffffffe
parentCID=ffffffff
createType="vmfs"
# Extent description
RW 14540800 VMFS "ce-2019.11.22-stable.img"
View ntnx-dialy-list.md
No Link Title
1 2015/10/16 Nutanix CE 日記、始めました。
2 2015/10/18 うちの Nested Nutanix 構成。
3 2015/10/19 Nutanix CE 環境構築の流れ。
4 2015/10/20 Nutanix CE マルチノードクラスタを cluster コマンドで構成。
5 2015/10/20 Nutanix CE の cluster create コマンドの画面出力を眺めてみる。
6 2015/10/23 Nutanix CE セットアップをコマンドラインで。(ncli パート)
7 2015/10/24 Nutanix CE セットアップをコマンドラインで。(acli パート)
8 2015/10/25 ストレージコンテナに ISO ファイルを配置してみる。(NFS でコピー)
@gowatana
gowatana / cleanup_ntnx_ctr.sh
Last active Jan 29, 2020
Nutanix ストレージ コンテナ削除自動化くん
View cleanup_ntnx_ctr.sh
#!/bin/bash
LIST_FILE=$1
DELETE_FLAG=$2
if [ ! -f "$LIST_FILE" ]; then
echo "LIST_FILE $LIST_FILE not found."
exit 1
fi
ncli container list | grep "^\ *Name" | awk '{print $3}' | while read CTR
@gowatana
gowatana / cleanup_ahv_vm.sh
Created Jan 29, 2020
acli で VM 削除自動化くん。(Bash)
View cleanup_ahv_vm.sh
#!/bin/bash
KEEP_VM_LIST=$1
DELETE_FLAG=$2
if [ ! -f "$KEEP_VM_LIST" ]; then
echo "KEEP_VM_LIST $KEEP_VM_LIST not found."
exit 1
fi
acli vm.list | grep -E -v "^VM name|^$" | awk '{print $1}' | while read VM
View Nutanix-APIv2-hosts_1host-sample.json
{
"service_vmid": "00059788-a2b4-4e5f-1a6e-005056b688d2::2",
"uuid": "9123c38b-7ca7-432b-aa69-771cb56f4375",
"disk_hardware_configs": {
"1": {
"serial_number": "drive-scsi0-0-0-1",
"disk_id": "00059788-a2b4-4e5f-1a6e-005056b688d2::11",
"disk_uuid": "5fa13fd5-f8c0-48a5-91f9-334e943bf64b",
"location": 1,
"bad": false,
@gowatana
gowatana / demo-flow-quaratine.py
Last active Dec 9, 2019
Nutanix Flow で REST API での Quarantine サンプル。
View demo-flow-quaratine.py
#!/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
import requests
import urllib3
args = sys.argv
conf_file = args[1]
@gowatana
gowatana / acli-vnic.create.sh
Created Dec 1, 2019
ACLIでNIC追加自動化くん(text / bash 編)
View acli-vnic.create.sh
#!/bin/bash
HELP='Usage: CVM$ bash ./cli-vnic.create.sh VM_LIST_FILE AHV_NETWORK '
VM_LIST_FILE=$1
AHV_NETWORK=$2
CMD_OUTPUT_ONLY_FLG=$3
if [ "$#" -eq 0 ]; then
echo $HELP
exit 1
View lab-vcsa-67u3.json
{
"__version": "2.13.0",
"__comments": [
"deploy a VCSA with an embedded-PSC on an ESXi host.",
"F:/vcsa-cli-installer/win32/vcsa-deploy.exe install --no-esx-ssl-verify --accept-eula --precheck-only ./lab-vcsa-67u3.json",
"F:/vcsa-cli-installer/win32/vcsa-deploy.exe install --no-esx-ssl-verify --accept-eula ./lab-vcsa-67u3.json"
],
"new_vcsa": {
"esxi": {
"hostname": "192.168.1.20",
@gowatana
gowatana / vmx_schedule_vup.ps1
Created Nov 28, 2019
ESXi 仮想マシンのハードウェアバージョンのVUPをスケジュールする。
View vmx_schedule_vup.ps1
$vm_name = $args[0]
$target_vmx_version = $args[1]
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.ScheduledHardwareUpgradeInfo = New-Object VMware.Vim.ScheduledHardwareUpgradeInfo
$spec.ScheduledHardwareUpgradeInfo.UpgradePolicy = "always" # never or onSoftPowerOff or always
$spec.ScheduledHardwareUpgradeInfo.VersionKey = $target_vmx_version
$vms = Get-VM -Name $vm_name
$vms | ForEach-Object {
You can’t perform that action at this time.