Hot answers tagged

80

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 ...


67

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


40

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.


40

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 technique ...


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 ...


31

I can see two possible reasons for you to be seeing those file sizes: Sparse files File system corruption Sparse files is a feature on some file systems whereby you can create a file with holes in it. No physical space is allocated for the holes. Reading across the holes will return NUL bytes all the way. If the reason for what you are seeing is sparse ...


30

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, ...


26

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 ...


25

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 ...


22

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 ...


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 ...


19

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

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. ...


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. http://blogs.technet.com/b/keithmayer/archive/2012/09/07/getting-started-with-hyper-v-server-2012-hyperv-...


16

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> <...


16

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 of=/...


16

copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host on the source host run virsh dumpxml VMNAME > domxml.xml and copy this xml to the dest. host on the destination host run virsh define domxml.xml start thew VM. If the disk location differs, you need to edit the xml's devices/disk node to point to the image ...


16

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 ...


15

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


14

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.


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

According to the manual of virsh this is: virsh destroy _domain-id_ virsh undefine _domain-id_ virsh vol-delete --pool vg0 _domain-id_.img And it further says: "Undefine (destroy) the configuration for an inactive domain. Since the domain is not running the domain name or UUID must be used as the domain-id."


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 ...


13

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 ...


13

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

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.


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.


12

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 ::...



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