Files
Workstation/qemu_win10_vm.md
ducoterra 57c15baa8b WIP
2023-01-22 23:49:29 -05:00

57 lines
1.5 KiB
Markdown

# Windows 10 VM with Qemu
## Create installer iso
mkisofs -o ~/Downloads/win-install.iso /tmp/windows-installers/
## Snapshot qcow2 storage
```bash
# list
qemu-img snapshot -l win10.qcow2
# create
qemu-img snapshot -c $SNAPSHOT_NAME $DISK_IMAGE
# apply
qemu-img snapshot -a $SNAPSHOT_NAME $DISK_IMAGE
# delete
qemu-img snapshot -d \
$SNAPSHOT_NAME \
$DISK_IMAGE
```
## Setup
Install and configure windows as normal to start. Boot into the installation and finish the setup.
## Auto resize display
1. Ensure the video device is set to "QXL" on the host
2. Download [virt-win-guest-tools](https://github.com/virtio-win/virtio-win-pkg-scripts) and install on guest
3. Download [spice-guest-tools](https://www.spice-space.org/download.html#windows-binaries) and install on guest
4. Shutdown the guest machine
5. view -> Scale Display -> Auto resize VM with window
6. Start the guest machine, it should now auto resize
## virtio network driver
1. Download [virt-win-guest-tools](https://github.com/virtio-win/virtio-win-pkg-scripts) and install on guest
2. Shutdown the guest machine
3. Change the network device model to virtio
4. Start the guest machine
## virtio boot disk
1. Attempted virt-win-guest-tools install but boots with boot_device_not_found error
## Auto login at boot
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
1. Add a key: AutoAdminLogon, string, 1
2. Add a key: DefaultUserName, string, autoadmin
3. Add a key: DefaultPassword, string, autopassword