aerokube / windows-images

Step by step instructions for building Docker images with Windows
Apache License 2.0
221 stars 44 forks source link

Disk missing in Windows installation #2

Closed bonigarcia closed 5 years ago

bonigarcia commented 5 years ago

I am trying to create the Docker images following the tutorial but I'm stuck just before starting to install Windows. The problem seems to be related with the hard disk (or drive), which is not detected in qemu. Here is the list of commands I executed:

System info:

$ uname -a
Linux ubuntu 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ ls -l /dev/kvm
crw-rw---- 1 root kvm 10, 232 mar 27 13:23 /dev/kvm

$ qemu-system-x86_64 -version
QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.11)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

Cloning the GitHub project:

$ git clone https://github.com/aerokube/windows-images.git
Cloning into 'windows-images'...
remote: Enumerating objects: 118, done.
remote: Counting objects: 100% (118/118), done.
remote: Compressing objects: 100% (97/97), done.
remote: Total 118 (delta 20), reused 115 (delta 18), pack-reused 0
Receiving objects: 100% (118/118), 13.09 MiB | 6.30 MiB/s, done.
Resolving deltas: 100% (20/20), done.

$ cd windows-images/

Creating the hard disk:

$ qemu-img create -f qcow2 hdd.img 40G
Formatting 'hdd.img', fmt=qcow2 size=42949672960 cluster_size=65536 lazy_refcounts=off refcount_bits=16

Then I downloaded the Windows 10 images and virtio drivers as described in the tutorial:

$ ls
hdd.img  image  LICENSE  png  README.md  virtio-win-0.1.141.iso  Win10_1809Oct_English_x32.iso

And finally I run qemu:

$ sudo qemu-system-x86_64 -enable-kvm \
>         -machine q35 -smp sockets=1,cores=1,threads=2 -m 2048 \
>         -usb -device usb-kbd -device usb-tablet -rtc base=localtime \
>         -net nic,model=virtio -net user,hostfwd=tcp::4444-:4444 \
>         -drive file=hdd.img,media=disk,if=virtio \
>         -drive file=Win10_1809Oct_English_x32.iso,media=cdrom \
>         -drive file=virtio-win-0.1.141.iso,media=cdrom 
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: guest updated active QH
qemu-system-x86_64: warning: guest updated active QH
qemu-system-x86_64: warning: guest updated active QH
qemu-system-x86_64: warning: guest updated active QH
qemu-system-x86_64: warning: guest updated active QH
qemu-system-x86_64: warning: guest updated active QH
qemu-system-x86_64: warning: guest updated active QH
qemu-system-x86_64: warning: guest updated active QH

After typing the Windows serial, the wizard can't go forward since the disk is missing:

Screenshot from 2019-03-27 13-20-42

Do you have any idea of the source of the problem? Thanks in advance.

bonigarcia commented 5 years ago

Sorry, I was skipping the part in which the driver is selecting by browsing E. Now it is installing!

felipefacundes commented 4 years ago

change from virtio to ide

-drive file=hdd.img,media=disk,if=ide

or

-hda hdd.img