Tag Info

Hot answers tagged

24

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


12

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


12

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


10

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.


8

Did you try to 'telnet' way? I.e.: Ctrl+] telnet> quit


8

When connected to the monitor via telnet, anything that you type will be interpreted as a command by the monitor itself. You can view the full list of commands in the QEMU Emulator User Documentation, one of which is quit (or q for short). To disconnect the telnet session you need to first use the telnet escape key which is Ctrl-] and then you can type quit ...


6

Add conv=notrunc: dd if=/dev/zero of=YOUR_IMAGE_FILE bs=512 count=1 conv=notrunc


6

Try using dd with conv=notrunc dd if=/dev/zero of=myserver.img bs=512 count=1 conv=notrunc From the dd man page notrunc do not truncate the output file e.g. ls -l myserver.img -rw-r--r-- 1 iain users 1536 Mar 27 12:31 myserver.img dd if=/dev/zero of=myserver.img bs=512 count=1 conv=notrunc ls -l myserver.img -rw-r--r-- 1 iain users ...


6

It's quite simple really. For homogeneous clusters and single host setups use the host option. For mixed clusters, use the lowest available CPU version, so if one host is Penryn and the other Nehalem, use Penryn on both. If you are using RHEV or oVirt, this is already built in. VMWare have this called "EVC" and position it as a huge feature. Getting back ...


6

Storing QEMU-images in a database is on many levels very impractical. Using an ordinary filesystem for the storage itself, and referencing the files from the database is a lot simpler - and will probably grant you what you're trying to achieve. If this doesn't work for you, I'd like to know more about what you're trying to achieve.


6

This issue was caused by the way libvirt uses apparmor. The default behavior is to provide some protection for the host against the guest by restricting which files the virtualization process on the host is allowed to access. libvirt knows that the virtualization process (kvm in this case) needs the disk image in order to operate properly, so it creates an ...


6

I believe the tool you're looking for is kpartx. The general procedure is: List partitions in the disk image: kpartx -l /dev/vg0/mylv Add the partitions to device-mapper: kpartx -a /dev/vg0/mylv Mount the partition you're interested in: mount -o ro /dev/mapper/loop0p5 /mnt


5

The Windows guests currently have no VirtIO Don't lose more time with tweaking anything. Install the virtIO drivers and come back. The difference is so huge that any enhancement you can find now will have no meaning with virtIO. Just an example with one of our servers: - without virtIO a W2k3 can handle about 10 Terminal Server users - with virtIO, the ...


5

I will give very rough idea/explanation. In OP situation, besides measuring within the VM, the host should be look at too. In this case, we can assume the following are correct In all the test, the host I/O(disk) bandwidth is not max out. As VM("monitoring") I/O increases with more CPUs allocated to it. If host I/O was already max out, there should be no ...


5

If libvirt doesn't reload VM settings on start/stop, virsh edit command may help. And please write entire XML file and libvirt version Hmm... everything seems OK. Try adding <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> to <os> section and look if cdrom appears in boot menu. Also try removing all <boot> records ...


5

How about this (example for vnet13): $ VNET=vnet13; for vm in $(virsh list | grep running | awk '{print $2}'); do virsh dumpxml $vm|grep -q "$VNET" && echo $vm; done Here we use virsh dumpxml to show dynamic properties about the VM, which are not available in the static XML definition of the VM in /etc/libvirt/qemu/foo.xml. Which vnetX interface ...


4

Qemu doesn't work in the same way many other hypervisors do. For starters, it can provide full emulation. That means you can run x86 code on an ARM processor, for example. When in KVM mode, as you're using it, it doesn't actually do that... the processor is exposed no matter what, but what is reported to the OS will be changed by the -cpu flag. If you want ...


4

KVM is a kernel module that allows, through virtualization specific CPU extensions, to schedule a VMs CPU request directly in the host CPU and RAM, with minimal amount of overhead. QEMU provides the rest of the emulated hardware, because a machine, even virtual, is not just a CPU - it's a lot of additional hardware. QEMU can also emulate the CPU, but ...


4

There's Google's ganeti. It does live migration, scheduling new guests, and restarts guests; however, it does all that without libvirt (has custom code to deal with hypervisors). It also has "unusual" security requirements (actively modifies the ssh keys of the nodes); they might not be acceptable for you.


4

this is not your final answer - I would start by looking at disk iops - use tools like iostat and sar (sysstat) - find out what your practical iops are - and check if your swap is busy also I have seen similar behavior with sata drives in a software raid (md), every time a kvm guest was doing a lot of writes the vm's responsiveness lagged quite a bit. I ...


4

You probably need to make a label on the disk first. Try just running parted manually: parted /dev/hda unit GB mklabel msdos mkpartfs primary ext3 0 5


4

Windows will only run in HVM and PV-HVM modes (which use the modified version of QEmu and require VT/AMD-V) You're looking for PV mode if you require a non-VT/AND-V CPU, and it only works with modified Operating Systems: Xen PV guest kernels exist for Linux, NetBSD, FreeBSD, OpenSolaris and Novell Netware operating systems. From: Xen Overview QEmu ...


4

try virt-sparcify - it will zerofill the unused blocks in the image and then deduplicate the zeroes


4

start using libvirt - there's no reason to use qemu-kvm directly, when you have a good management package available start using virtio devices for disks and networking define what it is you're trying to do, and ask a question then the benefits are very simple - libvirt generates the kvm command line for you, pushing in a large set of optimizations, ...


4

Changes made to a network take place the next time the network is started. You need to perform this series of operations. virsh net-edit somenet virsh net-destroy somenet virsh net-start somenet For confirmation of this, see functionality of virsh net-edit Note that restarting a network like this will terminate network connectivity for any VMs using this ...


3

In theory, you could use QEMU... but it looks like it's only good for emulating a SPARCstation 5 running Solaris 2.5 or so. I can't find any reference to anyone having ever made it work as more than a novelty. I doubt there's any way on earth you're going to get an x86 box to cost-effectively emulate a SPARC T4. Your best bet—if you can't find someone ...


3

All you need to do is create a new VM (domain) and use the old .img as it's hard drive. It would be a good thing to set it up with all the old settings, especially the old MAC used by the lost VM If the VM definition XML files are also intact, you can re-register them with virsh define VM.XML


3

This is for google guys like me. Those answers are pretty useless, this is not a distro problem but a bug in Windows: http://keyliner.blogspot.se/2009/11/windows-7-slow-keyboard-response.html (second clause) That is what helped me: a. Start, Run, "Regedit" If the RUN command is not visible, see this link. b. Tunnel to this key: ...


3

A bug related to this was fixed in qemu version 1.2.0. Ubuntu 12.04 has an older qemu version, but if you install qemu-img from source code user@ubuntu:/tmp$ sudo apt-get install libglib2.0-dev user@ubuntu:/tmp$ wget http://wiki.qemu.org/download/qemu-1.2.0.tar.bz2 user@ubuntu:/tmp$ tar xfj qemu-1.2.0.tar.bz2 user@ubuntu:/tmp$ cd qemu-1.2.0 ...


3

Check that acpid is running inside the guests. If it isn't you need to install the acpid package. This is what receives the ACPI power button signal from KVM and causes the guest to shut itself down.



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