Tag Archives: Linux

Setting Proxy in Linux

Through command line export http_proxy=http://proxyhost:port export https_proxy=http://proxyhost:port export ftp_proxy=http://127.0.0.1:3128 With authentication export http_proxy=http://user:password@host:port/ export https_proxy=http://user:password@host:port/ If the password is having special characters use the hex key code instead. Eg: If password is P@ssword use P%40ssword. %40 is the hex keycode … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Assign VLANs with OpenVswitch fake bridges

Lets create the fake vlan bridge vlan101. The syntax is ovs-vsctl add-br <fake bridge> <parent bridge> <VLAN> root@ubuntu:~# ovs-vsctl add-br vlan101 switch0 101 root@ubuntu:~# ovs-vsctl show 3bd99bd5-2e3b-41b8-8d84-66a75ebb97cc Bridge “switch0” Port “switch0” Interface “switch0” type: internal Port “vlan101” tag: 101 Interface … Continue reading

Posted in KVM, Linux, openvswitch, Virtualization | Tagged , , | Leave a comment

OpenVswitch Networking for LXC Continers

Using the libvirt we can attach the LXC container to the OVS switches as the same way we do it for KVM vms Lets create an OVS bridge root@ubuntu:~# ovs-vsctl add-br switch0 root@ubuntu:~# ovs-vsctl show switch0 3bd99bd5-2e3b-41b8-8d84-66a75ebb97cc Bridge “switch0” Port … Continue reading

Posted in Linux, openvswitch, Virtualization | Tagged , , | Leave a comment

Provision LXC containers using Libvirt

Install the libvirt if not already installed apt-get install libvirt-bin Create a XML definition file for the new lxc container cat test-container.xml <domain type=’lxc’> <name>test-container</name> <memory>127680</memory> <os> <type>exe</type> <init>/sbin/init</init> </os> <vcpu>1</vcpu> <clock offset=’utc’/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> <filesystem type=’mount’> … Continue reading

Posted in Linux, Virtualization | Tagged , , , | Leave a comment

Define the network through virsh

This post will show you how to define a new network in libvirt. Below network has two trunked VLAN portgroups and an untagged portgroup. [root@centos7 ~]# cat ovs.xml <network> <name>ovs</name> <uuid>cdbd8024-bb4e-4b98-8ef0-e5eeff673e48</uuid> <forward mode=’bridge’/> <bridge name=’OVS-br0’/> <virtualport type=’openvswitch’/> <portgroup name=’trunk1′> <vlan … Continue reading

Posted in Linux, openvswitch, Virtualization | Tagged , , | Leave a comment

OpenVswitch installation in Centos7

Download the required packages though yum yum -y install wget openssl-devel gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool Prepare the directories for building the RPM, download source and build mkdir -p ~/rpmbuild/SOURCES cd ~/rpmbuild/SOURCES/ wget … Continue reading

Posted in Linux, Virtualization | Tagged , | Leave a comment

How to attach LXC container to OVS (OpenvSwitch)

By default lxc containers will be attached to the Linux bridge lxcbr0 Create a new LXC container lxc-create -n ubuntu -t ubuntu Check the bridge configuration root@ubuntu:/var/lib/lxc/ubuntu# brctl show bridge name bridge id STP enabled interfaces docker0 8000.000000000000 no lxcbr0 … Continue reading

Posted in Linux, Virtualization | Tagged , , | 3 Comments

Ubuntu Brightness resetting to Maximum on every Restart

Fix this by adding the below parameter to /etc/rc.local echo X > /sys/class/backlight/acpi_video0/brightness Replace the the X with the preferred brightness value 0-10. This solution is not perfect as it will not set to the new value if you change … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

USB Mouse stops working in Ubuntu Laptop

Yes, some times it is really frustrating that the simple things in Linux stops working and you don’t have any clue about what setting need to be changed. I think that’s why it is still not the preferred desktop OS … Continue reading

Posted in Linux | Tagged , , | 1 Comment

iSCSI Initiator Settings

There are couple of setting you can tweak on the initiator. Initiator Name Edit the /etc/iscsi/initiatorname.iscsi file and replace the number with your initiator hostname. InitiatorName=iqn.1994-05.com.redhat:node1 Restricting iSCSI interface If there are multiple ethernet interfaces, it is possible to restrict … Continue reading

Posted in Linux, Uncategorized | Tagged , | Leave a comment