This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Update packages list | |
| apt-get update | |
| # Install a web server | |
| apt-get install -qqy apache2 | |
| # Hello world in instance's logs | |
| echo "HELLO WORLD, I AM THE POST CONFIGURATION SCRIPT :)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Following command will create: | |
| # * instance(s) named "training" | |
| # * based on ubuntu image | |
| # * start 10* instances | |
| # * append index starting from 1 | |
| # * 5Gb disk per instance | |
| # * sizing based on flavor: m1.tiny | |
| # * connected to network: training_net | |
| # * security group applied: training_sec | |
| # * ssh key will be: mysshkey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Return the hash of a Hash | |
| # Ex: | |
| # Get_FileHash .\path\to\file sha256 | |
| # Get_FileHash -File .\path\to\file -Hash sha256 | |
| function Get_FileHash(){ | |
| param( | |
| [string[]]$File, | |
| [string[]]$Hash | |
| ) | |
| $availableHashMethods=@("MD5","SHA1","SHA256","SHA384","SHA512","RIPEM160") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| This script retrieves information from guestInfo.ovfEnv and | |
| print the OVF properties. | |
| In second time, it use OVF properties to reset the root password. | |
| """ | |
| import subprocess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Keybase proof | |
| I hereby claim: | |
| * I am lrivallain on github. | |
| * I am lrivallain (https://keybase.io/lrivallain) on keybase. | |
| * I have a public key whose fingerprint is CBF2 D0FF 5BDF 1CF8 5094 4C05 C6BE 80D9 44DB 4587 | |
| To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Windows 8 and Windows 2012 Server or later virtual machines fail upon reboot (2092807) | |
| https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2092807 | |
| Resolution: To _work around_ this issue, update the VM advanced configuration to add monitor_control.enable_softResetClearTSC = TRUE | |
| .NOTES | |
| Author : Ludovic Rivallain | |
| Version : 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### Configure | |
| VCIP="10.0.0.1" | |
| #### | |
| # stop IS service | |
| service vmware-inventoryservice stop | |
| # remove old DB | |
| rm -rf /storage/db/inventoryservice/data | |
| # create new DB | |
| /usr/lib/vmware-vpx/inventoryservice/scripts/ds-invoke.sh -Dvim.logdir=/var/log/vmware/vpx/inventoryservice com.vmware.vim.dataservices.CreateDb /storage/db/inventoryservice/data changeme default changeme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "url": "http://an/ics/file/uri.ics", | |
| "mailfile": "/tmp/ics-notifier.email.txt", | |
| "subject": "Évènement", | |
| "tzone": "Europe/Paris", | |
| "mails": [ | |
| "email1@example.com", | |
| "email2@example.com" | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # load PowerCli Snapin | |
| if ((Get-PSSnapin -Name VMware.Vimautomation.Core -ErrorAction SilentlyContinue) -eq $null ) { | |
| Add-PsSnapin VMware.Vimautomation.Core | |
| } | |
| # vCenter server | |
| $VC = "vcenter.domain" | |
| $Username = "domain\user" | |
| # connecting vCenter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Add-PSSnapin VMware.VimAutomation.Core | |
| $vcenter='127.0.0.1' | |
| $cluster='A_cluster_name' | |
| $datastorename='A_datastore_name' | |
| $nfshost='10.0.0.1' | |
| $nfspath='/vol/a_vol_name/a_qtree' | |
| Connect-VIServer $vcenter | |
| Get-Cluster -Name $cluster | Get-VMHost | New-Datastore -Nfs -Name $datastorename -Path $nfspath -NfsHost $nfshost |