Difference between revisions of "KVM"
From Linuxintro
imported>ThorstenStaerk |
|||
Line 29: | Line 29: | ||
# chkconfig libvirtd on | # chkconfig libvirtd on | ||
# virt-manager | # virt-manager | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Network === | === Network === | ||
Line 61: | Line 48: | ||
route del -net 192.168.0.0 netmask 255.255.255.0 eth0 | route del -net 192.168.0.0 netmask 255.255.255.0 eth0 | ||
Reference: http://kbase.redhat.com/faq/docs/DOC-19071 | 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'/> | ||
+ | To resolve this | ||
+ | * you disable networking | ||
= backup = | = backup = | ||
# virsh list --all | # virsh list --all | ||
# cp -r /var/lib/xen/images/''virtual_machine'' /''target'' | # cp -r /var/lib/xen/images/''virtual_machine'' /''target'' |
Revision as of 09:54, 21 October 2011
KVM is the Linux kernel's native virtualization.
Contents
Install it
SUSE 11.3
Networking
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
- 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
- Make sure you have a modern computer and "virtualization technology" switched on in your BIOS
- 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'/>
To resolve this
- you disable networking
backup
# virsh list --all # cp -r /var/lib/xen/images/virtual_machine /target