KVM - Problema ao instalar o convidado do Windows 2003 no Debian Lenny Host de 64 bits

1

Eu tenho um host Lenny de 64 bits do Debian e tive o kvm instalado com um windows 2003 funcionando bem, mas notei quantos anos tinha a versão kvm nos pacotes padrão, então decidi atualizar usando backports da Debian para obter pacotes mais atualizados. Então eu atualizei usando

apt-get -t lenny-backports instala o kvm libvirt-bin virtinst

Então agora eu tenho

debian:~# virsh version
Compiled against library: libvir 0.8.3
Using library: libvir 0.8.3
Using API: QEMU 0.8.3
Running hypervisor: QEMU 0.9.1

agora estou tentando configurar um novo convidado com:

debian:/tmp# virt-install --connect qemu:///system -n win2k3 -r 2048 -c /home/win2k3.iso -f /home/win2k3.img -s 20 --nonetworks --noautoconsole --vnc --os-type=windows --os-variant=win2k3 --hvm --accelerate --debug
Sat, 04 Dec 2010 17:20:24 DEBUG    Launched with command line:
/usr/bin/virt-install --connect qemu:///system -n win2k3 -r 2048 -c /home/win2k3.iso -f /home/win2k3.img -s 20 --nonetworks --noautoconsole --vnc --os-type=windows --os-variant=win2k3 --hvm --accelerate --debug
Sat, 04 Dec 2010 17:20:24 DEBUG    Requesting libvirt URI qemu:///system
Sat, 04 Dec 2010 17:20:24 DEBUG    Received libvirt URI qemu:///system
Sat, 04 Dec 2010 17:20:24 DEBUG    Requesting virt method 'hvm', hv type 'default'.
Sat, 04 Dec 2010 17:20:24 DEBUG    Received virt method 'hvm'
Sat, 04 Dec 2010 17:20:24 DEBUG    Hypervisor name is 'kvm'
Sat, 04 Dec 2010 17:20:24 DEBUG    Could not open "/etc/sysconfig/keyboard" [Errno 2] No such file or directory: '/etc/sysconfig/keyboard'
Sat, 04 Dec 2010 17:20:24 DEBUG    Could not open "/etc/X11/xorg.conf": [Errno 2] No such file or directory: '/etc/X11/xorg.conf' 
Sat, 04 Dec 2010 17:20:24 DEBUG    Could not open "/etc/default/keyboard": [Errno 2] No such file or directory: '/etc/default/keyboard' 
Sat, 04 Dec 2010 17:20:24 DEBUG    Did not parse any usable keymapping.
Sat, 04 Dec 2010 17:20:24 DEBUG    DistroInstaller location is a local file/path: /home/win2k3.iso


Starting install...
Creating storage file win 100% |=========================|  20 GB    00:00     
Sat, 04 Dec 2010 17:20:24 DEBUG    Generated install XML: 
<domain type='kvm'>
  <name>win2k3</name>
  <currentMemory>2097152</currentMemory>
  <memory>2097152</memory>
  <uuid>d0bd8a0f-af7f-1647-4662-f4e3f86ef524</uuid>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/><apic/><pae/>
  </features>
  <clock offset="localtime"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <vcpu>1</vcpu>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/home/win2k3.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu'/>
      <source file='/home/win2k3.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' port='-1' keymap='en-us'/>
    <console type='pty'/>
    <video>
      <model type='vga'/>
    </video>
  </devices>
</domain>

Creating domain...                                                 0 B 00:00 
Sat, 04 Dec 2010 17:20:24 DEBUG    Started guest, looking to see if it is running
Sat, 04 Dec 2010 17:20:24 DEBUG    Generated boot XML: 
<domain type='kvm'>
  <name>win2k3</name>
  <currentMemory>2097152</currentMemory>
  <memory>2097152</memory>
  <uuid>d0bd8a0f-af7f-1647-4662-f4e3f86ef524</uuid>
  <os>
    <type arch='x86_64'>hvm</type>
    <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>
  <vcpu>1</vcpu>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/home/win2k3.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu'/>
      <source file='/home/win2k3.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' port='-1' keymap='en-us'/>
    <console type='pty'/>
    <video>
      <model type='vga'/>
    </video>
  </devices>
</domain>

Domain installation does not appear to have been
 successful.  If it was, you can restart your domain
 by running 'virsh start win2k3'; otherwise, please
 restart your installation.

mostra erro, mas eu não vejo nenhuma razão para que eu tente

debian:/tmp# virsh start win2k3
Domain win2k3 started

então nada começa e o log mostra

LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 2048 -smp 1,sockets=1,cores=1,threads=1 -name win2k3 -uuid faaa37da-7eb3-d5ab-e36a-c7f782c5a657 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/win2k3.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=localtime -boot c -drive file=/home/win2k3.img,if=none,id=drive-ide0-0-0,boot=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/home/win2k3.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -k en-us -vga std -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 
char device redirected to /dev/pts/6
exception 13 (0)
rax 0000000000000010 rbx 000000000000c000 rcx 0000000000006e36 rdx 00000000c0000000
rsi 0000000000000003 rdi 0000000000000000 rsp 0000000000006e2c rbp 0000000000000008
r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11 0000000000000000
r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000
rip 00000000000fec3c rflags 00033002
cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
tr 0000 (feffd000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt f7a30/37
idt f8ab0/0
cr0 10 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Eu não tenho certeza para onde ir. Qualquer ajuda seria ótima.

Obrigado

    
por Brandon 04.12.2010 / 23:24

2 respostas

2

Então, depois de ler mais no link eles dizem "É importante usar o kernel mais recente - 2.6 .26 não funciona bem com kvm "

então eu corri abaixo desde que eu tenho 64 bits (linux-image-2.6-686 para 32 bits)

apt-get -t lenny-backports instala o linux-image-2.6-amd64

depois reiniciei e tentei criar minha vm novamente e ela funcionou!

debian:~# virt-install --connect qemu:///system -n win2k3 -r 2048 -c /home/win2k3.iso -f /home/win2k3.img -s 20 --nonetworks --noautoconsole --vnc --os-type=windows --os-variant=win2k3 --hvm --accelerate


Starting install...
Creating storage file win 100% |=========================|  20 GB    00:00     
Creating domain...                                                 0 B 00:00 
Domain installation still in progress. Waiting for installation to complete.

Espero que isso ajude quem pode tropeçar aqui.

    
por 04.12.2010 / 23:51
0

Em relação à resposta do @Brandon: Windows Server 2003 (para Pequenas Empresas), preso no final da instalação, se você começar com --nonetworks (em 2016: --network none ), exibindo uma mensagem de erro, é necessário instalar um adaptador de rede compatível com TCP / IP.

É melhor estratégia para instalar com a rede de modo de usuário (LAN local) e, em seguida, desabilitar o acesso à Internet de a máquina através do iptables.

Eu geralmente começo assim: sudo virt-install \ --connect qemu:///system \ --name=win2k3-br1 \ --ram=1024 \ --vcpus=2 \ --os-type=windows --os-variant=win2k3 \ --virt-type=kvm \ --hvm \ --graphics vnc,port=5951 \ --cdrom=/var/lib/libvirt/boot/w2003cd1.iso \ --disk path=/var/lib/libvirt/images/win2k3-br1.img,size=10 \ --disk path=/var/lib/libvirt/boot/virtio-win_x86.vfd,device=floppy \ --network=network:default,model=virtio

Para anexar um 'monitor' à sua máquina eu uso o vnc, com o encaminhamento de porta ssh:

ssh user@[IP of KVM master] -L 5951:127.0.0.1:5951 then start a vnc client (I use vinagre) locally and connect to 127.0.0.1:5951

Não se esqueça de baixar o driver SCSI do Windows 2003 ( virtio-win_x86.vfd ), e pressione F6 antes do início da instalação, e adicione-o manualmente (desafio real para iniciar um cliente vnc e pressionar o F6), caso contrário, a instalação ficou com 33 minutos restantes por tempo indefinido.

Uma pequena observação (no Ubuntu 16.04.1, 2016 outubro), se eu usar o formato de imagem de disco qcow2 ( --disk path=/var/lib/libvirt/images/win2k3.qcow2,size=40,bus=virtio,format=qcow2 ), a instalação também travou.

    
por 22.10.2016 / 08:47