메인 콘텐츠로 이동

Catswords OSS

docker-qemu

Repository link: https://github.com/gnh1201/docker-qemu

This repository will be long-term maintained on QEMU 6.1.0 (Released on 24 AUG 2021) because there are third-party projects that depend on this repository.

For Non-native environments

Note: Non-native virtualization does not support KVM acceleration (Do not use --device /dev/kvm).

ARM

MIPS

If ARM or MIPS is selected, vmlinuz(kernel image) and initrd are required. Please refer to this article and proceed.

Manually bootloader activation

When using the non-native (e.g. ARM, MIPS) platform, the bootloader must be extracted manually after the installation is completed.

$ qemu-img convert armhf.qcow2 armhf.raw $ sudo mkdir /mnt/tmp $ sudo mount -o loop,offset=$((2048 * 512)) armhf.raw /mnt/tmp $ cd /mnt/tmp/boot

Then, copy the initrd and vmlinuz files to an external directory. And load using QEMU_KERNEL and QEMU_INITRD variables.

Manually root activation

When using the non-native (e.g. ARM, MIPS) platform, it was confirmed that the settings were not reflected in /etc/passwd and /etc/shadow. Please refer to the two links below and set them up manually.

Windows Guest on Docker (Linux Host)

Download and create a combined ISO

Extract the two ISO files and combine them into one ISO file. (e.g. win10_x64_virtio.iso)

And then, load the drivers - vioscsi\w10\amd64(SCSI) and NetKVM\w10\amd64(Network) - when installing Windows 10

Build a Docker file

or use Docker Hub

Write the bash file (e.g., win10-virtio.sh)

The example(/home/john/win10-virtio.qcow2 and /cdimages/win10_x64_virtio.iso) have to replace with your own path.

If you want to allow RDP external access, please add EXPOSE 3389 to the file 6.1/Dockerfile (Must be rebuilt image)

Run a container

Find an IP address of the container

Connect to the container via VNC

Access the container with a client capable of accessing the VNC protocol.


All done.

Network issue of default repositories

Due to issues in the production environment with decreased speeds on the default APT repository (e.g., insufficient network peering) and firewall issues (e.g., Mismatched Hash), we are operating a separate cache server. The following cache server is proxied through Cloudflare:


Made with Readable