VSPhere: Performing common virtual machine-related tasks with command-line utilities

From : https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2012964

Performing common virtual machine-related tasks with command-line utilities(2012964)

Purpose

This article provides a side-by-side comparison of performing virtual machine-related tasks using different VMware utilities and command line methods.

Resolution

In these examples:

  • vcenter is your vCenter Server hostname
  • esxhost is your ESX/ESXi hostname
  • datastore is the display name of your datastore
  • path_to_vmx_on_datastore is the path to the virtual machine's vmx file relative to the datastore on which it resides
  • vm_name is the display name of a virtual machine
  • path_to_vmx_file is the full path to a virtual machine's vmx file
  • snapshot_name is the name given to a virtual machine snapshot
  • guest_admin_user is a user account with administrative access within a virtual machine's guest OS
  • guest_admin_password is the password for the account noted by guest_admin_user
 
PowerCLI
vMA
cli
Register a VM
New-VM –vmfilepath “[datastore]path_to_vmx_on_datastore” –vmhost esxhost
vmware-cmd --server esxhost –s register path_to_vmx_file
vmware-cmd --server vcenter --vihost esxhost –s registerpath_to_vmx_file
vim-cmd solo/registervmpath_to_vmx_file
Unregister a VM
Remove-VM vm_name
vmware-cmd --server esxhost –s unregister path_to_vmx_file
vmware-cmd --server vcenter --vihost esxhost –s unregisterpath_to_vmx_file
vim-cmd
vmsvc/unregister vmid
Delete a VM
Remove-VM vm_name -deletepermanently
vmware-cmd --server esxhost –s unregister path_to_vmx_file
vmware-cmd --server vcenter --vihost esxhost –s unregisterpath_to_vmx_file vifs --serveresxhost --rm “[datastore]path_to_vmx_on_datastore
vim-cmd vmsvc/destroy vmid
Get a listing of VMs on a host
Get-VM –location esxhost
vmware-cmd –-server esxhost –-username root –l
vmware-cmd --server vcenter –-vihost esxhost -l
esxcli vm process list
vim-cmd vmsvc/getallvms
Determine if a VM has a snapshot
Get-VM –name vm_name | Get-Snapshot
vmware-cmd --server esxhostpath_to_vmx_file hassnapshot
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filehassnapshot
vim-cmd vmsvc/get.snapshotvmid
Take a snapshot of a VM
Get-VM –name vm_name | New-Snapshot –name snapshot_name
vmware-cmd --server esxhostpath_to_vmx_file createsnapshotsnapshot_name
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filecreatesnapshot snapshot_name
vim-cmd vmsvc/snapshot.create vmidsnapshot_name
Remove a snapshot of a VM
Get-VM –name vm_name | Get-Snapshot –name snapshot_name | Remove-Snapshot
vmware-cmd --server esxhostpath_to_vmx_file removesnapshots
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_fileremovesnapshots
vim-cmd vmsvc/snapshot.remove vmid
Get the current power state of a VM
Get-VM –name vm_name
vmware-cmd --server esxhostpath_to_vmx_file getstate
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filegetstate
vim-cmd vmsvc/power.getstate vmid
Get the uptime for a VM
Get-Stat -entity vm_name -stat sys.uptime.latest -MaxSamples 1
vmware-cmd --server esxhostpath_to_vmx_file getuptime
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filegetuptime
vim-cmd vmsvc/get.summaryvmid |grep uptimeSeconds
Power on a VM
Start-VM –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file start
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filestart
vim-cmd vmsvc/power.onvmid
Shutdown a VM
Shutdown-VMGuest –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file stop soft
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filestop soft
vim-cmd vmsvc/power.shutdown vmid
Power off a VM
Stop-VM –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file stop hard
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filestop hard
esxcli vm process kill –wworld_id
vim-cmd vmsvc/power.offvmid
Reboot a VM
Restart-VMGuest –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file reset soft
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filereset soft
vim-cmd vmsvc/power.rebootvmid
Reset a VM
Restart-VM –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file reset hard
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filereset hard
vim-cmd vmsvc/power.resetvmid
Upgrade VMware Tools in a VM
Update-Tools –vm vm_name
N/A
vim-cmd vmsvc/tools.upgrade vmid
Display the IP address of a VM
Get-VMGuestNetworkInterface –vmvm_name -guestuserguest_admin_user -guestpasswordguest_admin_password
vmware-cmd --server esxhostpath_to_vmx_file getguestinfo ip
vmware-cmd --server vcenter --vihost esxhost path_to_vmx_filegetguestinfo ip
vim-cmd vmsvc/get.guestvmid |grep -m 1 "ipAddress = \""

4G Bands (Indonesia And Singapore)

Taken from https://en.wikipedia.org/wiki/List_of_LTE_networks#Asia

 SingaporeM118003FDDJun 2011Apr 2014Dec 201420 MHz [477][478][479][480][481]
Carrier aggregation of 40 MHz (CA_3A_7A).
M126007FDDJun 2011Apr 2014Dec 201420 MHz [477][478][479][480][481]
Carrier aggregation of 40 MHz (CA_3A_7A).
Singtel9008FDDJul 20155 MHz in use [482][483]
Singtel18003FDDDec 2011May 2013Jun 201420 MHz [484][485][486][487][488]
Carrier aggregation of 40 MHz (CA_3A_7A).
Singtel26007FDDDec 2011May 2013Jun 201420 MHz [484][485][486][487][488]
Carrier aggregation of 40 MHz (CA_3A_7A).
StarHub18003FDDSep 2012Jul 2014Sep 201420 MHz [489][490][491]
Carrier aggregation of 40 MHz (CA_3A_7A).
StarHub26007FDDOct 2013Jul 2014Sep 201420 MHz [490][491][492]
Carrier aggregation of 40 MHz (CA_3A_7A).
 Indonesia318003FDDJul 201510 MHz in use [364][405]
Indosat9008FDDDec 20155 MHz in use [364][406][407][408]
Indosat18003FDDJul 201520 MHz in use [364][405]
PT Internux / Bolt230040TDDNov 201310 MHz in use [24][409][410]
Smartfren8505FDDAug 2015Aug 2015 (?)5 MHz [408][411]
Carrier aggregation of (?) MHz (CA_5A_40A).
Smartfren18003FDDAug 2015[405][412][413]
Smartfren230040TDDJul 2015Aug 2015 (?)30 MHz [1][408][411]
Carrier aggregation of (?) MHz (CA_5A_40A).
Telkomsel9008FDDDec 20145 MHz in use [364][408][414]
Telkomsel18003FDDJul 201520 MHz in use [364][405]
XL Axiata9008FDDDec 20145 MHz in use [364][408][414][415][416]
XL Axiata18003FDDJul 201520 MHz in use [364][407]

Digico SD9 Open Sound Control protocol

As an effort to control our Digico SD9 mixing console via other devices, I start to sniff the communication between our console and an Ipad. Below is my notes on the communication protocol:

  1. Using UDP, port 8000 (From SD9 to Ipad), port 9000 (From Ipad to SD9). The port can be change in the console via External Control window.
  2. It is using OSC (Open Sound Control) http://opensoundcontrol.org/introduction-osc
    OSC is a simple protocol, it consist of Address / Namespace like "/Console/Group_Outputs/modes/?" and array of values.
  3. Namespace ended with "?" is a Query, ussually send by Ipad to SD9 to ask some information:
    like : "/Console/Name/?" means Ipad ask the console name and SD9 will reply with another OSC message like /Console/Name, "SD9"
QueryToolsResult.txt (103.5KB) contains logs of some queries and the reply from SD9.

CombineLog.txt (3.3MB) contains logs of package sniffed between SD9 and Ipad when we operates.

For .NET developer who wants to explore further, I use this OSC library https://www.nuget.org/packages/Rug.Osc/.

I'm still working on a set of services and website that will allow me to control my console from any browser. Right now I manage to control Aux Send from each channel to the aux bus.

Will share more when I have time.

How to disable driver signature enforcement in windows 8.1

To Disable :
Open Command Prompt as Administrator and type the bellow:
bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
bcdedit -set TESTSIGNING ON


Restart the windows To Enable :
Open Command Prompt as Administrator and type the bellow:
bcdedit -set loadoptions ENABLE_INTEGRITY_CHECKS
bcdedit -set TESTSIGNING OFF Restart the windows