Requirements for KVM and kernel versions supported by virtio (method 2)

Source: Internet
Author: User
Virtio [edit]

Paravirtualized drivers for KVM/Linux
    • Virtio was chosen to be the main platform for Io Virtualization in KVM
    • The idea behind it is to have a common framework for hypervisors for Io implements alization
    • More information (although not uptodate) can be found here
    • At the moment network/block/balloon devices are suported for KVM
    • The host implementation is in userspace-qemu, so no driver is needed in the host.
[Edit]

How to Use virtio
  • Get KVM version> = 60
  • Get Linux kernel with virtio drivers for the guest
    • Get kernel> = 2.6.25 and activate (modules shoshould also work, but take care of initramdisk)

      • config_virtio_pci = Y (virtualization alization-> PCI driver for virtio devices)
      • config_virtio_balloon = Y (virtualization-> virtio balloon driver)
      • config_virtio_blk = Y (Device Drivers-> block-> virtio block driver)
      • config_virtio_net = Y (Device Drivers-> network device support-> virtio Network Driver)
      • config_virtio = Y (automatically selected)
      • config_virtio_ring = Y (automatically selected)
      • you can safely disable SATA/SCSI and also all other Nic drivers if you only use virtio (DISK/NIC)
  • As an alternative one can use a standard guest kernel for the guest> 2.6.18 and make use sync backward compatibility Option
    • Backport and instructions can be found in kvm-guest-drivers-linux.git
  • Use model = virtio for the network devices and if = virtio for Disk
    • Example
 
Qemu/x86_64-softmmu/qemu-system-x86_64-boot C-drive file =/images/xpbase. qcow2, if = virtio, boot = on-M 384-net Nic, model = virtio-net tap, script =/etc/KVM/qemu-IFUP
    • -HD [AB] for disk won't work, use-drive
    • Disk will show up as/dev/VD [A-Z] [1-9], if you migrate you need to change "root =" in LILO/GRUB config
    • At the moment the kernel modules are automatically loaded inthe guest but the interface shoshould be started manually (dhclient/ifconfig)
    • Currently performance is much better when using a hostkernel configured with config_high_res_timers. Another option is usehpet/RTC and-clock = qemu option.
    • Expected performance
      • Performance varies from host to host, kernel to Kernel
      • On my laptop I measured 1.1 Gbps RX throughput using 2.6.23, 850 Mbps Tx.
      • Ping latency is 300-500 USEC

Method 2:
The kernel version of a virtual machine created in virtio format is 2.6.32, which can be started normally. Therefore, the kernel reports errors in 2.6.18 can be explained.
In addition, the model type = 'virtio ', and the default value is e1000. The IP address cannot be allocated for Multiple DHCP attempts. Therefore, it is estimated that it is related to the network card type set when the virtual machine is created.

Therefore, you must enable virtio_net and virtio_balloon when creating a virtual machine. How to open and continue research.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.