Application qemu

From campisano.org
Jump to navigation Jump to search

Install QEMU KVM version

su -
apt-get install qemu-kvm
exit

Install Windows 7 on a Debian 9

  • In this example, we will emulate a i386 system

Create a raw image

  • Still raw images does not allocate all the initial required disk space (15 GB in this example), the initial disk space will be near to 0 and will increment during the use
qemu-img create -f raw Win7Emu.img 15G

Install Windows

  • In this example, we will emulate a i386 system, with the same cpu as the host but with 4 cores and 4 GB of ram
qemu-system-i386 -enable-kvm -cpu host -smp 4 -m 4096 -boot d -drive format=raw,file=Win7Emu.img -cdrom windows_7.iso

Run after installation

  • This settings will set up an intel audio card and a samba share folder that can be mapped as //10.0.2.4/qemu
qemu-system-i386 -enable-kvm -cpu host -smp 4 -m 2048 -soundhw hda -netdev user,id=network0,smb=$HOME -device e1000,netdev=network0 -drive format=raw,file=Win7Emu.img -cdrom /dev/sr0;

Convert a Virtualbox image

qemu-img convert -f vdi -O raw Win7Emu.vdi Win7Emu.img

References