rules.d]# udevadm info-a-p/sys/block/vdbUdevadm info starts with the device specified by the Devpath and thenWalks up the chain of parent devices. It prints for every deviceFound, all possible attributes in the UDEV rules key format.A rule to match, can is composed by the attributes of the deviceAnd the attributes from a single parent device.Looking at device '/DEVICES/PCI0000:00/0000:00:06.0/VIRTIO3/BLOCK/VDB ':kernel== "VDB"subsystem== "Block"driver== ""attr{range}== "16"attr{ext_range}== "16
automatic allocation is selected, the allocation will be incremented starting from 5900. After startup, you need to install drivers for Windows inside, and all binaries required by Windows can be found in the Windows binaries http://spice-space.org/download.html here. First download QXL driver, when Windows prompts you to install the driver file, install the QXL driver, you can complete the spice display function. Before installing Windows driver on this page of http://www.linux-kvm.com/content
auto set specified partition to Bios_grubIP link Set enp2s0f0 upIP addr Add 192.168.1.2/24 dev enp2s0f0IP route add default via IP addressNano/etc/modules-load.d/virtio-net.conf# Load ' Virtio-net.ko ' at boot.Virtio-net# Pacman-s Grub# Grub-install--TARGET=I386-PC--RECHECK/DEV/SDATip: If you want to automatically detect other operating systems installed on your hard disk, install Os-prober, or Pacman-s os
Kvm lvm dynamic addition of Virtual Machine disk best practices 1. when the VM is installed, use the LVM partition of the host 1.1 to create the lvm partition # lvcreate-L 10G-n lv_vm_img vg1.2 use this partition to create the VM # koan -- server = localhost -- port = "11180" -- virt -- system = "vm_img1" -- virt-path = "/dev/mapper/vg-lv_vm_img" -- virt-type = kvm -- qemu-disk-type = virtio -- qemu-net- type = vi
raw to adjust the size and then go back to avoid this problem
Virt-installWhen installing a virtual machine, it is commonSuch as:[Email protected] ~]# virt-install--name=vm2--ram,--vcpus=1--disk path=/image/vm2.img,size=7,bus=virtio--Accelerate--cdrom=/iso/rhel6.5/rhel-server-6.5-x86_64-dvd.iso--vnc--vncport=5910--vnclisten=0.0.0.0--network Bridge=br0,model=virtio--noautoconsoleviewing partition infor
machine's IO access is slow.Rustyrussell, an IBM scientist, has created Virtio technology with the help of Xen's research and development experience. is to write a set of PCI virtual devices and drivers in the virtual machine, the virtual PCI device has a piece of virtual device memory. This virtual device memory host is accessible and can be accessed by the virtual machine via the Virtio driver. That is,
toHost kernel. Vhostwith theKvmthe event communication throughEventfdmechanisms to achieve this, mainly including two directions.Event, one isGuestto theVhostdirection ofKick Event, throughIoeventfdthe other isVhostto theGuestdirection ofCall Event, throughIrqfdbearer. use of Guest_notifier:
Vhost after processing the request (Received the packet), the buffer is placed on the used ring above, to call FD inside write;
If you have successfully set up Irqfd kvm will be directly inte
Primary content:KVM Fundamentals (reprint)How to deploy a KVM hostQuickly create the first virtual machineNic Bridging, NAT configurationHow NAT develops an IP addressNat Initial Network firewall configuration, how to port mappingVirsh Command IntroductionSupport for Virsh consoleVirt-install and Qemu-img Command detailedHow to add a network card and diskIntermediate Stage:Understanding of XML File formatsDynamically adjust memory and CPUIntroduction to KVM CloningKVM Snapshot Introduction Learn
/bin/qemu-kvm
Create a bridge: CAT/etc/sysconfig/network-scripts/ifcfg-br0
Device = br0type = bridgeonboot = yesbootproto = staticipaddr = Public IP netmask = Public IP mask gateway = Public IP Gateway
Modify Nic information to connect Nic to bridge: CAT/etc/sysconfig/network-scripts/ifcfg-em1
DEVICE=em1BRIDGE=br0ONBOOT=yesBOOTPROTO=none
Restart NIC:
servicenetworkrestart
View bridges:
[[emailprotected]data1]#brctlshowbridgenamebridgeidSTPenabledinterfacesbr08000.d4ae526e935anoem1virbr08000.5254
Device Simulation
Hypervisor provides a way to share CPU with multiple operating systems (CPU virtualization), but to provide complete virtualization, the entire environment must be virtualized for these VMS. Machine-or platform-simulation can be implemented in several ways. One popular open-source package supports many hypervisor, calledQemu. Qemu is a complete simulator and hypervisor. However, KVM only uses qemu for device simulation as a separate process in the user space. One interesting
: select the NIC type
Step 11: Go to virtualization settings and select the first item
Step 12: select the time zone, input method, and language support
Step 13: select the software environment
Step 14: Set the hard disk
Step 15: Set the superuser password
1. Virtual Machine installation ()
[VM vm_create.sh]
[Root @ foundation3 sbin] # vim/sbin/vm_create.sh // create a fully automated creation script
#! /Bin/bash // not Annotation
Virt-install \ // start the Virtual Machine Installer
-- Lo
5G-n kvm-mig store on Ubuntu-src use virt-install to install the vm to the kvm-mig volume: www.2cto. com1virt-install-d-n kvm-mig-r 2048 -- disk path =/dev/store/kvm-mig, bus = virtio, cache = none -- network bridge = br0, model = virtio -- vnc -- cdrom =/opt/after the debian-6.0.2.1-amd64-CD-1.iso is installed, start the Virtual Machine and log on to view, such: get resources for shared storage 1 iscsiadm
vmdisk storage pool has been created. You can create a virtual disk file directly in this storage pool.5. Create a virtual machine storage volume in the storage pool (1) create a virtual machine storage volume in the storage pool
# virsh vol-create-as vmdisk oeltest03.qcow2 20G --format qcow2
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://img1.51cto.com/attachment/201310/2/7035
-virtualizationprinciple: Para-virtualization, also known as para-virtualization, was first used by Citrix's Xen. In the semi-virtualized model, the unified physical hardware resources are managed by hypervisor, and the hypervisor provides the resource invocation interface. The virtual sub-machine communicates with the hypervisor through a specific calling interface, and then the full I/O resource controls the operation. The Para-virtualization model diagram is as follows:Para-virtualization, al
and/or incomplete code/drivers" = y
(Config_experimental = y)
"Processor type and features ":
"Paravirtualized guest support" = y
"Lguest guest support" = y
"High memory support" = off/4 GB
"Alignment value to which kernel shoshould be aligned" = 0x100000
(Config_paravirt = Y, config_lguest_guest = Y, config_highmem64g = N and
Config_physical_align = 0x100000)
"Device drivers ":
"Staging drivers" = N
"Block devices"
"Virtio block Driver (experiment
1. Lab description
Qcow2 disk format is recommended for KVM virtual machines in centos 7. In this tutorial, centos 6.8 64 virtual machines are installed in KVM.2. Command deployment process 2.1 upload an image
Use winscp to upload to/data/ISO/2.2 format a disk
1 virt-install --network bridge=br0,model=virtio --name=vm01-centos6.8 --ram=1024 --vcpus=2 --disk path=/data/images/vm01-centos6.8.img,size=20,bus=virtio
UFW firewall configuration policy.
5, the guest host installation
To create a mirrored file and view file information:
The code is as follows
Copy Code
sudo qemu-img create-f qcow2-o preallocation=metadata centos.img 20GQEMU-IMG Info centos.img
Install guest host system with VNC:
The code is as follows
Copy Code
sudo virt-install--name centos--ram=1024--arch=x86_64--vcpus=1--os-variant=rhel6--disk path=/opt/centos.img,bus=
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.