First bits of client code from the monolith refactor
This commit is contained in:
parent
1c96711125
commit
da38ee1c75
1
Lifecycle-Virtual/HyperV-LifeCycle-CreateAndDestroy/stub
Normal file
1
Lifecycle-Virtual/HyperV-LifeCycle-CreateAndDestroy/stub
Normal file
@ -0,0 +1 @@
|
||||
Merge hyperv code from monolith
|
1
Lifecycle-Virtual/HyperV-LifeCycle-PowerMgmt/stub
Normal file
1
Lifecycle-Virtual/HyperV-LifeCycle-PowerMgmt/stub
Normal file
@ -0,0 +1 @@
|
||||
Merge Hyperv-V code from monolith
|
12
Lifecycle-Virtual/KVM-LifeCycle-PowerMgmt/kvm-PowerCycle.sh
Normal file
12
Lifecycle-Virtual/KVM-LifeCycle-PowerMgmt/kvm-PowerCycle.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
VMHOSTFULL="$1"
|
||||
USER_SUPPLIED_VMNAME="$2"
|
||||
SSH_ALIAS="ssh -q"
|
||||
|
||||
VIRSH_ALIAS="virsh -c qemu+ssh://root@$VMHOSTFULL/system?no_verify=1"
|
||||
|
||||
|
||||
|
||||
$VIRSH_ALIAS destroy $USER_SUPPLIED_VMNAME
|
||||
$VIRSH_ALIAS start $USER_SUPPLIED_VMNAME
|
11
Lifecycle-Virtual/KVM-LifeCycle-PowerMgmt/kvm-PowerOff.sh
Normal file
11
Lifecycle-Virtual/KVM-LifeCycle-PowerMgmt/kvm-PowerOff.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
VMHOSTFULL="$1"
|
||||
USER_SUPPLIED_VMNAME="$2"
|
||||
SSH_ALIAS="ssh -q"
|
||||
|
||||
VIRSH_ALIAS="virsh -c qemu+ssh://root@$VMHOSTFULL/system?no_verify=1"
|
||||
|
||||
|
||||
|
||||
$VIRSH_ALIAS destroy $USER_SUPPLIED_VMNAME
|
10
Lifecycle-Virtual/KVM-LifeCycle-PowerMgmt/kvm-PowerOn.sh
Normal file
10
Lifecycle-Virtual/KVM-LifeCycle-PowerMgmt/kvm-PowerOn.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
VMHOSTFULL="$1"
|
||||
USER_SUPPLIED_VMNAME="$2"
|
||||
SSH_ALIAS="ssh -q"
|
||||
|
||||
VIRSH_ALIAS="virsh -c qemu+ssh://root@$VMHOSTFULL/system?no_verify=1"
|
||||
|
||||
|
||||
$VIRSH_ALIAS start $USER_SUPPLIED_VMNAME
|
@ -0,0 +1,11 @@
|
||||
param(
|
||||
[string]$vcenter,
|
||||
[string]$vm,
|
||||
[string]$un,
|
||||
[string]$pw
|
||||
)
|
||||
|
||||
Get-Module -ListAvailable PowerCLI* | Import-Module -Verbose:$false > /dev/null
|
||||
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false > /dev/null
|
||||
Connect-ViServer -Server $vcenter -User "$un" -Password "$pw" -Verbose:$false > /dev/null
|
||||
Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -Verbose:$false > /dev/null
|
@ -0,0 +1,12 @@
|
||||
param(
|
||||
[string]$vcenter,
|
||||
[string]$vmName,
|
||||
[string]$un,
|
||||
[string]$pw
|
||||
)
|
||||
|
||||
Get-Module -ListAvailable PowerCLI* | Import-Module -Verbose:$false
|
||||
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
|
||||
Connect-ViServer -Server $vcenter -User $un -Password $pw -Verbose:$false
|
||||
|
||||
Get-VM -Name "$vmName" | Get-VMResourceConfiguration |Set-VMResourceConfiguration -CpuLimitMhz 3000
|
1
Lifecycle-Virtual/VmWare-LifeCycle-PowerMgmt/README.md
Normal file
1
Lifecycle-Virtual/VmWare-LifeCycle-PowerMgmt/README.md
Normal file
@ -0,0 +1 @@
|
||||
Power management for kvm/vmware guests at RackRental/TSYS
|
@ -0,0 +1,12 @@
|
||||
param(
|
||||
[string]$vcenter,
|
||||
[string]$vm,
|
||||
[string]$un,
|
||||
[string]$pw
|
||||
)
|
||||
|
||||
Get-Module -ListAvailable PowerCLI* | Import-Module -Verbose:$false > /dev/null
|
||||
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false > /dev/null
|
||||
Connect-ViServer -Server $vcenter -User "$un" -Password "$pw" -Verbose:$false > /dev/null
|
||||
Stop-VM -RunAsync -VM "$vm" -Confirm:$false -Verbose:$false > /dev/null
|
||||
Start-VM -RunAsync -VM "$vm" -Confirm:$false -Verbose:$false > /dev/null
|
@ -0,0 +1,11 @@
|
||||
param(
|
||||
[string]$vcenter,
|
||||
[string]$vm,
|
||||
[string]$un,
|
||||
[string]$pw
|
||||
)
|
||||
|
||||
Get-Module -ListAvailable PowerCLI* | Import-Module -Verbose:$false > /dev/null
|
||||
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false > /dev/null
|
||||
Connect-ViServer -Server $vcenter -User "$un" -Password "$pw" -Verbose:$false > /dev/null
|
||||
Stop-VM -RunAsync -VM "$vm" -Confirm:$false -Verbose:$false > /dev/null
|
@ -0,0 +1,11 @@
|
||||
param(
|
||||
[string]$vcenter,
|
||||
[string]$vm,
|
||||
[string]$un,
|
||||
[string]$pw
|
||||
)
|
||||
|
||||
Get-Module -ListAvailable PowerCLI* | Import-Module -Verbose:$false > /dev/null
|
||||
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false > /dev/null
|
||||
Connect-ViServer -Server $vcenter -User "$un" -Password "$pw" -Verbose:$false > /dev/null
|
||||
Start-VM -RunAsync -VM "$vm" -Confirm:$false -Verbose:$false > /dev/null
|
Loading…
Reference in New Issue
Block a user