This will allow you to use Open vSwitch with Libvirt to put your VMs on the same network as the host and not use the default NAT based bridge.
dnf install -y virt-install libvirt openvswitch
#!/bin/bash | |
# Hacky fix for Google Chrome unstable (43.0.2342.2 dev) on a HiDPI screen. | |
# See https://code.google.com/p/chromium/issues/detail?id=469373 for more details | |
xprop -root -remove _NET_WORKAREA | |
google-chrome-unstable --force-device-scale-factor=2 > /dev/null 2>&1 & |
IPTABLES="ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state ip_nat_ftp ipt_recent ip_conntrack_ftp xt_mac ip_conntrack_irc ipt_owner ipt_REDIRECT iptable_nat, ip_tables" | |
IPTABLES_MODULES="$IPTABLES xt_connlimit nf_nat" |
http://stackoverflow.com/questions/985725/tools-for-jpeg-optimization | |
http://www.imagemagick.org/script/command-line-options.php#gravity | |
http://superuser.com/questions/275476/square-thumbnails-with-imagemagick-convert | |
# Convert with focus on north gravity of image | |
convert -define jpeg:size=800x600 image1.jpg -thumbnail 800x600^ -gravity north -extent 800x600 image1_thumb.jpg | |
# Convert from the center of image | |
convert -define jpeg:size=800x600 image2.jpg -thumbnail 800x600^ -gravity center -extent 800x600 image2_thumb.jpg |
# lspci |grep Wireless | |
04:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59) | |
# uname -a | |
Linux 4.1.4-200.fc22.x86_64 #1 SMP Tue Aug 4 03:22:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux | |
# /sbin/ethtool -i wlp4s0 |grep firm | |
firmware-version: 25.17.12.0 |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.define :dev do |dev| | |
dev.vm.box = "centos/7" | |
dev.vm.hostname = "ansible" | |
dev.vm.network :public_network, :dev => "ovsbr0", :ovs => true |
awk '{ if (NR==1) {getroot = "blkid -s UUID /dev/fedora_server/root|cut -d: -f2"} {getroot |& getline root } {$1=root} \ | |
if (NR==2) {close("getroot")}{getboot = "blkid -s UUID /dev/mmcblk0p1|cut -d: -f2"} {getboot |& getline boot} {$1=boot} {close("getboot")} \ | |
if (NR==3) {close("getboot")}{getswap = "blkid -s UUID /dev/mmcblk0p2|cut -d: -f2"} {getswap |& getline swap} {$1=swap} } {close("getswap")}1' etc/fstab | |
--- | |
- name: Gather EC metadata facts | |
action: ec2_facts | |
- name: List tags on an instance | |
ec2_tag: | |
region: "{{ ansible_ec2_placement_region }}" | |
resource: "{{ ansible_ec2_instance_id }}" | |
state: list | |
register: instance |
[root@localhost ~]# dkms build -m wireguard -v 0.0.20170907 | |
Kernel preparation unnecessary for this kernel. Skipping... | |
Building module: | |
cleaning build area... | |
make -j1 KERNELRELEASE=3.10.0-693.2.2.el7.x86_64 -C /lib/modules/3.10.0-693.2.2.el7.x86_64/build M=/var/lib/dkms/wireguard/0.0.20170907/build...(bad exit status: 2) | |
Error! Bad return status for module build on kernel: 3.10.0-693.2.2.el7.x86_64 (x86_64) | |
Consult /var/lib/dkms/wireguard/0.0.20170907/build/make.log for more information. | |
[root@localhost ~]# cat /var/lib/dkms/wireguard/0.0.20170907/build/make.log |
[Path] | |
PathChanged=/etc/systemd/network/wg0.network | |
PathChanged=/etc/systemd/network/wg0.netdev | |
[Install] | |
WantedBy=multi-user.target |