KVM虚拟机安装Windows XP

  1. 创建10G系统盘(固态硬盘)

    lvcreate -L 20G -n lv0-windows-xp vg0

  2. 创建50G挂载盘(机械硬盘)

    lvcreate -L 50G -n lv9-windows-xp vg9

  3. 创建虚拟机

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    virt-install \
    --virt-type kvm \
    --name winxp \
    --ram 4096 \
    --cdrom=/uni/iso/win-xp64-sp3.iso \
    --cpu core2duo \
    --network bridge=br0,model=virtio \
    --graphics vnc,listen=0.0.0.0 \
    --disk path=/dev/mapper/vg0-lv0--winxp,bus='ide' \
    --disk path=/dev/mapper/vg9-lv9--winxp,bus='ide' \
    --noautoconsole \
    --os-type=windows \
    --os-variant=winxp
  4. 通过vpc连接继续安装

  5. 安装完成后设置开机启动

    virsh autostart windows-xp

    常用命令请查看KVM常用操作

参考资料:
How to Create a Windows XP Virtual Machine
Understanding Guest Agents and Other Tools
Creating Windows virtual machines using virtIO drivers
virtio驱动下载
The List of Os Variants in KVM