Tag Info

Hot answers tagged

12

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


12

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


10

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


9

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 Emulator. Qemu is a good candidate for this, but you will ...


8

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


8

KVM is a kernel API for virtualisation. It doesn't deal with serial ports. qemu is a machine (PC and other) emulator which can use kvm for improving virtualisation performance. It can emulate a standard 8250 UART serial port (isa-serial) or paravirtualised serial port (virtio-serial). In qemu, you define your machine with command-line arguments that specify ...


7

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


7

You can do that in the console with virsh domif-setlink domain interface-device state and check it with virsh domifstat domain interface-device Have a look at the man page for details.


7

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


6

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


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


6

I think the problem is that you should not copy qemu-arm but qemu-arm-static. This is a static compiled executable able to run from inside the chroot without any libraries. You can also look in /proc/sys/fs/binfmt_misc if there exists a file qemu-arm. If not restart the service binfmt_support.


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

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


5

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


5

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


5

In your shell, before you run qemu, run "stty intr ^]" to change the interrupt key from ^c to ctrl-] That way, ctrl-c will be passed through to qemu, but you can still interrupt qemu itself by pressing ctrl-]


4

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


4

Not sure what more you can do; according to http://www.claunia.com/qemu/objectManager.php?sClass=version&iId=305 AIX 6.1 will not install under QEMU.


4

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


4

There's no need to background the application with the ampersand when it has a built-in option for doing so. Such is the case with qemu (unless you've removed it): % qemu-kvm --help | grep daemon -daemonize daemonize QEMU after initializing


4

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


4

From QEMU wiki, QEMU doesn't support ICMP on the SLIRP backend. User Networking (SLIRP) This is the default networking backend and generally is the easiest to use. It does not require root / Administrator privileges. It has the following limitations: there is a lot of overhead so the performance is poor ICMP traffic does not work (so you ...


4

I think that the error does not come from the -net statement, but from: -chardev socket,host=localhost,port=7777,server,nowait,id=port1-char The statement uses already the port 7777. For the port forwarding, with -net user,hostfwd=tcp::7777-:8001 it works fine when not setting up the virtio serial channel. If I understand right, you want to set up a ...


4

Try this on when launching qemu -redir tcp:2222::22 $ ssh -p 2222 localhost The tcp:2222::22 flag in the qemu launch command maps the 2222 port of the host machine to port 22 (the default ssh port) on the virtual machine. Then, simply sshing to the 2222 port on your localhost (the host machine) will redirect any traffic into the ssh 22 port in the ...


4

First of all, I had to use another kernel, kernel-qemu that I found here. Then, I could make it work using QEMU 1.7.1: With Raspbian: ./qemu-system-arm -kernel /path/to/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda /path/to/2013-12-20-wheezy-raspbian.img With Arch ...


4

You can't easily convert an x86 binary to ARM. If you can't get the source code, or an ARM binary from the manufacturer, and you really do want to use the printer with your Pi2, then the Qemu approach is the correct one in this case, although it will likely be very slow. Qemu does full system emulation but it also works very well for single process ...


3

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


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



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