简体   繁体   中英

Why is it very slow to open a .qcow2 with qemu kvm? What's the solution?

I am openning a .qcow2 file using the command kvm -hda cloudera-quickstart-vm-4.4.0-1-kvm.qcow2 -net nic -net user -m 512 in Ubuntu 13.04 terminal but it's super slow and basically I have hard time having control over the cursor in the virtual machine. Is there any better variant I can use for openning this .qcow2 file rather than qemu tools like kvm?

There could be two reasons:

1) You probably were using IDE emulation instead of faster virtual hardware

2) It could be that this is an old version of QEMU that defaulted to writethrough mode to avoid eating your data in case of power loss.

Both problems can be solved by replacing "-hda foo.qcow2" with "-drive if=virtio,file=foo.qcow2,cache=none". On new-enough versions of QEMU you may not need ",cache=none".

In this special case, Cloudera had a vbox version of the VM so I downloaded it and used Virtual Box for playing the Virtual Machine and then in the Virtual Box setting I reduced the memory needed to 2GB instead of the default 4GB memory needed for this specific VM. Now everything is up and running.

It could be because it is not using the KVM; QEMU is emulator unlike qemu-kvm; Make sure are your using kvm on running the virtual machine. To identify the virtual machine is enabled for kvm, run

[qemu] info kvm 
       kvm is enabled

on launching the qemu-kvm for the virtual machine; if 'info kvm' shows kvm is disabled then you need to install the respective modules of kvm.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM