Difference between revisions of "KVM"

From Linuxintro
 
(18 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
KVM is the Linux kernel's native virtualization.
 
KVM is the Linux kernel's native virtualization.
  
= Install it =
+
I'm a beginner Linux user and was lkoiong for a source that would introduce me to Linux as well as would turn me into a confident beginning Linux operator. This book doesn't meet that simple criterion. It is one big puzzle from the start. And even though one might be inclined to say that this is a well though-out approach as to make the reader learn more  I don't think so. I have read many computer books before and it doesn't have to be this way. Examples of frustrating encounters are chapters in which the author uses concepts that have yet to be introduced. It is confusing as you, as the reader, don't really know whether or not you missed something. But in every case, it turns out that the subject is being discussed further down the road. This made me then skip some chapters and start reading the  Running Commands From The Shell  chapter. But even in that chapter, I felt left in the dark as simple concepts as downloading and installing a package was not even described. In fact, you can find that particular topic in chapter one, where a few very narrow examples are given. I don't know Mr. Negus and haven't read anything prior from him. But I feel he really let me down in starting my initial Linux experience. The reason I feel confident to write this review is that I have purchased another book which really has made the Linux experience a good one. For those who are interested . if you're new to Linux and would like to get a kickstart  consider  A Practical Guide to Linux  by Mark Sobell.
  
== SUSE 11.3 ==
+
= backup =
 +
# virsh list --all
 +
# cp -r /var/lib/xen/images/''virtual_machine'' /''target''
  
=== Networking ===
+
= TroubleShooting =
You want networking for your virtual machines, so
 
* start networking configuration
 
yast2 lan
 
* delete the configuration of your network card. We call it ''eth0'' in this example.
 
* create an additional network device, a bridge, using yast2. Assign it your default IP address. Configure it to bridge network traffic for ''eth0''.
 
* restart networking
 
/etc/init.d/network restart
 
  
=== KVM Software ===
+
Kernel crash [ Reason: WARNING: at net/sced/sch_generic.c:258 dev_watchdog                                                        +0xc6/0x12e() ]Gnome panel crash [ Reason: Process /usr/bin/gnome-panel was killed by siagnl                                                11 (SIGSEGV)  ]And is happening at every start from live DVD. Well, this doesn't seem to bea rock solid release. No ofense. Waiting for the real rock.(I tried on three computers  especially the gnome panel error was present)
* install the KVM software like this:
 
# yast -i kvm virt-manager
 
# /etc/init.d/libvirtd start
 
  # chkconfig libvirtd on
 
# virt-manager
 
* click on new, continue as adviced
 
  
== SUSE 11.2 ==
+
== internal error No <source> 'bridge' attribute specified ==
* Make sure you have a modern computer and "virtualization technology" switched on in your BIOS
+
'''Symptom:''' When starting a virtual machine you get an error
* [[open a console]] and enter
 
# yast -i kvm virt-manager
 
# /etc/init.d/libvirtd start
 
# chkconfig libvirtd on
 
# virt-manager
 
 
 
=== Network ===
 
If you want networking in your virtual machines, you will have to set up bridged networking on your host computer first. So:
 
* start networking configuration
 
yast2 lan
 
* delete the configuration of your network card. We call it ''eth0'' in this example.
 
* create an additional network device, a bridge, using yast2. Assign it your default IP address. Configure it to bridge network traffic for ''eth0''.
 
* restart networking
 
/etc/init.d/network restart
 
* restart the hypervisor
 
/etc/init.d/libvirtd restart
 
* create a new virtual machine with networking
 
 
 
==== more information ====
 
brctl show
 
brctl addbr br0
 
brctl addif br0 eth0
 
route del -net 192.168.0.0 netmask 255.255.255.0 eth0
 
Reference: http://kbase.redhat.com/faq/docs/DOC-19071
 
 
 
= TroubleShooting =
 
 
 
== The hypervisor is not running ==
 
Now you try to create a new virtual machine. When you use Paravirtualization, you get the error message "The hypervisor is not running.". When you try to use "Full virtualization", you get an error
 
The operating system does not support full virtualization
 
The CPUs support full virtualization, but it is disabled in the BIOS
 
To resolve this,
 
* create a new connection, type "QEMU/KVM"
 
* reboot your computer
 
* start virt-manager
 
create a new virtual machine. You get an error
 
 
  internal error No <source> 'bridge' attribute specified with <interface type='bridge'/>
 
  internal error No <source> 'bridge' attribute specified with <interface type='bridge'/>
 
To resolve this
 
To resolve this
* you disable networking  
+
* you disable networking
 +
 
 +
== hypervisor not running ==
 +
'''Symptom:''' When creating a new virtual machine you get an error message
 +
Error launching manager: A hypervisor is not running.  For kvm, load the kvm kernel modules.  If you want to run xen, reboot and load the xen kernel.
  
= backup =
+
'''Solution:'''
# virsh list --all
+
* load the kvm kernel modules like this:
# cp -r /var/lib/xen/images/''virtual_machine'' /''target''
+
modprobe kvm-intel
 +
* restart virt-manager

Latest revision as of 02:51, 23 November 2015

KVM is the Linux kernel's native virtualization.

I'm a beginner Linux user and was lkoiong for a source that would introduce me to Linux as well as would turn me into a confident beginning Linux operator. This book doesn't meet that simple criterion. It is one big puzzle from the start. And even though one might be inclined to say that this is a well though-out approach as to make the reader learn more I don't think so. I have read many computer books before and it doesn't have to be this way. Examples of frustrating encounters are chapters in which the author uses concepts that have yet to be introduced. It is confusing as you, as the reader, don't really know whether or not you missed something. But in every case, it turns out that the subject is being discussed further down the road. This made me then skip some chapters and start reading the Running Commands From The Shell chapter. But even in that chapter, I felt left in the dark as simple concepts as downloading and installing a package was not even described. In fact, you can find that particular topic in chapter one, where a few very narrow examples are given. I don't know Mr. Negus and haven't read anything prior from him. But I feel he really let me down in starting my initial Linux experience. The reason I feel confident to write this review is that I have purchased another book which really has made the Linux experience a good one. For those who are interested . if you're new to Linux and would like to get a kickstart consider A Practical Guide to Linux by Mark Sobell.

backup

# virsh list --all
# cp -r /var/lib/xen/images/virtual_machine /target

TroubleShooting

Kernel crash [ Reason: WARNING: at net/sced/sch_generic.c:258 dev_watchdog +0xc6/0x12e() ]Gnome panel crash [ Reason: Process /usr/bin/gnome-panel was killed by siagnl 11 (SIGSEGV) ]And is happening at every start from live DVD. Well, this doesn't seem to bea rock solid release. No ofense. Waiting for the real rock.(I tried on three computers especially the gnome panel error was present)

internal error No <source> 'bridge' attribute specified

Symptom: When starting a virtual machine you get an error

internal error No <source> 'bridge' attribute specified with <interface type='bridge'/>

To resolve this

  • you disable networking

hypervisor not running

Symptom: When creating a new virtual machine you get an error message

Error launching manager: A hypervisor is not running.  For kvm, load the kvm kernel modules.  If you want to run xen, reboot and load the xen kernel.

Solution:

  • load the kvm kernel modules like this:
modprobe kvm-intel
  • restart virt-manager