Skip to content

Instantly share code, notes, and snippets.

@pcn
pcn / clear_out_and_reset.md
Last active August 29, 2015 14:05
Nova and Neutron commands

In simple cases, you've created a network but dhcp and network ranges aren't showing up in the web ui. For that, re-start the dhcp agent:

sudo /etc/init.d/neutron-dhcp-agent

When dhcp doesn't seem to be working, or when the uuids in the logs and device names in the logs on the hypervisors don't seem to match existing names of tunnels and bridges, do this:

stop the dhcp agent, stop any dnsmasq processes, remove the ports
 (ovs-vsctl del-port br-int tap83ba5659-b4 and also in neutron),
@pcn
pcn / Notes.md
Last active August 29, 2015 14:05
how ml2_config.ini needs to look at this point

Don't forget to restart everything that may touch this on all of the service nodes.

  570  for s in /etc/init.d/openvswitch-* ; do $s restart; done
  571  for s in /etc/init.d/nova-* ; do $s restart; done

Otherwise the scheduler won't be able to find a viable host for the networks you made or some nonsense like that.

@pcn
pcn / cygwin_cmdlines.md
Last active August 29, 2015 14:03
Setting up NICs 5-8 on a vmware virtualbox vEOS image
$ '/cygdrive/c/Program Files/Oracle/VirtualBox/VBoxManage.exe'
Oracle VM VirtualBox Command Line Management Interface Version 4.3.8
(C) 2005-2014 Oracle Corporation
All rights reserved.

Usage:

  VBoxManage [<general option>] <command>
## Install necessary packages
$ sudo apt-get install virtualbox-ose qemu-utils genisoimage cloud-utils
## get kvm unloaded so virtualbox can load
$ sudo modprobe -r kvm_amd kvm_intel
$ sudo service virtualbox stop
$ sudo service virtualbox start
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"
@pcn
pcn / example.md
Last active August 29, 2015 14:02
Virtualbox can't import OVA files

http://answers.nuxeo.com/questions/8408/virtualbox-does-not-import-nuxeo-592 says that it's working in 4.2.

At least in 4.3, here's the garbage I'm getting:

Peters-MacBook-Pro:packer peter$ VBoxManage import ubuntu-12.04-server-cloudimg-amd64.ovf --vsys 0 --unit 11 --disk /tmp/foo/test.[5/2597]
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /Users/peter/work/packer/ubuntu-12.04-server-cloudimg-amd64.ovf...
OK.
Disks:  vmdisk1 2361393152      -1      http://wiki.qemu.org/download/qcow2-spec.html   ubuntu-12.04-server-cloudimg-amd64-disk1.img    12
@pcn
pcn / crash
Created May 13, 2014 18:51
Crash in gonetacts in getting in touch with oauth services
$ ./gonetact --cache=~/.gonetact/cache.json --client-id=~/.gonetact/client.json
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x8 pc=0x451469]
goroutine 1 [running]:
runtime.panic(0x656d40, 0x948ca8)
/usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
code.google.com/p/goauth2/oauth.(*Transport).RoundTrip(0x0, 0xc210040340, 0x1, 0x424b45, 0x60)
/home/spacey/.gopath/src/code.google.com/p/goauth2/oauth/oauth.go:249 +0x29
net/http.send(0xc210040340, 0x7f1921bc35d8, 0x0, 0x0, 0x0, ...)
@pcn
pcn / 1. installing_viper
Last active August 29, 2015 13:57
Installing vmware's viper (vmware api bindings for perl)
Installing vmware's viper api for perl on ubuntu 12.04
tar -xzf VMware-VIPerl-1.6.0-104313.x86_64.tar.gz
cd vmware-viperl-distrib/
sudo apt-get install libclass-methodmaker-perl
sudo apt-get install libcrypt-ssleay-perl
sudo apt-get install libsoap-lite-perl
sudo apt-get install libdata-uuid-libuuid-perl
sudo apt-get install zlib1g-dev
sudo apt-get install libxml2
require 'rbvmomi'
class KnifeVspherePlugin
def data=(cplugin_data)
@mac_address = cplugin_data
end
def reconfig_vm(target_vm)
if (!@mac_address)
abort ("MAC address not provided")
@pcn
pcn / 7050
Last active August 29, 2015 13:57
7150 history
[admin@LV-7050s ~]$ history
1 curl http://nae-dev.statelessnetworks.com/uninstall | /usr/bin/python
2 sudo service ProcMgr reload
3 curl http://nae-dev.statelessnetworks.com/install | /usr/bin/python
4 sudo service ProcMgr reload
5 cat /mnt/flash/.nae_settings
6 nslookup nae-dev.statelessnetworks.com
7 ping 199.59.109.225
8 cd /var/log
9 ls
@pcn
pcn / .tmux.conf
Created March 11, 2014 04:50 — forked from snuggs/.tmux.conf
# SCREENSHOT EXAMPLE: http://grab.by/bzg3
##############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################