Tip: virt-install Windows with virtio device drivers

You have to unset these variables because of a long-standing bug in SPICE:

# unset http_proxy
# unset https_proxy

You can’t use virt-install’s --cdrom option twice, because virt-install ignores the second use of the option and only adds a single CD-ROM to the guest. Instead, use --disk ...,device=cdrom,bus=ide:

# virt-install --name=w81-virtio --ram=4096 \
    --cpu=host --vcpus=2 \
    --os-type=windows --os-variant=win8.1 \
    --disk /dev/VG/w81-virtio,bus=virtio \
    --disk en-gb_windows_8.1_pro_n_vl_with_update_x64_dvd_6050975.iso,device=cdrom,bus=ide \
    --disk /usr/share/virtio-win/virtio-win.iso,device=cdrom,bus=ide

During the install you’ll have to select the “Load driver” option and load the right viostor driver from the second CD-ROM (E:).

1 Comment

Filed under Uncategorized

One response to “Tip: virt-install Windows with virtio device drivers

  1. Laszlo Ersek

    Even better, you can use a virtio-scsi CD-ROM for the Windows installer image itself — only the virtio-win driver CD needs to be on the IDE bus.

    Windows will boot off the installer ISO using BIOS (SeaBIOS) or UEFI (OVMF) services, which both support virtio-scsi. Then Windows realizes at some point that it has no native drivers to continue reading its own installer CD, and it asks for the driver CD. (This happens earlier than asking for a driver CD for the purposes of the installation target hard disk.) Vioscsi is the right folder to select for this.

    I think Microsoft got this really right in their Windows 7 and later installers; this way you can install a Windows guest with all “permanent” drives using virtio, only the temporary virtio-win CD has to be on slow IDE. The amount of data installed from there is minimal, and you can remove the drive and even the controller once you’re done.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s