Hot answers tagged

66

Qemu: QEmu is a complete and standalone software of its own. You use it to emulate machines, it is very flexible and portable. Mainly it works by a special 'recompiler' that transforms binary code written for a given processor into another one (say, to run MIPS code on a PPC mac, or ARM in an x86 PC). To emulate more than just the processor, Qemu ...


55

stop the VM run qemu-img resize vmdisk.img +10G to increase image size by 10Gb start the VM, resize the partitions and LVM structure within it normally


38

Xen supported virtualization types Xen supports running two different types of guests. Xen guests are often called as domUs (unprivileged domains). Both guest types (PV, HVM) can be used at the same time on a single Xen system. Xen Paravirtualization (PV) Paravirtualization is an efficient and lightweight virtualization ...


35

When working together, KVM arbitrates access to the CPU and memory, and QEMU emulates the hardware resources (hard disk, video, USB, etc.). When working alone, QEMU emulates both CPU and hardware.


31

That benchmark is only comparing the speed of the native os to a single guest os. Hardly a real world test. I don't think I would put much weight on it. Most of the KVM camp argues that Xen requires too many interrupts and hops between kernel and user space but from most of the more real world benchmarks that I've seen that hasn't really been realized and ...


29

Xen is an hypervisor that runs on metal (the pc / server) and then hosts virtual machines called domains. A Xen PV domain is a paravirtualized domain, that means the operating system (usually we're talking linux here) has been modified to run under Xen, and there's no need to actually emulate hardware. This should be the most efficient way to go, ...


25

RHEV is the stable version, while oVirt is upstream. Features from oVirt get merged into RHEV when stable and tested. Consider Fedora and RHEL - Fedora is a rich distribution in terms of features and packages, but it's not supported commercially, has a short lifecycle, and is not geared towards stability. RHEL is based on Fedora, but it's code is tested and ...


24

I'd like to start with a note that you should avoid using virsh attach-disk with its limited amount of options. Instead, I'd suggest to specify the exact disk format you prefer in a separate, temporary XML file or by using the virt-manager GUI application (for the latter, skip the first step). Create a temporary file with a disk definition like this one ...


21

If you defined no CDROM when you created your virtual machine, you can attach the device even to a running domain (virtual machine) by running the following command: virsh attach-disk testbed /dev/sr0 hdc --type cdrom If you already defined a CDROM, but it pointed to an ISO image, in my experience, you can still run the same command. The hdcpart needs to ...


20

The latest stable release for libvirt for Ubuntu is version 0.7.5, which doesn't have some newer features (i.e. script hooks and network filters) which make automatic network configuration easier. That said, here's how to enable port forwarding for libvirt 0.7.5 on Ubuntu 10.04 Lucid Lynx. These iptables rules should do the trick: iptables -t nat -I ...


18

Having recently gone through the same song and dance with my own management ("VMWare is really expensive! Check out what OSS options there are out there.") I have some observations to share. I/O performance does vary by hypervisor, though CPU performance is much less variant. In general, 'thin' provisioning is a great way to dock I/O performance. Some ...


18

Flashcache, for those who haven't seen it before, is a method for extending the Linux block-cache with a SSD drive. It's cheaper than running a server with a half TB of RAM just for caching. Will this even work? It should. The Linux block-cache works by caching accessed blocks, not files. So long as you're not giving the KVM machines direct access to ...


17

If you are running server 2012 then you already have access to hyper-v. The free hyper-v should serve your needs, you can run the GUI from any client or the 2012 server. This would also get you shared nothing migrations if you can't afford a san. ...


16

You're not done with performance tuning yet. <driver name='qemu' type='raw' cache='writethrough' io='native'/> First is which I/O mechanism to use. QEMU has two asynchronous I/O mechanisms: POSIX AIO emulation using a pool of worker threads and native Linux AIO. Set either io='native' or io='threads' in your XML to benchmark each of these. ...


14

You are partially correct. Just be careful, as there can be some confusion. KVM is the name of the virtualization technology in the Linux kernel. KVM is also commonly used as the name of a fork (a more accurate name would be qemu-kvm) of the QEMU project with better support for the hardware virtualization. This claim was confirmed by the QEMU project, but ...


14

KVM has a much better snapshot capability than what's managed by libvirt; but it depends on qcow2 images. if you use them, just do a savevm <name> on the command console (blocked by libvirt) it won't create a new file, it's a snapshot inside the qcow2 file. test it first, because some KVM versions have it broken.


14

On libvirt 0.8.3, if you type: virsh capabilities | grep topology it will list the topology of the host: <topology sockets='1' cores='4' threads='1'/> The numbers refer to sockets, cores per socket, and threads per core. Add this line to the cpu entry in the xml file to allow windows to use all 4 cores, e.g.: <vcpu>4</vcpu> ...


13

This is the forwarding delay for interfaces joining the bridge. It's how long it'll be before the interface will be able to do anything. . During this time the bridge will be discovering other bridges and checking that no loops are created. For a better description and the reason for it you need to read up on spanning tree protocol.


13

virsh dumpxml myvm > foo.xml <edit foo.xml, change the name, move storage> virsh undefine myvm virsh define foo.xml Source: https://www.redhat.com/archives/libvirt-users/2010-October/msg00072.html


13

The image will not shrink automatically, since when you delete files, you don't actually delete data (this is why undelete works). Qemu has a facility to shrink qcow2 images back, but what the utility does is really deduplicate the zeroes from the disk, leaving all other information intact. So the idea would be to: Zero-fill the drive (dd if=/dev/zero ...


13

If you don't want to do any configuration inside the guest, then the only option is a DHCP server that hands out static IP addresses. If you use bridge mode, that will probably be some external DHCP server. Consult its manual to find out how to serve static leases. But at least in forward modes nat or route, you could use libvirt's built-in 'dnsmasq' (More ...


12

These serverfault questions are similar but more specific, KVM online disk resize? & Centos Xen resizing DomU partition and volume group. The 1st asks the question of how to increase a KVM guest while it's online, while the 2nd is XEN specific using LVM. I'm asking how to accomplish this while the KVM is offline. NOTE: This link was useful for METHOD ...


12

Looking at the output of "help": virsh # help autostart NAME autostart - autostart a domain SYNOPSIS autostart <domain> [--disable] DESCRIPTION Configure a domain to be automatically started at boot. OPTIONS [--domain] <string> domain name, id or uuid --disable disable autostarting This requires that you ...


12

Honestly, I don't see what benefit you would get using any virtualization technology. You are still using one server, there is no reduction in hardware use. As you have only this one server, the possible benefit of being able to migrate virtual machines (maybe even while running) doesn't apply. The amount of work necessary to keep the virt. servers ...


12

I suspect the processors are being presented as single core processors in separate sockets. Windows 7 ultimate supports up to 2 socket systems, so it will use 2 processors. I don't know if you can configure KVM to present the processors as either a single quad core CPU or 2 dual core CPUs, which should resolve the problem.


11

rsync --ignore-existing --sparse ... To create new files in sparse mode Followed by rsync --inplace ... To update all existing files (including the previously created sparse ones) inplace.


11

run virsh dumpxml name_of_vm > name_of_vm.xml Undefine the old vm to prevent an error because of an duplicate UUID. virsh undefine name-of-vm Edit the xml file then import it. virsh define name_of_vm.xml Of course you will have to stop and start the vm for the changes to take effect virsh destroy name_of_vm virsh start name_of_vm


11

I figured out a way of setting up port redirection on the fly when the guest is using user-mode networking, and blogged about it here: http://blog.adamspiers.org/2012/01/23/port-redirection-from-kvm-host-to-guest/ You can see the details there, but for convenience, here is the solution I figured out: virsh qemu-monitor-command --hmp sles11 'hostfwd_add ...


11

TRIM works at the filesystem level so as you're giving your KVM domains a raw block device then you need to enable TRIM from within the domain; your host can't know the domains filesystem utilisation without examining it. To enable this you need to ensure there's a discard='unmap' attribute added to the disk definition in the XML for the domain, this is ...


11

You can't use switch port security on the Cisco since all the VMs will be sharing a physical switch port. And you can't use Linux iptables because the traffic is being bridged, not routed, through the hypervisor machine. But you can emulate switch port security on the hypervisor with Linux ebtables, which is a lesser-known layer 2/3 firewall on the Linux ...



Only top voted, non community-wiki answers of a minimum length are eligible