====== Windows 7 on QEMU/KVM ====== ===== Installing Windows 7 ===== - Create a script that contains#!/bin/sh export QEMU_AUDIO_DRV=alsa DISKIMG=/some/dir/win7.img CDROM=/dev/sr0 VIRTIMG=/some/dir/virtio-win-0.1.126.iso qemu-system-x86_64 --enable-kvm \ -drive file=${DISKIMG},if=virtio -m 1500 \ -cdrom ${CDROM} \ -drive file=${VIRTIMG},index=3,media=cdrom \ -net nic,model=virtio -net user \ -usb -device usb-ehci,id=ehci \ -device usb-host,vendorid=0x046d,productid=0x082b,bus=ehci.0,port=1 \ -rtc base=localtime,clock=host -smp cores=1,threads=1 \ -usbdevice tablet -soundhw ac97 -cpu host -vga std - Browse to ${VIRTIMG} when you are asked about disk driver using virtio - Download and install [[http://www.realtek.com.tw/downloads/downloadsCheck.aspx?Langid=1&PNid=14&PFid=23&Level=4&Conn=3&DownTypeID=3&GetDown=false|Realtek AC97]] ===== Configurations ===== ==== Adding USB Device ==== * lsusblsusb Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 002: ID 046d:082b Logitech, Inc. Webcam C170 * sudo chgrp stwn /dev/bus/usb/007/002 ==== Configuring Samba ==== * sudo nano /etc/samba/smb.conf[global] workgroup = win wins support = yes encrypt passwords = yes [test] browsable = yes read only = yes path = /home/stwn/share * sudo smbpasswd -a win * sudo /etc/init.d/samba reload ===== Commands List ===== * qemu-system-x86_64 -soundhw help ===== References ===== * [[https://reddit.com/r/archlinux/comments/1fg3y9/guide_to_running_windows_7_in_qemu/|Guide to running Windows 7 in QEMU]] * [[https://reddit.com/r/VFIO/comments/49alcv/help_pass_usb_sound_card/|Help. pass usb sound card]] * [[https://wiki.gentoo.org/wiki/QEMU/Windows_guest|QEMU/Windows guest]] * [[http://funtoo.org/Windows_7_Virtualization_with_KVM|Windows 7 Virtualization with KVM]]