1. test whether the CPU supports virtualization.
Intel: grep vmx/proc/cpuinfo
AMD: grep SVM/proc/cpuinfo
2. Install KVM
Yum install KVM kmod-KVM
3. Install qemu
Yum install qemu
4. modprobe KVM
Intel: modprobe KVM-intel
AMD: modprobe KVM-AMD
If it succeeds, you can see the module through the following command
/Sbin/lsmod | grep KVM
5. Create a virtual machine
Qemu-IMG create-F qcow2 myxp. IMG 5g
Qemu-KVM-hda myxp. IMG-CDROM xp. iso-M 512-boot d
The memory size is 512 MB, disk. IMG is the file generated in the previous step, and XP. ISO is the ISO file of XP,
6. Start a virtual machine
Qemu-KVM-hda myxp. img
7. Create file/etc/sysconfig/network-scripts/ifcfg-br0
The ifcfg-br0 content is as follows:
Device = br0
Type = Bridge
Bootproto = static
Broadcast = 10.5.17.255
Ipaddr = 10.5.17.249
Netmask = 255.255.255.0
Network = 10.5.20.
Gateway = 10.5.17.254
Onboot = Yes
8. Modify/etc/sysconfig/network-scripts/ifcfg-eth0:
Device = eth0
# Type = Ethernet (if not annotated)
Onboot = Yes
Bridge = br0
hwaddr =...
9. Restart the network service.
# service network restart