Tag Info

Hot answers tagged

29

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


13

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.


13

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


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


9

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


8

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


7

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


7

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


7

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


6

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


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

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

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


6

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

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


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


5

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


5

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


5

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


4

The only way to add command-line switches that libvirt doesn't support yet is to create a wrapper script and change your VM's configuration to use it instead. For example, # cat >/usr/local/bin/qemu-snapshot <<'END' #!/bin/sh exec /usr/bin/qemu "$@" -snapshot END # chmod +x /usr/local/bin/qemu-snapshot # virsh -c qemu:///system edit my_vm change ...


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

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

First, create a raw image of the required size. I'll assume 10G is enough. Using seek creates a sparse file, which saves space. dd if=/dev/null of=example.img bs=1M seek=10240 Next, create a filesystem on it. mkfs.ext4 -F example.img (Note that you need the -F option for mkfs.ext4 to operate on a file as opposed to a disk partition) Then, mount it. ...


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

As recommend in one of the comments (thanks cperrin88), Ubuntu 12.04 brought the solution. Some parameters: Kernel 3.2 80 cores (40 physical, 80 because of Intel HT) kvm 1:84+dfsg-0ubuntu16+1.0+noroms+0ubuntu13 kvm-ipxe 1.0.0+git-3.55f6c88-0ubuntu1 qemu-kvm 1.0+noroms-0ubuntu13 libvirt 0.9.8-2ubuntu17.1 The Windows guest now shows a boot bar during the ...


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

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

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

For those interested in where the default CentOS repositories are: [base] name=CentOS-5 - Base mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os #baseurl=http://mirror.centos.org/centos/5/os/i386/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 priority=1 [updates] name=CentOS-5 - Updates ...



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