Skip to content

Instantly share code, notes, and snippets.

ISO_FILE ?= ubuntu.iso
VM_NAME ?= vm06
PATH_TO_HDD ?= $(PWD)/$(VM_NAME).qcow2
.PHONY: mkiso
run: $(VM_NAME).qcow2
/usr/bin/qemu-system-x86_64 \
-m 1024 \
-vnc 0.0.0.0:41 \
@jshen28
jshen28 / multicast-openstack.md
Created August 26, 2019 06:06 — forked from djoreilly/multicast-openstack.md
Multicast on OpenStack

Multicast on OpenStack

The following works with Neutron VLAN provider networks, and requires configuration on the physical switches. Multicast works on br-int because the ML2 OVS driver/agent uses OVS in standalone mode (no external controller). The packets on br-int hit the NORMAL flow action, and so get treated by the ovs-vswitchd code that does IGMP snooping (when enabled). All IGMP packets are sent to the slow path (userspace ovs-vswitchd).

The following will not work on Neutron tunnel backed networks (VxLAN, GRE), as the neutron-openvswitch-agent hardcodes flows on br-tun that treats multicast the same as broadcasts and the NORMAL action is not used.

+----------------------------+      +----------------------------+
|      +----+    +----+      |      |      +----+    +----+      |
|      | VM |    | VM |      |      |      | VM |    | VM |      |
|      +-+--+    +--+-+      |      |      +-+--+    +--+-+      |
@jshen28
jshen28 / howto_deb_repackage.txt
Created May 20, 2019 03:28 — forked from shamil/howto_deb_repackage.txt
Howto repackage deb packages
Use folowing steps to repackage dep package:
1: Extract deb package
# dpkg-deb -x <package.deb> <dir>
2: Extract control-information from a package
# dpkg-deb -e <package.deb> <dir/DEBIAN>
3. After completed to make changes to the package, repack the deb
# dpkg-deb -b <dir> <new-package.deb>

DPKG CHEATSHEET

# Download .deb file from repo
apt downloadd ${PACKAGE_NAME}

# extract control info
dpkg-deb -R ${PACKAGE_NAME} ${TO_WHERE}

# download source build
@jshen28
jshen28 / linux-userful-commands.md
Last active January 24, 2019 00:51
command cheatsheet
set autoindent shiftwidth=4 expandtab tabstop=4
execute pathogen#infect()
syntax on
filetype plugin indent on
nmap :nerdtt :NERDTreeToggle<CR>
@jshen28
jshen28 / rabbitmq.txt
Created January 7, 2019 05:28 — forked from sdieunidou/Sweet-Dog.md
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"

ETHTOOL CHEATSHEET

To get a full list of available options, use man ethtool.

SHOW NIC INFO/DRIVER

ethtool -i ${NIC}

IPMITOOLS CHEATSHEET

# print info
ipmitool lan print

# restart bmc
ipmitool -I lanplus -U <USERNAME> -P <PASSWORD> -H <HOST_ADDRESS> bmc reset cold

# change boot order