This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
doc:virt:win7 [2017/03/17 02:47] stwn minor update |
doc:virt:win7 [2017/03/17 03:09] (current) stwn update |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Installing Windows 7 on KVM ====== | + | ====== Windows 7 on QEMU/KVM ====== |
| + | |||
| + | ===== Installing Windows 7 ===== | ||
| + | - Create a script that contains<code>#!/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</code> | ||
| + | - 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 ==== | ||
| + | |||
| + | * lsusb<code>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</code> | ||
| + | * sudo chgrp stwn /dev/bus/usb/007/002 | ||
| + | |||
| + | ==== Configuring Samba ==== | ||
| + | * sudo nano /etc/samba/smb.conf<code>[global] | ||
| + | workgroup = win | ||
| + | wins support = yes | ||
| + | encrypt passwords = yes | ||
| + | [test] | ||
| + | browsable = yes | ||
| + | read only = yes | ||
| + | path = /home/stwn/share</code> | ||
| + | * sudo smbpasswd -a win | ||
| + | * sudo /etc/init.d/samba reload | ||
| + | |||
| + | ===== Commands List ===== | ||
| + | * qemu-system-x86_64 -soundhw help | ||
| ===== References ===== | ===== References ===== | ||