Tag Info

Hot answers tagged

10

qemu-kvm -hdb <device>, where <device> is the USB stick (e.g. /dev/sdb), should do it (tested with Ubuntu 12.04 on an USB stick and it works). You will need write permission to the device (i.e. be root or change its permissions).


7

You cannot chroot into different architecture. By chrooting, you are executing the binaries (from the chroot) on your architecture. Executing ARM binaries on x86 (and x86_64 in that matter) would lead to "Exec format error". If you want to run binaries from different architecture you will need an Emulation, Qemu is a good candidate for this, but you will ...


7

From qemu's help: Linux/Multiboot boot specific: -kernel bzImage use 'bzImage' as kernel image -append cmdline use 'cmdline' as kernel command line -initrd file use 'file' as initial ram disk -dtb file use 'file' as device tree image A quick test here using Arch's kernel/initrd (qemu -kernel /boot/vmlinuz-linux -initrd /boot/initramfs-linux.img) ...


6

As it happens, it looks like a bug in debian's package of grub. The -kernel grub.img approach works if I only include the grub modules I need upon grub-mkimage. The -bios grub.bin works with the newer grub package from experimental (2.00-7). However, the grub.bin that comes with it is not very useful. It comes with a memdisk that comes with the grub.cfg. ...


6

QEMU's -kernel, -boot, and -initrd are BIOS only. They are completely incompatible with EFI (currently). Update: OVMF supports -boot since r13683, and supports -kernel -append -initrd since r13923. Download OVMF-0.1+r14071-1.1.x86_64.rpm or newer version. Extract bios.bin from the rpm: rpm2cpio OVMF-0.1+r14071-1.1.x86_64.rpm | cpio -idmv Specify firmware ...


6

It did work out. The kernel booted fine. The error is: Unable to mount root fs on unknown-block(0.0) The kernel is looking for a root filesystem. You need to provide one. You can't interact with a kernel without running processes on it, and the initial process has to be loaded from somewhere: when the kernel starts, it mounts a filesystem (the root ...


6

I don't know why exactly, but Renan's answer didn't quite work for me. KVM said to me it couldn't find a bootable drive (despite the usb partition being marked as such). However I've found another solution. Get the USB device VendorID:ProductID with lsusb. Example: $ lsusb ... Bus 002 Device 007: ID 0781:5406 SanDisk Corp. Cruzer Micro U3 Pass that to ...


5

Afaik, libvirt doesn't know what "fully booted" means (neither do I). You could make a service that connect to your host (or another machine) during boot. Or you could try connecting in a loop to your guest, for example with ssh. Another solution would be to rely on an exisiting service that communicate with the host, such as vdagent. You could easily write ...


4

Seems my question is answered in the libvirt manual. One needs to specifically ensure that the same IP is handed out via DHCP each time. Here's how this can be specified: <network> … <ip address="192.0.2.1" netmask="255.255.255.0"> <dhcp> <range start="192.0.2.128" end="192.0.2.254"> <host ...


4

Copy kvm virtual machines is not complicated: First, you need to shutdown the virtual machine, then you need to find the disk image where the virtual machine is stored and finally copy it to another place (cp /path/to/disk_image /new_path/). If the virtual machine is stored on its own partition, use dd if=/dev/PARTITION of=/path/to/backup/backup.img bs=1M ...


3

QEMU comes with the qemu-img program to convert between image formats. qemu-img convert -f qcow2 -O raw my-qcow2.img /dev/sdb


3

virt-install ... --disk [path to your existing image] --import ... --import Skip the OS installation process, and build a guest around an existing disk image. The device used for booting is the first device specified via "--disk" or "--file". --disk [path] path - A path to some storage media to use, existing or not. Existing media can be a file or block ...


3

That usually indicates that you don't have a bootable hard disk or CD/DVD image attached. Check your virtual machine's configuration and make sure you have a bootable ISO for a LiveCD or installer mounted. That message could also indicate that you're attempting to boot a 64-bit operating system in a 32-bit virtualized environment. Make sure your VM is ...


3

CtrlAltu Source: http://linux.die.net/man/1/qemu-kvm In the future, you can also try to use man (in a terminal). This gives you the user manual. You can seek a word by pressing "/" (without the quotes) and then cycle through the references using "n": man qemu /restore <enter> n n To quit, type "q".


3

The kernel is telling you, that it doesn't know which device holds the root file system. Your loop mount isn't necessary. (Unmount it before continuing). Try a command like qemu -kernel bzImage -hda disk.img -append root=/dev/sda The -hda disk.img parameter tells qemu to simulate a disk device based on your disk.img. The -append root=/dev/sda switch is ...


3

Keyboard method You can release focus using the Left Ctrl+ Left Alt. Notice you have to use the left keys! Focus free method See my question I posted on this exact thing on ServerFault. The Q&A is titled: Any way to release focus on a KVM guest in virt-manager without having to click Ctrl_L + Alt_L?. This will allow you to no longer have to use the ...


2

Qemu is not the right tool for the job. Qemu emulates a whole computer, including the CPU. This is useful to run a virtual machine on where the virtual hardware is different from the host hardware, but this is not required here. Furthermore, emulating an amd64 CPU is likely to be slower than emulating an i386 CPU. This alone might explain the difference ...


2

Painfully slow might be in relation to your I/O. I came to find out the hard way that this might be remedied by telling libvirt to use the virtio. To verify mine: # virsh list Id Name State ---------------------------------- 11 ca running 13 new_box running ..... # virsh dumpxml ca|awk ...


2

if the host doesn't support AMD-V, you cannot use kvm there, all you can use is qemu in emulation mode. Even if you have the kvm module loaded, you also need kvm_amd, and it will not load without AMD-V. virtio is irrelevant here, if kvm isn't running, you will not be able to improve performance anyhow.


2

Yes, you can run x86 binaries in QEmu with QEmu running on an ARM processor. It will be very slow, because QEmu does software emulation of the x86 processor, and you may find yourself short of RAM, but it can work. The qemu-user package contains the virtual machine itself, i.e. an emulator of an x86 processor and some hardware devices and a Linux kernel ...


2

After printing the "Syncing disk" message, fdisk calls sync(2) syscall, which causes all buffered modifications to file metadata and data to be written to the underlying file systems. It is expected that this operation can take some time, but it shouldn't hang forever. If it does, you might see in which function in the kernel it hangs in ...


2

To run a kernel directly in qemu or kvm, use the -kernel argument: qemu-system-x86_64 -kernel /boot/vmlinuz-3.2.0-2-amd64 Virtualbox may have something similar. If you really want it installed on a hard drive image, it's a bit harder. You need a bootloader installed, which may also require a partition table. Something like SYSLINUX or EXTLINUX could be ...


2

Why are you creating the disk manually? You should use VirtualBox to create the disk while creating the VM, unless you plan to use it together with qemu. (why?) Here, when adding disks, use the existing disk that you created.


2

After looking a bit through the Linaro wiki, especially this page I decided to download the source package for Linaro version of Qemu, which apparently has a lot of enhancements for ARM that did not make it into the upstream Qemu available for Ubuntu Natty, and build it myself. It works like a charm with the Beagleboard image provided also by Linaro(I ...


2

You should be able to recover space by using virtio-scsi devices and specifying discard=unmap in the libvirt definition for the disk. I haven't tried this in CentOS/RHEL but I did get this to work in later versions of Fedora. I wrote a blog post about it. I would say to give it a try and see if it works.


2

I don't think you would have to start debugging the kernel right away. This error message means that the kernel is unable to mount the partition you requested to be /. This would happen for example if you gave it an empty disk image (my hunch is this is your case) - the kernel in the VM sees an unpartitioned drive, there is no /dev/sda1 just /dev/sda. To ...


2

Yes, actually I do this for my personal test environment (I have a public website that goes to a QEMU-KVM VM on my home PC). Basically if the VM has network access then you're just dealing with a routing issue. I have several fake company "departments" set up in my VM to test different types of setups, each environment gets its own subnet hanging of a ...


2

You need an clustered file system. I do not know what filesystem you are using. But with a standard file system this is not possible and has nothing to do KVM or LVM. An other solution would be to use a network filesystem like nfs or cifs.


2

Your 64 bit system does not have the appropriate external repository defined for the 64-bit QEMU packages. You will need to find a repository with these packages available and install the appropriate .repo file in /etc/yum.repos.d/ before you can yum install the QEMU packages. A quick Google search shows that RepoForge has 64-bit QEMU packages available, so ...


2

Make sure you go through the steps outlined in this section, 13.3.4. PCI Pass-Through, of the docs, titled: Chapter 13. Running Virtual Machines with qemu-kvm. excerpt Procedure 13.1. Configuring PCI Pass-Through Make sure that CONFIG_DMAR_DEFAULT_ON is set in the host's running Kernel: $ grep CONFIG_DMAR_DEFAULT_ON /boot/config-`uname -r` If this ...



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