Difference between revisions of "KVM"

From Linuxintro
imported>ThorstenStaerk
Line 6: Line 6:
 
This has been tested on SUSE Linux 11.2, 11.3 and 11.4.
 
This has been tested on SUSE Linux 11.2, 11.3 and 11.4.
  
  This is a great idea, Lisa. I'll be fwonloilg with great interest. I am working in an area that relates to online safety and this is a topic of increasing debate and significance.
+
=== Networking ===
 +
You will have to set up networking for your virtual machines. Otherwise they won't start. So, on your host machine:
 +
* 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
  
AFAIC that's the best anwesr so far!
+
=== KVM Software ===
 +
* 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
  
 
= backup =
 
= backup =
Line 14: Line 27:
 
  # cp -r /var/lib/xen/images/''virtual_machine'' /''target''
 
  # cp -r /var/lib/xen/images/''virtual_machine'' /''target''
  
Thanks for this ifmornation. I agree that it’s extremely cool. I have only been playing with KVM for a little bit due to time constraints and deadlines. I’m interested to know if it offers some thing provisioning like Xen does.Also, on your “San on the cheap” article, I’d like to see the follow up, especially if you used Openfiler or were booting via iSCSI
+
= 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
 +
 
 +
== 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

Revision as of 03:18, 16 February 2012

KVM is the Linux kernel's native virtualization.

Install it

SUSE 11

This has been tested on SUSE Linux 11.2, 11.3 and 11.4.

Networking

You will have to set up networking for your virtual machines. Otherwise they won't start. So, on your host machine:

  • 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

  • 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

backup

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

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

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