You missed to tell qemu
to boot from the installation media (-boot d
) - so it tries to boot from the empty virtual disk and, you should select format qcow2
instead of qcow
for the virtual disk.
First check whether virtualization is enabled and usable on your host operating system : kvm-ok
Output information needs to be -> INFO: /dev/kvm exists | KVM acceleration can be used
Download the Ubuntu installation file to the folder where you want to store it :
wget -O /path-to-the-storage-location/ubuntu-14.04.5-server-amd64.iso http://releases.ubuntu.com/14.04.5/ubuntu-14.04.5-server-amd64.iso
Create the virtual disk in the folder where you want to place and store the disk :
qemu-img create -f qcow2 /path-to-the-virtual-disk/ubuntu-trusty.qcow2 10G
Boot from the Ubuntu installation media to install it to the attached virtual disk :
qemu-system-x86_64 -hda /path-to-the-virtual-disk/ubuntu-trusty.qcow2 -cdrom /path-to-the-installation-media/ubuntu-14.04.5-server-amd64.iso -boot d -enable-kvm -m 512
When you execute the command, the terminal looks like that (Do you eventually mean this with qemu-system-x86_64
hangs ? Don't add an option which prevents a new window to be visible) :

A new 'QEMU terminal window' opens, showing the expected option to install Ubuntu from the installation media (Note : this is an example from my setup - so the boot options are different) :

Additional information : In case the installer doesn't recognize the disk, follow these instructions.
-nographic
to get some output, and maybe-boot once=d,menu=on
to get boot menu/boot from cd – ridgy Jan 16 '17 at 12:45