Closed MaxPeal closed 2 years ago
for qemu-system-x86_64 its the same error
$ qemu-img create -f qcow2 -o preallocation=off $HOME/hda.qcow2 10m
Formatting '/home/user/hda.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=off compression_type=zlib size=10485760 lazy_refcounts=off refcount_bits=16
$ docker run -it --rm \
--device /dev/kvm \
--name qemu-container \
-v $HOME/hda.qcow2:/tmp/hda.qcow2 \
-e QEMU_HDA=/tmp/hda.qcow2 \
-e QEMU_HDA_SIZE=100G \
-e QEMU_CPU=4 \
-e QEMU_RAM=4096 \
-e QEMU_CDROM=https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.0-x86_64.iso \
-e QEMU_BOOT='order=d' \
-e QEMU_PORTS='2375 2376' \
tianon/qemu:native
+ exec qemu-system-x86_64 -enable-kvm -smp 4 -m 4096 -drive file=/tmp/hda.qcow2,index=0,media=disk,discard=unmap,detect-zeroes=unmap,if=none,id=hda -device virtio-scsi-pci -device scsi-hd,drive=hda -cdrom https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.0-x86_64.iso -boot order=d -netdev user,hostname=dc2c4cb24da7,hostfwd=tcp::22-:22,hostfwd=udp::22-:22,hostfwd=tcp::2375-:2375,hostfwd=udp::2375-:2375,hostfwd=tcp::2376-:2376,hostfwd=udp::2376-:2376,id=net -device virtio-net-pci,netdev=net -serial stdio -vnc :0
qemu-system-x86_64: -cdrom https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.0-x86_64.iso: CURL: Error opening file: server certificate verification failed. CAfile: none CRLfile: none
$
without https/ssl it works
$ docker run -it --rm \
--device /dev/kvm \
--name qemu-container \
-v $HOME/hda.qcow2:/tmp/hda.qcow2 \
-e QEMU_HDA=/tmp/hda.qcow2 \
-e QEMU_HDA_SIZE=100G \
-e QEMU_CPU=4 \
-e QEMU_RAM=4096 \
-e QEMU_CDROM=http://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.0-x86_64.iso \
-e QEMU_BOOT='order=d' \
-e QEMU_PORTS='2375 2376' \
tianon/qemu:native
+ exec qemu-system-x86_64 -enable-kvm -smp 4 -m 4096 -drive file=/tmp/hda.qcow2,index=0,media=disk,discard=unmap,detect-zeroes=unmap,if=none,id=hda -device virtio-scsi-pci -device scsi-hd,drive=hda -cdrom http://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.0-x86_64.iso -boot order=d -netdev user,hostname=6e22a7287b1d,hostfwd=tcp::22-:22,hostfwd=udp::22-:22,hostfwd=tcp::2375-:2375,hostfwd=udp::2375-:2375,hostfwd=tcp::2376-:2376,hostfwd=udp::2376-:2376,id=net -device virtio-net-pci,netdev=net -serial stdio -vnc :0
ISOLINUX 6.04 6.04-pre1 Copyright (C) 1994-2015 H. Peter Anvin et al
boot:
OpenRC 0.44.7.88ce4d9bb0 is starting up Linux 5.15.4-0-virt (x86_64)
* /proc is already mounted
* Mounting /run ... * /run/openrc: creating directory
* /run/lock: creating directory
* /run/lock: correcting owner
* Caching service dependencies ... [ ok ]
* Remounting devtmpfs on /dev ... [ ok ]
* Mounting /dev/mqueue ... [ ok ]
* Mounting modloop ... * Verifying modloop
[ ok ]
* Mounting security filesystem ... [ ok ]
* Mounting debug filesystem ... [ ok ]
* Mounting persistent storage (pstore) filesystem ... [ ok ]
* Starting busybox mdev ... [ ok ]
* Loading hardware drivers ... [ ok ]
* Loading modules ... [ ok ]
* Setting system clock using the hardware clock [UTC] ... [ ok ]
* Checking local filesystems ... [ ok ]
* Remounting filesystems ... [ ok ]
* Mounting local filesystems ... [ ok ]
* Configuring kernel parameters ... [ ok ]
* Migrating /var/lock to /run/lock ... [ ok ]
* Creating user login records ... [ ok ]
* Cleaning /tmp directory ... [ ok ]
* Setting hostname ... [ ok ]
* Starting busybox syslog ... [ ok ]
* Starting firstboot ... [ ok ]
Welcome to Alpine Linux 3.15
Kernel 5.15.4-0-virt on an x86_64 (/dev/ttyS0)
localhost login: root
Welcome to Alpine!
The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org/>.
You can setup the system with the command: setup-alpine
You may change this message by editing /etc/motd.
localhost:~# poweroff
localhost:~# * Stopping busybox syslog ... [ ok ]
* Unmounting loop devices
* Remounting /.modloop read only ... [ ok ]
* Unmounting filesystems
* Unmounting /media/cdrom ... [ ok ]
* Setting hardware clock using the system clock [UTC] ... [ ok ]
* Stopping busybox mdev ... [ ok ]
[ ok ]
* Terminating remaining processes ... [ ok ]
* Killing remaining processes ... [ ok ]
* Saving dependency cache ... [ ok ]
[ ok ]
* Remounting remaining filesystems read-only ... * Remounting / read only ... [ ok ]
[ ok ]
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system poweroff
[ 32.789353] reboot: Power down
$
Whoa, TIL these commands are supposed to be able to take URLs! :joy:
I've opened a PR at https://github.com/tianon/docker-qemu/pull/31 :+1:
qemu-img info https://cent... dont work as in the finale image the ca-certificates are missing, can we add this please,
i dont know how i add the exclusion for https://github.com/tianon/docker-qemu/blob/8fc69dd643d435e182553668bd72a27cd6448919/Dockerfile.template#L218 https://github.com/tianon/docker-qemu/blob/8fc69dd643d435e182553668bd72a27cd6448919/Dockerfile.template#L232