Usage
September 15, 2023 ยท View on GitHub
-
install docker https://docs.docker.com/engine/install/ubuntu/ or https://docs.docker.com/docker-for-windows/install/ or Ubuntu2204 on windows app store and install docker on wsl2
-
git clone this repo
-
download windows iso into
/isofolder -
create image into
/imgfolder> cd img > qemu-img create -f vhdx -o size=20G win7.vhdx -
replace
win7.vhdxindocker-compose.ymlwith your image name"-drive", "file=/img/win7.vhdx",replace
cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.isoindocker-compose.ymlwith your iso name"-cdrom", "/iso/cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso",if you want to boot from cdrom, you need to uncomment
"-boot","d"indocker-compose.yml -
run docker-compose(need to run in wsl2)
> wsl > docker-compose up (on first run, it will take a long time to build the image, network should be well connected)
if you want to connect to the vm from vncviewer, you need to uncomment "-vnc", ":0"
and expose port 5900 by uncomment 5900:5900 and run docker-compose up again, use vncviewer to connect to the vm with localhost:5900
./shared folder is shared between host and vm, you can put your files in it, and access it from \\10.0.2.4 in vm