Skip to content

Instantly share code, notes, and snippets.

@stefancocora
stefancocora / gist:9668826
Created March 20, 2014 17:06
vmware stack trace when the user can't see the distributed vswitch
Failed to create a compute grw-mgm-environment (VMWare) instance test-grw-mgm.mgm.grw.itv: failed to create vm: undefined method `uuid' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/vsphere/requests/compute/create_vm.rb:27:in `rescue in create_vm'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/vsphere/requests/compute/create_vm.rb:8:in `create_vm'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/vsphere/models/compute/server.rb:234:in `save'
/usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb:118:in `create_vm'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:62:in `setCompute'
/usr/share/foreman/app/models/concerns/orchestration.rb:148:in `execute'
/usr/share/foreman/app/models/concerns/orchestration.rb:88:in `block in process'
@stefancocora
stefancocora / foreman-1.4.2-vmware4.1-update3-stack_trace
Last active August 29, 2015 13:57
foreman-1.4.2-vmware4.1-update3-stack_trace
Specs:
Foreman 1.4.2
Vmware 4.1 update 3
fog (1.19.0)
rbvmomi (1.6.0)
When creating a VM via Foreman compute resource I get this error:
@stefancocora
stefancocora / vmware_create_vm_prototype-fog
Last active August 29, 2015 13:57
prototyping creation of blank VM via fog in vsphere 4.1
#!/usr/bin/env ruby
###
### DISCLAIMER - this example is not working yet
### more info on this fog github issue - https://github.com/fog/fog/issues/2798
###
require 'fog'
require 'pp'
@stefancocora
stefancocora / nvidia-337.12-install_command.sh
Last active November 28, 2021 22:50
Nvidia 337.12 kernel install on kernel 3.14 on macbook pro retina 15 late 2013 ( also known as 11,3 )
IGNORE_CC_MISMATCH=1 bash NVIDIA-Linux-x86_64-337.12.run -a
System specs:
- macbook pro 15 inch retina 11,3
- ubuntu 14.04 beta x64
@stefancocora
stefancocora / foreman-tftp-dhcp
Last active August 29, 2015 13:58
getting foreman-proxy to download the CentOS 6.4 install img file
Foreman_proxy.log output:
D, [2014-04-10T12:04:13.315124 #2343] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2014-04-10T12:04:13.315340 #2343] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts
D, [2014-04-10T12:04:13.315479 #2343] DEBUG -- : Loading subnets for 127.0.0.1
D, [2014-04-10T12:04:13.315620 #2343] DEBUG -- : Added 10.220.103.0/255.255.255.0 to 127.0.0.1
D, [2014-04-10T12:04:13.316579 #2343] DEBUG -- : trying to find an ip address, we got {:to=>"10.220.103.220", :mac=>nil, :from=>"10.220.103.200"}
D, [2014-04-10T12:04:13.318015 #2343] DEBUG -- : Loading subnet data for 10.220.103.0/255.255.255.0
D, [2014-04-10T12:04:13.318914 #2343] DEBUG -- : Added testname62.foremantest (10.220.103.202 / 00:50:56:86:6b:db) to 10.220.103.0/255.255.255.0
@stefancocora
stefancocora / docker failing CentOS6.5 EBS EC2
Created August 22, 2014 13:25
docker failing CentOS6.5 AWS EBS EC2
execve("/usr/bin/docker", ["/usr/bin/docker", "-d"], [/* 27 vars */]) = 0
brk(0) = 0x1a9d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd485b25000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=29801, ...}) = 0
mmap(NULL, 29801, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd485b1d000
close(3) = 0
open("/lib64/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340]\0\0356\0\0\0"..., 832) = 832
@stefancocora
stefancocora / macbook_pro_screen_resolution.sh
Created December 2, 2015 12:37
script that switches resolution using xrandr to drive the nvidia driver on a macbook pro
#!/bin/bash
# original script here https://gist.github.com/Garland-g/4552263
# This script requires an argument for the resolution width
if [ -z "$1" ]; then
echo "Usage: script.sh resolution_width";
echo " $0 1920 for a scaled resolution";
echo " $0 2880 for going back to max resolution";
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.16.0-031600-generic Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.19.8 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.3.3 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"