Skip to content

Windows (trial) images

vholer edited this page Sep 8, 2014 · 7 revisions

Requirements

Get

Steps

Create image

Create empty QCOW2 image:

$ qemu-img create -o cluster_size=2M -f qcow2 hd.qcow2 64G

Install

Run installer:

$ qemu-system-x86_64 -machine accel=kvm -m 4096 \
    -no-reboot -vga std \
    -drive file=hd.qcow2,if=virtio \
    -drive file=windows.iso,if=ide,media=cdrom \
    -drive file=virtio-win-0.1-81.iso,if=ide,media=cdrom \
    -net nic,model=virtio -net user

Choose your locales, e.g.:

  • Language to install: English
  • Time and currency format: Czech (Czech Republic)
  • Keyboard or input method: US

In target disk/partition dialog choose to load (VirtIO) drivers from CD-ROM, UNHIDE uncompatible drivers and choose all to install.

When drivers are installed, choose the primary hard-disk and process the first installation phase when all files are transfered from installation CD-ROM on target disk and virtual machine is shut down. After shutdown, the Windows image is nearly ready. On each cloud image instantiation the installation will be finished. This ensures the Windows trial period starts when each cloud instance runs for the first time and not when image was created.

Compress image

$ qemu-img convert -c -O qcow2 hd.qcow2 chd.qcow2
Clone this wiki locally