Windows 7 on QEMU/KVM

Installing Windows 7

  1. 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
  2. Browse to ${VIRTIMG} when you are asked about disk driver using virtio
  3. Download and install Realtek AC97

Configurations

Adding USB Device

  • lsusb
    lsusb 
    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

 
doc/virt/win7.txt · Last modified: 2017/03/17 03:09 by stwn · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki