Install KVM QEMU Virtual Machines in Debian

Posted by root on Sunday Oct 20, 2013 Under Bash, Linux, SSH, Ubuntu, VM


KVM is a full virtualization solution for Linux on x86 (64-bit included) hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko.

In Debian, Xen and VirtualBox are alternatives to KVM.



Install the qemu-kvm package with apt-get or aptitude, e.g. using this command:


aptitude install qemu-kvm libvirt-bin

The daemon libvirt-bin daemon will start automatically at boot time and load the appropriate kvm modules, kvm-amd or kvm-intel, which are shipped with the Linux kernel Debian package. If you intend create VMs from the command-line, install virtinst.

In order to be able to manage virtual machines as regular user you should put this user into the libvirt group:


adduser youruser libvirt


Setting up bridge networking

It can be useful to set up a bridge for the KVM VMs as described here at QEMU page.


Managing VMs from the command-line

You can then use the virsh(1) command to start and stop virtual machines. VMs can be generated using virtinst. For more details see the libvirt page. Virtual machines can also be controlled using the kvm command in a similar fashion to QEMU.


Managing VMs with a GUI

On the other hand, if you want to use a graphical UI to manage the VMs, you can use the Virtual Machine Manager virt-manager.

apt-get install virt-manager


Migrating guests to a Debian host


Migrating guests from RHEL/CentOS 5.x

There are a few minor things in guest XML configuration files (/etc/libvirt/qemu/*.xml you need to modify:

  • Machine variable in <os> section should say pc, not rhel5.4.0 or similar
  • Emulator entry should point to /usr/bin/kvm, not /usr/libexec/qemu-kvm

In other words, the relevant sections should look something like this:


    &lt;type arch='x86_64' machine='pc'&gt;hvm&lt;/type&gt;

  --- snip ---


If you had configured a bridge network on the CentOS host, please refer to this wiki article on how to make it work on Debian.



No network bridge available

virt-manager uses a virtual network for its guests, by default this is routed to and you should see this by typing ip route as root.

If this route is not present in the kernel routing table then the guests will fail to connect and you will not be able to complete a guest creation.

Fixing this is simple, open up virt-manager and go to “Edit” -> “Host details” -> “Virtual networks” tab. From there you may create a virtual network of your own or attempt to fix the default one. Usually the problem exists where the default network is not started.

cannot create bridge ‘virbr0’: File exists:

To solve this probelm you may remove the virbr0 by running:

brctl delbr virbr0

Open virt-manager and go to “Edit” -> “Host details” -> “Virtual networks” start the default network.

You can check the netstatus

virsh net-list --all


Optionally, you can use bridge network BridgeNetworkConnections


See also


External links



Tags : | add comments

How to control audio in debian?

Posted by root on Tuesday Aug 20, 2013 Under Bash, Debian, Linux

PulseAudio Volume Control (pavucontrol) is a simple GTK based volume control tool (“mixer”) for the PulseAudio sound server. In contrast to classic mixer tools this one allows you to control both the volume of hardware devices and of each playback stream separately.


apt-get install pavucontrol


Tags : | add comments

sshfs – failed to open /dev/fuse: Permission denied

Posted by root on Saturday Jul 27, 2013 Under Bash, Debian, Linux, Ubuntu



fusermount: failed to open /dev/fuse: Permission denied


usermod -G fuse &lt;your-username&gt;

Depending on your setup you may need to prefix the solution commands with sudo although this isn’t specific to any platform and many user su. You may not need to reboot but it could save you some hassle in the long run if the problem still persists.  It’s common sense but just in case you didn’t get it, replace <your-username> with the username you use.

Tags : | add comments

Unreal Tournament Under Linuz

Posted by root on Monday Jun 17, 2013 Under Uncategorized eero

Tags : | add comments

Stop / Restart / Start Open SSH Server

Posted by root on Monday Jun 17, 2013 Under Bash, Remote Access, SSH

Ubuntu Linux: Start OpenSSH Server

Type the following command:
$ sudo /etc/init.d/ssh start
$ sudo service ssh start

Ubuntu Linux: Stop OpenSSH server

Type the following command:
$ sudo /etc/init.d/ssh stop
$ sudo service ssh stop

Ubuntu Linux: Restart OpenSSH server

Type the following command:
$ sudo /etc/init.d/ssh restart
$ sudo service ssh restart

Ubuntu Linux: See status of OpenSSH server

Type the following command:
$ sudo /etc/init.d/ssh status
$ sudo service ssh status

Controlling sshd using upstart based commands

Since the script /etc/init.d/ssh has been converted to an Upstart based job, try the following commands to start / stop / restart the OpenSSH server:

Stop/Start/Restart the OpenSSH using the following commands

The syntax is:

sudo stop ssh
sudo start ssh
sudo restart ssh
sudo status ssh

Tags : | add comments

VNC Server on KDE and Lubuntu

Posted by root on Wednesday May 22, 2013 Under Bash, Debian, Linux, Remote Access, Ubuntu

To run a fast desktop manager over slow internet connection use LXDE Desktop Manager or Lubuntu.

The file “~//.vnc/xstartup” must be changed such way:

xrdb $HOME/.Xresources
xsetroot -solid black
lxterminal &amp;
/usr/bin/lxsession -s LXDE &amp;

For Lubuntu:

[ -r HOME/.Xresources ] &amp;&amp; xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &amp;
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &amp;

/usr/bin/lxsession -s Lubuntu -e LXDE &amp;
Tags : | add comments

Mounting a Linux Raid Partition

Posted by root on Wednesday May 22, 2013 Under Bash


mount: unknown filesystem type 'linux_raid_member'
# fdisk -l /dev/sdb 

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


You should not mount it directly using mount. You need first to run mdadm to assemble the raid array. A command like this should do it:

$ mdadm --assemble --run /dev/md0 /dev/sdc1

If it refuses to run the array because it will be degraded, then you can use –force option. This is assuming you don’t have /dev/md0 device. Otherwise, you need to change this name.

When this command is executed successfully, you can mount the created device normally using:

$ mount /dev/md0 /mnt/test
Tags : | add comments

Install HTOP on CentOS 6 64-bits x86_64

Posted by root on Sunday May 19, 2013 Under Bash, Centos, Linux

Installation process::

For CentOS 6 x86_64 – 64 bits

# wget
# rpm -ihv rpmforge-release*.rf.x86_64.rpm


Once RPMforge repository is installed on server then start installation with yum command.

# yum install htop

Now run following command on the terminal for server monitoring.

# htop
Tags : | add comments

Install php-mcrypt in a Centos 6

Posted by root on Sunday May 19, 2013 Under Bash, Centos, Linux, MySql, PHP

The default installation of virutalmin doesn’t come with additional PHP extensions which some php scripts may need, you have to manually install each php extension compare with easyapache from cPanel which you can install all at once.

Add centOS repo

For CentOS 5

rpm -Uvh

For CentOS 6

rpm -Uvh
yum install php-mcrypt

Check php.ini location ( /etc/php.ini is the default virtualmin php.ini location )

php -i | grep php.ini
nano /etc/php.ini

add extension to php.ini


Restart Apache Server

/etc/init.d/httpd restart

After adding centOS Repositories, you could install php extension from virtualmin GUI

Webmin > System Software Packages > Choose Package from YUM >

Click Browse YUM, type the php extension name in the search box and click find packing matching button, and then click the package name install.

Add php extension to php.ini from virtualmin GUI

Webmin > Others > PHP Configuration > Edit Manually
Don’t forget to restart apache server.

Most popular PHP extension you may need:
Format: extension = [extension name].so

•pdo_mysql (requires pdo)
•pdo_odbc (requires pdo)
•pdo_pgsql (requires pdo)
•pdo_sqlite (requires pdo)

Tags : | add comments

Upgrade Teamspeak Server in Linux OS

Posted by root on Tuesday May 7, 2013 Under Bash, Centos, Linux, Ubuntu

You won’t loose any channel or user or permission during your update.

Make a copy of your database file called ts3server.sqlitedb (needed for a downgrade and it’s alays better to have a backup)

Now download the server and extract it to the old server folder. Overwrite all files.

Start the server and its done

Tags : | add comments