KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

kvm-88 Released: Networking Fixed

kvm-88 has been released featuring bug fixes and a few noticeable features to the end user. The major bug fixes include networking which was broken in kvm-87 with e1000 and rtl8139. The most noticeable new features are resizable sdl windows and reworked command line interface for slirp networking options.

 

Reworked cli for slirp networking options

The command line options for a range of slirp networking options have been collapsed into -net user arguments to be more consistent with the qemu style of command line options. In previous versions, a lot of slirp options were used as standalone arguments rather than arguments of the -net user mode. A good example of this is the -redir option for host to guest network redirection which is only be used in the -net user mode. This is now invoked by the -net user,redir= option. Let's take a look at some of these new options.

You can now set the ip address the guest will see. You have the option of specifying the mask using the x.x.x.x format ie. 255.255.255.0 or as a bitmask number eg /8. Below is an example of setting your subnet to 10.0.5.0/24.

qemu -hda linux.img -m 300 -net user,net=10.0.5.0/24

There is now an option to set the ip address of the host ip address as seen from your guest. The default value for this is .2 so using the default network your guest will see 10.0.2.2 when run with -net user. Now you can specify this with the following command.

qemu -hda linux.img -m 300 -net user,net=10.0.5.0/24,host=10.0.5.2

You can also now specify the the start of the dhcp range assigned to your guest using the dhcpstart option. The default range for this is x.x.x.16 to x.x.x.31. The lower ip addresses are reserved for things like your host ip address, virtual dns server address, virtual smbserver ip address and so on. So if you wanted your guest to get .20 for example, you would start it with a command line similar to the following.

qemu -hda linux.img -m 300 -net user,net=10.0.5.0/24,host=10.0.5.2,dhcpstart=10.0.5.20

You can specify the dns server address as seen from the guest when started in -net user mode. The default value for this is the .3 address. If you wanted to change this to .4, your command line would look something like this.

qemu -hda linux.img -m 300 -net user,net=10.0.5.0/24,dns=10.0.5.4

By default, the smbserver address is set to x.x.x.4 when the -smb option is used. Now you can specify this using the new format shown below

qemu -hda linux.img -m 300 -net user,smb=/home/hsolomon,smbserver=10.0.2.5

The host to guest redirection feature with -net user that was first written about here and then again here has been reworked yet again. Hopefully this is the final version of command line interface but it does finally seem to be more consistent with the qemu way of specifying options really is more intuitive. The new option for host to guest redirection is using a hostfwd option. Below is an example of forwarding connections to your host on 2222 to be forwarded to port 22 on your guest.

qemu -hda linux.img -m 300 -net user,hostfwd=tcp:2222::22

There is a also now a new option that I have not explored yet but it allows you to forward guest tcp connections to a character device at an ip address. The syntax for this is as follows and you can probably start testing it out.

qemu -hda linux.img -m 300 -net user,guestfwd=[tcp]:server:port-dev

Bear in mind that the old old way of specifying these options are still supported for now but will be deprecated in future version so start getting used to them if you primarily use the command line interface.

 

Changelog

Changes from kvm-87:
- merge upstream qemu.git
- virtio indirect ring entries
- improves block performance for newer Linux guests
- -net tap,sndbuf=... option for improving udp performance
- msi-x support
- sdl window resize
- more flexible -net user configuration
- -cpu host to pass through all host cpu features
- multiboot support for -kernel
- fix KVM_GET_SUPPORTED_CPUID feature usage (Andre Przywara)
- fix register contents after SIPI (Gleb Natapov)
- re-enable device assignment (Markus Armbruster)
- fix ia64 build (Markus Armbruster)
- fix migration for virtio-net version > 7 (Michael S. Tsirkin)
- merge more code with upstream (Glauber Costa)
- fix vnet_hdr checks (Mark McLoughlin)
- fixes broken tap networking with rtl8139 and e1000
- move extboot to standard optionrom location (Jan Kiszka)
- emulate 32-bit syscall/sysenter instructions on 64-bit guests
(Andre Przywara)
- allows cross-vendor live migration with 32-bit userspace on 64-bit kernel
- fix s390 memslot initialization for userspace_addr != 0
(Christian Borntraeger)
- allow s390 stfle instruction to be executed by guest (Christian Borntraeger)
- prepare memory slot data structures for multiple large page sizes
(Joerg Roedel)
- correct missing locking in PIT/IRQCHIP/SET_BSP_CPU ioctl paths
(Marcelo Tosatti)
- do not allow invalid mtrr/pat settings (Marcelo Tosatti)
- ignore some more AMD system configuration msrs (Andre Przywara)
- introduce module parameter for ignoring unknown msrs (Andre Przywara)
- fix ftrace build when kvm is built into the kernel
- convert powerpc marker probes to tracepoints (Marcelo Tosatti)
- drop old kvmtrace code (Marcelo Tosatti)
- document kvm_io_device locking (Michael S. Tsirkin)
- switch coalesced mmio, PIT creation, io bus to slots_lock
(Michael S. Tsirkin)
- fix locking imbalance (Jiri Slaby)
- irq tracing
- mmio tracing
- irqfd deassign (Gregory Haskins)
- x2apic support (Gleb Natapov)
- avoid redelivery of edge triggered interrupt before next edge (Gleb Natapov)
- fixes keyboard issues running Windows XP x64 smp installer
- avoid pit division by zero (Marcelo Tosatti)
- fix KVM_GET_MSR_INDEX_LIST user memory corruption (Jan Kiszka)
- drop old cr3 checks in favor of new checks (Jan Kiszka)
- mmu tracing
- basic API documentation
- ignore msi requests if level = 0 (Michael S. Tsirkin)
- ioapic/pic/msi tracing (Gleb Natapov)
don't kick vcpu if not in guest mode (Gleb Natapov)

You can download kvm-88 version here.

See Also

Comments

Kvm-88 has memory leeak

I run two windows 2003 vm on KVM-88,server will eat up all memory ,still all swap space.

when i switch back to kvm-86,everything works well.

Post new comment

The content of this field is kept private and will not be shown publicly.