Monthly Archives: January 2012


Ubuntu 11.10 (Oneiric Ocelot): Cloning a KVM Virtual Machine

After properly installing and creating your first virtual machine, you might want to create a clone for some reason.

To do this we use the command virt-clone as follows:

sudo virt-clone --connect qemu:///system -o coeus -n phoebe -f /home/kvm/2KA.qcow2 -f /home/kvm/zK6.qcow2 --force

Where:

  • –connect is used to connect to the hypervisor of the virtual machine, here it is system
  • -o is the original virtual machine name (which is registered with the previous hypervisor)
  • -n is the name of the new virtual machine, the clone (this name will be used to register the clone to the hypervisor)
  • -f the location that the clone will use to store it’s virtual hard drives, can be used as many times as needed (in the above example coeus has two hard disks and that is why we need to provide two -f paramaters)
  • –force prevents interactive prompts and replies ‘yes’ to all yes/no questions

There is more directives that can be provided to the clone manager from which a very important one is the: –mac where you get to define the mac address of the new virtual machine (e.g –mac C0:FF:EE:11:00:11)


KVM: How to configure a bridge connection in Ubuntu 11.10 2

Make the file : /etc/network/interfaces  look something like this (make changes only to br0, add it if not there and to the device that you want to bridge with, we used eth1):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

# Building a bridge to be used by the Virtual Machines
auto br0
iface br0 inet static
        address 192.168.0.10
        network 192.168.0.0
        netmask 255.255.255.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports eth1
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off

Then issue: sudo /etc/init.d/networking restart
If you get:

* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...                                                                                                                                                    RTNETLINK answers: File exists
ssh stop/waiting
ssh start/running, process 11489

Waiting for br0 to get ready (MAXWAIT is 20 seconds).
RTNETLINK answers: File exists
Failed to bring up br0.                        [ OK ]

Try bringing down the device to be bridged (eth1) like this: sudo  ifdown eth1 and then issue sudo /etc/init.d/networking restart again.
After that enable it the device again again like this: sudo  ifup eth1
If this doesn’t worked try restarting the machine, worked for us.

When properly configured ifconfig should result to something similar as this:

br0       Link encap:Ethernet  HWaddr 00:1a:64:67:d3:86  
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21a:64ff:fe67:d386/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1752 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:136973 (136.9 KB)  TX bytes:1500 (1.5 KB)

eth0      Link encap:Ethernet  HWaddr 00:1a:64:67:d3:84  
          inet addr:10.16.20.60  Bcast:10.16.20.63  Mask:255.255.255.224
          inet6 addr: fe80::21a:64ff:fe67:d384/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:91218 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51796 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:123551183 (123.5 MB)  TX bytes:4754458 (4.7 MB)
          Interrupt:16 Memory:ce000000-ce012800

eth1      Link encap:Ethernet  HWaddr 00:1a:64:67:d3:86  
          inet addr:10.16.20.33  Bcast:10.16.20.63  Mask:255.255.255.224
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:2605 errors:0 dropped:48 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:321878 (321.8 KB)  TX bytes:3490 (3.4 KB)
          Interrupt:17 Memory:ca000000-ca012800

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:129 errors:0 dropped:0 overruns:0 frame:0
          TX packets:129 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:17588 (17.5 KB)  TX bytes:17588 (17.5 KB)

virbr0    Link encap:Ethernet  HWaddr b6:ae:8d:e0:06:c3  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


HOWTO: Make Terminator Terminal Act Like Guake Terminal in Ubuntu 11.10 8

Updated instructions for Fedora 23 can be found here http://bytefreaks.net/gnulinux/bash/howto-make-terminator-terminal-act-like-guake-terminal-in-fedora-23

For Ubuntu 16.04LTS here http://bytefreaks.net/gnulinux/howto-make-terminator-terminal-act-like-guake-terminal-in-ubuntu-16-04-lts-the-easy-ways

Installation:

We had to install the beta version so that it supports a new feature that is not currently available in the Ubuntu repositories:

sudo add-apt-repository ppa:gnome-terminator/ppa
sudo apt-get update
sudo apt-get install terminator

After that, create the following file: ~/.config/terminator/config  and add the following text in it:

[global_config]
  enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
  always_on_top = True
  tab_position = bottom
  sticky = True
[keybindings]
  hide_window = F12
[profiles]
  [[default]]
    background_darkness = 0.75
    background_type = transparent
    foreground_color = "#ffffff"
[layouts]
  [[default]]
    [[[child0]]]
      position = 0:24
      type = Window
      order = 0
      parent = ""
      size = 1679, 298
    [[[child1]]]
      position = 839
      type = HPaned
      order = 0
      parent = child0
    [[[terminal3]]]
      profile = default
      type = Terminal
      order = 1
      parent = child1
    [[[terminal2]]]
      profile = default
      type = Terminal
      order = 0
      parent = child1
  [[original]]
    [[[child1]]]
      type = Terminal
      parent = window0
      profile = default
    [[[window0]]]
      type = Window
      order = 0
      parent = ""
[plugins]

This will configure terminator to accept the F12 button as a hide/show command wherever you are and will initially create a session with two terminals when you start terminator, as in the screenshot below:


Κοινωνικά Δίκτυα Τμήματος Πληροφορικής

Αγαπητοί φοιτητές,

Σας ενημερώνουμε ότι το Τμήμα Πληροφορικής διατηρεί λογαριασμούς στο twitter και στο facebook για διάχυση πληροφοριών που ενδιαφέρουν τη φοιτητική κοινότητα του Τμήματος, όπως π.χ. θέσεις εργασίας, θέσεις πρακτικής κατάρτισης στην Κύπρο και το εξωτερικό, επαγγελματικά θέματα κλπ.

Στο twitter μπορείτε να παρακολουθείτε τα twits του λογαριασμού @csdeptucy και στο facebook να κάνετε like την ομάδα Computer Science Department, University of Cyprus. Οι ανακοινώσεις των δύο αυτών κοινωνικών δικτύων εμφανίζονται επίσης και στην ιστοσελίδα Student’s Corner του ιστιακού τόπου του Τμήματος: http://www.cs.ucy.ac.cy/students-corner

Οι σελίδες ενημερώνονται συνεχώς.


H.S. Data Ltd – .NET Developer (this posting is for Nicosia area)

There is an opening at the company for a fixed-term (six months to one year) contract full-time position as a Junior .NET Developer (requirements shown below). Preferably they would like to hire a person that recently graduated (e.g. December 2011).

On behalf of mr. Michalis Michael ([email protected]):
Our company, one of the leading providers of Total Information Technology Solutions in Cyprus , is looking for a .NET Developer for a fixed-term contract.
The right candidate must have:

  • University degree in Computer Science or related field
  • Hands-on experience with .NET development (preferably C# or VB.NET)
  • Hands-on Experience with  Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) will be considered as an advantage
  • Ability to work under tight deadlines and pressure
  • Excellent command of Greek and English Languages
  • Strong verbal/ written communications and analytical skills

Please send your CV via email at [email protected]

H.S. Data Limited
13 Arsinoes Street, CY-2006 Strovolos,  Cyprus
Correspondence: PO Box 21604, CY-1511 Nicosia, Cyprus
(T) +357 22697740 | (M) +357 99221345 | (W) www.hsdata.com


Εκπαιδευτική Ημερίδα Παγκύπριας Ολυμπιάδας Πληροφορικής 1

Η επιτροπή για την Παγκύπρια Ολυμπιάδα Πληροφορικής Δευτεροβάθμιας Εκπαίδευσης (http://www.pspo.org.cy) διοργάνωσε την Δευτέρα, 23 Ιανουαρίου 2012, μια εισαγωγική διάλεξη σε βασικούς αλγόριθμους και μεθόδους αλγοριθμικής επίλυσης προβλημάτων σε μια ομάδα 12 καθηγητών Λυκείου και διάρκεσε 7 ώρες, ξεκινώντας από τις 09:00 (μέχρι τις 16:00). Η ημερίδα αποτελεί μέρος μιας νέας σειράς βημάτων για ανάπτυξη και βελτίωση των ικανοτήτων των διαγωνιζομένων μας.

Ευχαριστούμε πολύ το Τμήμα Πληροφορικής του Πανεπιστημίου Κύπρου (http://www.cs.ucy.ac.cy) το οποίο διατέλεσε τον κύριο χορηγό της εκδήλωσης και μας παραχώρησε την αίθουσα ΘΕΕ01/023 (Αίθουσα συνεδριάσεων δίπλα από την καντίνα του κτιρίου) για να κάνουμε την ημερίδα και  ποσό για αγορά αλμυρών και καφέδων.

Επίσης ευχαριστούμε το Υπουργείο Παιδείας που έδωσε την ημέρα ελεύθερη στους καθηγητές Λυκείων για επιμορφωτικά μαθήματα. 


Ubuntu Linux: How to install Apache2 – MySQL – PHP (LAMP) phpMyAdmin and fix a few installation errors

We won’t give out pretty much any comments/descriptions for this post because we want to keep it small 🙂

First, install a bunch of stuff:

sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5 php5-mysql

Later, restart your apache so that it loads all modules (php, etc)

sudo /etc/init.d/apache2 restart

and if you get the following error:
“Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName” resolve it by adding the line:

ServerName localhost

to the file /etc/apache2/httpd.conf and then try restarting again. (You need root access to edit, if you are not familiar with command line text editors line nano, try sudo gedit /etc/apache2/httpd.conf, gedit is usually available with all gnome installations).

After that, to install phpMyAdmin and make it available at http://localhost/phpmyadmin:

sudo apt-get install phpmyadmin
sudo ln -s /usr/share/phpmyadmin /var/www

(The default MySQL login username ‘root’ and the password is the one you entered during installation in the last step).

Happy developing, hope we helped 🙂