Как я могу получить жесткий диск для работы с виртуализированным QEMU Windows Home Server 2011?

2564
turboraketti

Я настроил гостя Windows Home Server 2011 с помощью virt-install и virsh, но установщик Windows не может найти жесткие диски. Он также не может загрузить какие-либо драйверы virtio для него.

Это моя первая попытка виртуализации qemu / kvm, так что, возможно, я просто упускаю что-то очевидное, но любая помощь приветствуется! Вот подробности:

  • Я создал домен с помощью virt-install 0.600.4.

Команда:

virt-install --connect qemu:///system -n fas -r 6144 --vcpus=2 \ --disk pool=vmstore,size=50,bus=virtio,cache=none -c whs2011.iso --vnc \ --noautoconsole --os-type windows --os-variant win2k8 \ --network network=default,model=e1000 \ --disk path=virtio-win-0.1-74.iso,device=cdrom,perms=ro 

Я использую os-вариант win2k8, так как нет win2011 для virt-install, afaik. Не знаю, если это создает какие-то проблемы.

  • Я сделал, virsh destroy fasчтобы остановить это,
  • Я изменил его, virsh edit fasдобавив cdrom в качестве первого загрузочного устройства.

В результате XML для домена:

<domain type='kvm'> <name>fas</name> <uuid>3d170dbf-c96e-5b0c-0e75-0bd2d6c5e98c</uuid> <memory unit='KiB'>6291456</memory> <currentMemory unit='KiB'>6291456</currentMemory> <vcpu placement='static'>2</vcpu> <os> <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/fas.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/home/nb/whs2011.iso'/> <target dev='hda' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/home/nb/virtio-win-0.1-74.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='network'> <mac address='52:54:00:84:3b:8b'/> <source network='default'/> <model type='e1000'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> <video> <model type='vga' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> </domain> 
  • Затем я начал это снова с virsh start fasи,
  • успешно подключен к порту просмотра с помощью программы просмотра vnc.
  • Установщик Windows был запущен, и я нажал «Новая установка: Установить Windows». Смотрите этот скриншот:

    enter image description here

  • Затем мне сообщили о том, что жесткие диски не могут быть найдены, поэтому я нажал «Загрузить драйверы».

  • Затем, независимо от того, какую папку я выберу из образа компакт-диска virtio driver, жесткие диски не отображаются, когда я нажимаю OK. Смотрите этот скриншот:

enter image description here

Моя система - это современный Ubuntu Server 13.10 (ядро 3.11.0-14-generic), работающий на HP Proliant ML330 G6 (четырехъядерный Intel Xeon @ 2,4 ГГц). Версия QEMU - 1.5.0.

Любой вклад приветствуется!

2
http://serverfault.com/a/452857/126632 Michael Hampton 10 лет назад 0
Спасибо! Я попробую подход с виртуализированным диском IDE. turboraketti 10 лет назад 0

1 ответ на вопрос

1
turboraketti

I finally nailed this, with guidance from https://serverfault.com/a/452857/126632 (link provided by Michael Hampton). What I essentially did was:

  • Made myself a small, empty helper FAT disk image with Mac's Disk Utility
  • Deleted the domain: virsh delete fas
  • Created it again, with a slightly modified command (changed disk bus to IDE, and also increased disk size, as WHS complains unless it's pretty large, and added the helper image as a disk on virtio bus)

Command:

virt-install --connect qemu:///system -n fas -r 6144 --vcpus=2 \ --disk pool=vmstore,size=200,bus=ide,cache=none -c whs2011.iso --vnc \ --noautoconsole --os-type windows --os-variant win2k8 \ --network network=default,model=e1000 \ --disk path=virtio-win-0.1-74.iso,device=cdrom,perms=ro \ --disk path=my-helper-image.iso,bus=virtio,cache=none 
  • Again added <boot dev='cdrom'/> before the existing line <boot dev='hd'/>, by virsh edit fas, to make it boot off the CD image.
  • Did virsh start fas, connected to the machine with a VNC viewer to display 0 (port 5900) and performed the long and winding installation of WHS2011.
  • Finally on the Windows desktop, opened the Device Manager and installed missing drivers for virtio, required to mount the helper image (right-click on an unknown device and select "update driver").
  • Powered down the virtual machine and virsh edit fas to remove the installation media whs2011.iso and the helper image, and changed bus type of the boot disk to virtio, i.e. remove the address element (it will be created again automatically) and changed the target attributes like this: <target dev='vda' bus='virtio'/>

Next, booted up the machine (virsh start fas) and now I'm enjoying WHS 2011 on a SCSI boot disk.

Похожие вопросы