Sign in Join
Wiki copytemporary

Qemu and other emulators: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11This note covers setting up Qemu on an x86-based development system running Linux. This allows native (rather than cross) development tools to be run, which can be useful:
22
33- where the target system has performance/resource issues (e.g. some ARM systems)
44- is not run natively due to company policy (older versions of Microsoft Windows)
55- is quite simply unavailable at a reasonable price (e.g. SGI MIPS systems or the Chinese MIPS-based systems).
66
77It also briefly mentions User Mode Linux for x86 and the Hercules emulator for IBM zSeries mainframes despite the fact that these are not particularly relevant to Free Pascal, and Docker containerisation. It does not consider x86-on-x86 virtualisation systems such as VMware, Microsoft Hyper-V or Oracle VirtualBox, and only considers Linux KVM as a foundation technology for Qemu.
88
99## The Host System
1010
1111In the current case, the host is a Compaq rack-mount server running at around 3GHz with several Gb RAM; be warned that performance will drop off drastically with a lower specification system. It has two internal drive cages, the first is connected to a RAID controller and is used for the host operating system and tools, the second is connected to a SCSI controller and contains 6x discs each of which is used for a different guest system.
1212
1313The host IP address is 192.168.1.22 and the system is named pye-dev-07, the default gateway and name server are on 192.168.1.1. Guest systems are on the 192.168.22.x subnet and are named pye-dev-07a (192.168.22.16), pye-dev-07b (192.168.22.17) and so on, they have their own gateway 192.168.22.1 which is known to the site router and firewalls.
1414
1515The host operating system is Debian "Squeeze", the host normally runs headless and may be accessed by SSH, X using XDMCP, or VNC. The display manager is gdm since this has a better XDMCP implementation than the alternatives, however in practice graphical login is most often handled by VNC.
1616
1717The following guests are implemented:
1818
1919pye-dev-07a
2020Debian on ARM (little-endian, armel) using Qemu
2121
2222pye-dev-07b
2323Debian on MIPS (little-endian, mipsel) using Qemu
2424
2525pye-dev-07c
2626Slackware x86 13.37 using Qemu
2727
2828pye-dev-07d
2929Slackware x86 13.37 using User Mode Linux
3030
3131pye-dev-07e
3232Windows 2K using Qemu
3333
3434pye-dev-07f
3535Debian on zSeries using the Hercules emulator
3636
3737pye-dev-07g
3838Debian on 68k using the Aranym emulator
3939
4040Originally, pye-dev-07a was earmarked for big-endian ARM, but this appears to be being phased out by Debian so is probably no longer a viable target. Anybody planning to port FPC to the AVR-based Arduino?
4141
4242In general, multiple guests can run simultaneously although this has not been exhaustively tested recently.
4343
4444In the case of Linux the guest systems are each installed on an 18Gb disc, in the case of Windows a 36Gb disc is used. Each disc is assigned a label using e2label (arm, armel and so on), so that the startup script can mount it by name irrespective of which drive cage slot it's in.
4545
4646## Debian Guest using Qemu
4747
4848Select a suitable Debian mirror and version, for example
4949
50-` `[`http://ftp.de.debian.org/debian/dists/squeeze/main/`](http://ftp.de.debian.org/debian/dists/squeeze/main/)`...`
50+```text
51+ http://ftp.de.debian.org/debian/dists/squeeze/main/...
52+```
5153
5254Fetch a kernel and initrd image for Debian Squeeze, as below.
5355
5456For ARM (little-endian):
5557
56-` .../main/installer-armel/current/images/versatile/netboot/vmlinux-2.6.32-5-versatile`\
57-` .../main/installer-armel/current/images/versatile/netboot/initrd.gz`
58+```text
59+ .../main/installer-armel/current/images/versatile/netboot/vmlinux-2.6.32-5-versatile
60+ .../main/installer-armel/current/images/versatile/netboot/initrd.gz
61+```
5862
5963In addition for this architecture you also need:
6064
61-` `[`http://people.debian.org/~aurel32/qemu/armel/initrd.img-2.6.32-5-versatile`](http://people.debian.org/~aurel32/qemu/armel/initrd.img-2.6.32-5-versatile)
65+```text
66+ http://people.debian.org/~aurel32/qemu/armel/initrd.img-2.6.32-5-versatile
67+```
6268
6369For MIPS (little-endian):
6470
65-`.../main/installer-mipsel/current/images/malta/netboot/vmlinux-2.6.32-5-4kc-malta`\
66-`.../main/installer-mipsel/current/images/malta/netboot/initrd.gz`
71+```text
72+.../main/installer-mipsel/current/images/malta/netboot/vmlinux-2.6.32-5-4kc-malta
73+.../main/installer-mipsel/current/images/malta/netboot/initrd.gz
74+```
6775
6876Copy these to the disc reserved for the guest, e.g. /export/mipsel.
6977
7078Create a filesystem for Qemu, e.g.:
7179
7280``` bash
7381# qemu-img create -f qcow mipsel_hda.img 16G
7482```
7583
7684Expect that to round up to around 17.1 Gb, if it doesn't then experiment. Start Qemu, telling it what kernel, initrd and filesystem to use:
7785
7886For ARM (little-endian):
7987
8088``` bash
8189# qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.gz \
8290-hda armel_hda.img -append root=/dev/ram
8391```
8492
8593Note that the above command requires X access, e.g. ssh with the -X option.
8694
8795For MIPS (little-endian):
8896
8997``` bash
9098# qemu-system-mipsel -M malta -kernel vmlinux-2.6.32-5-4kc-malta -initrd initrd.gz \
9199-hda mipsel_hda.img -append "root=/dev/ram console=ttyS0" -nographic
92100```
93101
94102Install the guest operating system as usual, splitting the disc into 16.5Gb for / with the remainder (around 700Mb) as swap. This will be slow, 8 or 9 hours is not implausible, so make sure that nobody's about to turn off your mains or disconnect you from the Internet.
95103
96104Don't worry if it tells you it's not installing a loader- it's not needed since the kernel and initrd are loaded into memory by the host.
97105
98106Boot the operating system and set network addresses etc. Use 192.168.22.16 or similar, with a gateway of 192.168.22.1.
99107
100108For ARM (little-endian):
101109
102110``` bash
103111# qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile \
104112 -initrd initrd.img-2.6.32-5-versatile -hda armel_hda.img -append "root=/dev/sda1"
105113```
106114
107115For MIPS (little-endian):
108116
109117``` bash
110118# qemu-system-mipsel -M malta -kernel vmlinux-2.6.32-5-4kc-malta \
111119 -hda mipsel_hda.img -append "root=/dev/sda1 console=ttyS0" -nographic
112120```
113121
114122Finally, you should be able to boot the operating system with an operational network. This relies on having /etc/qemu-ifup and /etc/qemu-ifdown files (see below), and passes additional parameters to them in shell variables. In outline:
115123
116124For ARM (little-endian):
117125
118126``` bash
119127# qemu-system-arm -M versatilepb -m 256 -hda armel_hda.img \
120128 -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile \
121129 -append 'root=/dev/sda1 text' \
122130 -net nic,macaddr=00:16:3e:00:00:01 -net tap,ifname=tun1
123131```
124132
125133For MIPS (little-endian):
126134
127135``` bash
128136# qemu-system-mipsel -M malta -m 256 -hda mipsel_hda.img \
129137 -kernel vmlinux-2.6.32-5-4kc-malta -no-reboot \
130138 -append 'root=/dev/sda1 console=ttyS0' -nographic \
131139 -net nic,macaddr=00:16:3e:00:00:02 -net tap,ifname=tun2
132140```
133141
134142Remember that if you change the network interface type or MAC address you will probably need to delete entries from the guest's /etc/udev/rules.d/z??_persistent-net.rules file.
135143
136144## Windows 2K Guest using Qemu
137145
138146Use dd to save a .iso image of the installation CD. Create a filesystem image:
139147
140148``` bash
141149# qemu-img create -f qcow2 win2k.img 32G
142150```
143151
144152Boot using startup script as below. Note that this must specify a non-default network card, since Qemu's current (as of 2011) default is not supported by Windows 2K.
145153
146154*TODO: run with kernel support module.*
147155
148156## KVM on a Linux host
149157
150158KVM (Kernel-based Virtual Machine) is an enabling API supported on more recent x86 and x86-64 (AMD64) systems, this replaces the older KQemu kernel module which is now deprecated by both Qemu and the kernel.
151159
152160KVM is typically enabled by the host system BIOS. If not enabled by the BIOS it cannot be enabled by the kernel or by (a suitably privileged) application program, since the x86 architecture requires power to be cycled to change the state of this facility. The result of this is that KVM might be unavailable (no /dev/kvm device) even if it shown as supported by the CPU flags in /proc/cpuinfo.
153161
154162## Common Qemu startup, ifup and ifdown scripts
155163
156164There is much commonality irrespective of whether the guest is running Linux or Windows.
157165
158166First startup script (e.g. /export/C):
159167
160168``` bash
161169#!/bin/sh
162170
163171mount -L mipsel
164172cd /export/mipsel
165173. ./C-2
166174```
167175
168176Second startup script for ARM (little-endian):
169177
170178``` bash
171179#!/bin/sh
172180
173181# Routine startup of a Qemu guest relies on (the host) running /etc/qemu-ifup
174182# to condition ARP, forwarding etc.
175183
176184QEMU_ID=1
177185QEMU='qemu-system-arm -M versatilepb'
178186QEMU_RAM='-m 256'
179187QEMU_HD='-hda armel_hda.img'
180188QEMU_CD=''
181189QEMU_BOOT="-kernel vmlinuz-2.6.32-5-versatile -append 'root=/dev/sda1 text' -initrd initrd.img-2.6.32-5-versatile"
182190# QEMU_MONITOR='-monitor stdio -nographic'
183191# QEMU_MONITOR='-nographic'
184192QEMU_VGA=''
185193VNC_ID=$(($QEMU_ID+1))
186194# QEMU_VNC="-vnc :$VNC_ID -k en-gb"
187195QEMU_VNC=''
188196QEMU_NET="-net nic,macaddr=00:16:3e:00:00:0$QEMU_ID -net tap,ifname=tun$QEMU_ID"
189197QEMU_GUEST_IP_ADDRESS=192.168.22.17
190198QEMU_GUEST_IP_GATEWAY=192.168.22.1
191199QEMU_HOST_GATEWAY_IF=eth1
192200export QEMU_GUEST_IP_ADDRESS QEMU_GUEST_IP_GATEWAY QEMU_HOST_GATEWAY_IF
193201
194202echo * $QEMU $QEMU_RAM $QEMU_HD $QEMU_CD $QEMU_BOOT \
195203 $QEMU_MONITOR $QEMU_VGA $QEMU_NET $QEMU_VNC
196204
197205screen -S QEMU_$QEMU_ID \
198206sh -c "$QEMU $QEMU_RAM $QEMU_HD $QEMU_CD $QEMU_BOOT \
199207 $QEMU_MONITOR $QEMU_VGA $QEMU_NET $QEMU_VNC"
200208
201209cd ..
202210```
203211
204212Second startup script for MIPS (little-endian):
205213
206214``` bash
207215#!/bin/sh
208216
209217# Routine startup of a Qemu guest relies on (the host) running /etc/qemu-ifup
210218# to condition ARP, forwarding etc.
211219
212220QEMU_ID=2
213221QEMU='qemu-system-mipsel -M malta'
214222QEMU_RAM='-m 256'
215223QEMU_HD='-hda mipsel_hda.img'
216224QEMU_CD=''
217225QEMU_BOOT="-kernel vmlinux-2.6.32-5-4kc-malta -append 'root=/dev/sda1 console=ttyS0' -no-reboot"
218226# QEMU_MONITOR='-monitor stdio -nographic'
219227QEMU_MONITOR='-nographic'
220228QEMU_VGA=''
221229VNC_ID=$(($QEMU_ID+1))
222230# QEMU_VNC="-vnc :$VNC_ID -k en-gb"
223231QEMU_VNC=''
224232QEMU_NET="-net nic,macaddr=00:16:3e:00:00:0$QEMU_ID -net tap,ifname=tun$QEMU_ID"
225233QEMU_GUEST_IP_ADDRESS=192.168.22.18
226234QEMU_GUEST_IP_GATEWAY=192.168.22.1
227235QEMU_HOST_GATEWAY_IF=eth1
228236export QEMU_GUEST_IP_ADDRESS QEMU_GUEST_IP_GATEWAY QEMU_HOST_GATEWAY_IF
229237
230238echo * $QEMU $QEMU_RAM $QEMU_HD $QEMU_CD $QEMU_BOOT \
231239 $QEMU_MONITOR $QEMU_VGA $QEMU_NET $QEMU_VNC
232240
233241screen -S QEMU_$QEMU_ID \
234242sh -c "$QEMU $QEMU_RAM $QEMU_HD $QEMU_CD $QEMU_BOOT \
235243 $QEMU_MONITOR $QEMU_VGA $QEMU_NET $QEMU_VNC"
236244
237245cd ..
238246```
239247
240248Second startup script for Windows:
241249
242250``` bash
243251#!/bin/sh
244252
245253# Routine startup of a Qemu guest relies on (the host) running /etc/qemu-ifup
246254# to condition ARP, forwarding etc.
247255
248256QEMU_ID=4
249257QEMU=qemu
250258QEMU_RAM='-m 256'
251259QEMU_HD='-hda win2k.img'
252260QEMU_CD='-cdrom Windows2k-SP4.iso'
253261QEMU_BOOT='-boot c'
254262QEMU_MONITOR='-monitor stdio'
255263QEMU_VGA='-vga cirrus'
256264VNC_ID=$(($QEMU_ID+1))
257265QEMU_VNC="-vnc :$VNC_ID -k en-gb"
258266QEMU_NET="-net nic,macaddr=00:16:3e:00:00:0$QEMU_ID,model=rtl8139 -net tap,ifname=tun$QEMU_ID"
259267QEMU_GUEST_IP_ADDRESS=192.168.22.20
260268QEMU_GUEST_IP_GATEWAY=192.168.22.1
261269QEMU_HOST_GATEWAY_IF=eth1
262270export QEMU_GUEST_IP_ADDRESS QEMU_GUEST_IP_GATEWAY QEMU_HOST_GATEWAY_IF
263271
264272echo * $QEMU $QEMU_RAM $QEMU_HD $QEMU_CD $QEMU_BOOT \
265273 $QEMU_MONITOR $QEMU_VGA $QEMU_NET $QEMU_VNC
266274
267275screen -S QEMU_$QEMU_ID \
268276$QEMU $QEMU_RAM $QEMU_HD $QEMU_CD $QEMU_BOOT \
269277 $QEMU_MONITOR $QEMU_VGA $QEMU_NET $QEMU_VNC
270278
271279cd ..
272280```
273281
274282/etc/qemu-ifup (for both Linux and Windows):
275283
276284``` bash
277285#!/bin/bash
278286
279287# if-up file for qemu, heavily cribbed from the command sequence embedded in
280288# User Mode Linux. MarkMLl.
281289
282290echo Running /etc/qemu-ifup $1 $2...
283291
284292# For compatibility with UML the only parameter here is $1 which is the
285293# interface name. I've put in a reference to $2 so we can see it if anything
286294# changes.
287295
288296# I'm going to assume that qemu is always run by root. This is fairly
289297# reasonable since it allows guest OSes to be fired up which themselves might
290298# give access to confidential data etc. if compromised.
291299
292300# Here's my equivalent to the host-side UML setup for Qemu. We're hamstrung
293301# here by the fact that the emulator is not telling us what IP address it's
294302# trying to enable, there isn't a 1:1 correspondence between IP addresses and
295303# interfaces since the latter depends on the order the sessions are started.
296304#
297305# As a hack, assume that the caller exports QEMU_GUEST_IP_ADDRESS (e.g.
298306# 192.168.17.16), QEMU_GUEST_IP_GATEWAY (e.g. 192.168.17.1) and
299307# QEMU_HOST_GATEWAY_IF (e.g. eth0).
300308
301309echo * modprobe tun
302310modprobe tun
303311
304312echo * ifconfig $1 $QEMU_GUEST_IP_GATEWAY netmask 255.255.255.255 up
305313ifconfig $1 $QEMU_GUEST_IP_GATEWAY netmask 255.255.255.255 up
306314
307315X=`cat /proc/sys/net/ipv4/ip_forward`
308316if [ "$X" == "0" ]; then
309317
310318 # Use either this...
311319
312320# echo Global forwarding is not enabled. Please refer to the administrator
313321# echo responsible for this machine, enabling it might be a security hazard.
314322
315323 # ...or this.
316324
317325 echo Forcibly enabling global forwarding, note that this might be a security hazard.
318326 echo * echo 1 \> /proc/sys/net/ipv4/ip_forward
319327 echo 1 > /proc/sys/net/ipv4/ip_forward
320328 X=`cat /proc/sys/net/ipv4/ip_forward`
321329 if [ "$X" == "0" ]; then
322330 echo Unable to enable global forwarding. Please refer to the administrator
323331 echo responsible for this machine.
324332 fi
325333fi
326334
327335echo * route add -host $QEMU_GUEST_IP_ADDRESS dev $1
328336route add -host $QEMU_GUEST_IP_ADDRESS dev $1
329337
330338echo * echo 1 \> /proc/sys/net/ipv4/conf/$1/proxy_arp
331339echo 1 > /proc/sys/net/ipv4/conf/$1/proxy_arp
332340X=`cat /proc/sys/net/ipv4/conf/$1/proxy_arp`
333341if [ "$X" == "0" ]; then
334342 echo -n Retrying
335343 while [ "$X" == "0" ]; do
336344 sleep 1
337345 echo -n .
338346 echo 1 > /proc/sys/net/ipv4/conf/$1/proxy_arp
339347 X=`cat /proc/sys/net/ipv4/conf/$1/proxy_arp`
340348 done
341349 echo OK
342350fi
343351
344352echo * arp -Ds $QEMU_GUEST_IP_ADDRESS $1 pub
345353arp -Ds $QEMU_GUEST_IP_ADDRESS $1 pub
346354
347355echo * arp -Ds $QEMU_GUEST_IP_ADDRESS $QEMU_HOST_GATEWAY_IF pub
348356arp -Ds $QEMU_GUEST_IP_ADDRESS $QEMU_HOST_GATEWAY_IF pub
349357
350358# Set up experimental UDP proxies. Depending on the protocol of interest
351359# messages in one or both directions might need to be relayed.
352360#
353361# UDP port 79 is used for Dialarm signals, a unidirectional proxy is
354362# adequate for this but detection of hosts changing state (i.e. being
355363# added to or removed from the population of cooperating systems) is far
356364# more responsive if a bidirectional proxy is available.
357365
358366PROXY_ID=1
359367case "$1" in
360368 tun1)
361369 PROXY_ID=2
362370 ;;
363371 tun2)
364372 PROXY_ID=3
365373 ;;
366374 tun3)
367375 PROXY_ID=4
368376 ;;
369377 tun4)
370378 PROXY_ID=5
371379 ;;
372380 tun5)
373381 PROXY_ID=6
374382 ;;
375383 tun6)
376384 PROXY_ID=7
377385 ;;
378386 tun7)
379387 PROXY_ID=8
380388 ;;
381389esac
382390
383391# echo * udp-broadcast-relay -f $PROXY_ID 79 $QEMU_HOST_GATEWAY_IF $1
384392# /usr/local/src/udp-broadcast-relay/udp-broadcast-relay-0.3/udp-broadcast-relay \
385393# -f $PROXY_ID 79 $QEMU_HOST_GATEWAY_IF $1
386394
387395# Alternatively use this one which is oriented towards IP addresses
388396# rather than interfaces.
389397
390398# Note attempt to counteract any niceness applied to Qemu itself.
391399
392400ps ax | grep 'udp-proxy[ ]-z 79 ' >/dev/null 2>&1
393401if [ $? != 0 ]; then
394402 echo * udp-proxy -z 79 $QEMU_GUEST_IP_ADDRESS
395403 /usr/bin/nice --adjustment=20 /usr/local/src/udp-proxy/udp-proxy -z 79 $QEMU_GUEST_IP_ADDRESS
396404else
397405 echo * Already running udp-proxy -z 79 $QEMU_GUEST_IP_ADDRESS
398406fi
399407
400408# echo * udp-proxy -z 13264 $QEMU_GUEST_IP_ADDRESS
401409# /usr/local/src/udp-proxy/udp-proxy -z 13264 $QEMU_GUEST_IP_ADDRESS
402410
403411echo .../qemu/qemu-ifup completed.
404412```
405413
406414/etc/qemu-ifdown (for both Linux and Windows):
407415
408416``` bash
409417#!/bin/sh
410418
411419 echo * route del -host $QEMU_GUEST_IP_ADDRESS dev $1
412420route del -host $QEMU_GUEST_IP_ADDRESS dev $1
413421
414422echo * ifconfig $1 down
415423ifconfig $1 down
416424```
417425
418426In actual fact, these operations were cribbed from User Mode Linux (below) where they are embedded inside a host library.
419427
420428## Slackware x86 Guest using User Mode Linux
421429
422430User Mode Linux runs a guest kernel as a standard program, i.e. there is no emulation or virtualisation involved. The guest kernel can be allocated either physical discs or filesystems contained in files.
423431
424432Put a .iso corresponding to a recent Slackware DVD in /export/uml. Unpack the initrd using zcat and cpio, save it as an ext3 image initrd_unpacked. Using dd create an empty file root_fs_slackware which will be partitioned and formatted during installation.
425433
426434Use the sources from e.g. a recent Slackware to compile kernel plus modules with ARCH=um using a suffix -uml. Save the kernel to /export/uml/linux, install the modules and then copy them into the initrd filesystem.
427435
428436Boot the UML kernel, telling it to use the initrd image and DVD iso:
429437
430438``` bash
431439# ./linux ubd0=initrd_unpacked ubd1=root_fs_slackware fake_ide ubd2r=slackware-13.37-install-dvd.iso rw
432440```
433441
434442Run fdisk and setup as normal, you might need to tell it to install to /dev/ubd1 and use /dev/ubd2 for source. Finally, copy the modules onto the target filesystem.
435443
436444When complete start up like this:
437445
438446``` bash
439447# Routine startup of a UML guest relies on (the host) running /usr/lib/uml/uml_net
440448# to condition ARP, forwarding etc.
441449
442450echo * ./linux ubd0=initrd_unpacked ubd1=root_fs_slackware fake_ide ubd2r=slackware-13.37-install-dvd.iso \
443451 root=/dev/ubdb1 eth0=tuntap,,,192.168.1.22
444452
445453screen -S UML_3 \
446454./linux ubd0=initrd_unpacked ubd1=root_fs_slackware fake_ide ubd2r=slackware-13.37-install-dvd.iso \
447455 root=/dev/ubdb1 eth0=tuntap,,,192.168.1.22
448456
449457cd ..
450458```
451459
452460Note that this is usually run from an X session, since the multiple virtual consoles appear as separate xterms. Also see [1](http://wiki.freepascal.org/linux/kernel/user_mode_VM).
453461
454462## Debian 68k Guest using Aranym
455463
456464``` bash
457465# apt-get install aranym
458466```
459467
460468I (MarkMLl) note this installs bridge-utils but instead am going to use my standard Qemu-style startup scripts, which themselves were originally based on sequences executed internally by UML; note that Hercules for zSeries (above) is the odd-one-out here since the guest uses SLIP for networking.
461469
462470Referring to <https://wiki.debian.org/Aranym/Quick>, download <https://www.freewrt.org/~tg/dc11m68k.tgz> and check its signature. Unpack, noting a kernel vmlinuz-2.6.39-2-atari, a filesystem image dc11.img.xz and a configuration file aranym.config.
463471
464472In aranym.config, change the ETH0 section to read:
465473
466-`Type = ptp`\
467-`HostIP = 192.168.22.1`\
468-`AtariIP = 192.168.22.22`\
469-`Netmask = 255.255.255.0`
474+``` pascal
475+Type = ptp
476+HostIP = 192.168.22.1
477+AtariIP = 192.168.22.22
478+Netmask = 255.255.255.0
479+```
470480
471481Change the startup script runaranym to read:
472482
473483``` bash
474484#!/bin/sh
475485
476486QEMU_GUEST_IP_ADDRESS=192.168.22.22
477487QEMU_GUEST_IP_GATEWAY=192.168.22.1
478488QEMU_HOST_GATEWAY=eth0
479489export QEMU_GUEST_IP_ADDRESS QEMU_GUEST_IP_GATEWAY QEMU_HOST_GATEWAY
480490
481491/etc/qemu-ifup tap7
482492
483493cd "$(dirname "$0")"
484494SDL_AUDIODRIVER=dummy; export SDL_AUDIODRIVER
485495aranym-mmu -l -c aranym.config
486496
487497/etc/qemu-ifdown tap7
488498```
489499
490500Uncompress the image file:
491501
492502``` bash
493503# unxz dc11.img.xz
494504```
495505
496506Using xterm on a graphical login, run the startup script:
497507
498508``` bash
499509# runaranym
500510```
501511
502512The result of that should be a console for the guest Debian system.
503513
504514On the guest console, login as root with password root, and immediately change the password to something appropriate using the passwd command. Change the hostname in /etc/hostname and /etc/hosts, the IP address etc. in /etc/network/interfaces, and the nameserver in /etc/resolv.conf. Reboot and check that the network is operational by pinging from the guest to the site router (e.g. 192.168.1.1) and then pinging the guest (192.168.22.22) from any convenient system; if this doesn't work fix it before continuing.
505515
506516Then as described on <https://wiki.debian.org/Aranym/Quick> run the three commands:
507517
508518``` bash
509519# dpkg-reconfigure openssh-server
510520# apt-get update
511521# apt-get install popularity-contest
512522```
513523
514524Finally edit /root/profile to remove the reminder to run the above. It should now be possible to login using SSH, and to continue to configure and use the system like any Debian guest.
515525
516526## Debian zSeries Guest using Hercules, without VM
517527
518528Hercules is a commercial-grade emulator for IBM mainframes, it is available as a standard package for e.g. Debian and related Linux distributions. Once the emulator is running, enter
519529
520-`ipl 120`
530+```text
531+ipl 120
532+```
521533
522534to boot Linux from device 120. Hopefully SSH will be operational so you won't need to interact with the console, but if you do then prefix each line that is to go to the guest operating system (i.e. rather than to the console itself) with a dot.
523535
524536Refer to the URL in the script below for more details.
525537
526538Startup:
527539
528540``` bash
529541#!/bin/sh
530542
531543# PREREQUISITE: Boot with ipl 120
532544
533545# Note that this makes no attempt to support IPv6.
534546
535547iptables -t nat -A POSTROUTING -o eth1 -s 192.168.22.0/24 -j MASQUERADE
536548iptables -A FORWARD -s 192.168.22.0/24 -j ACCEPT
537549iptables -A FORWARD -d 192.168.22.0/24 -j ACCEPT
538550echo 1 > /proc/sys/net/ipv4/ip_forward
539551echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
540552
541553# http://www.josefsipek.net/docs/s390-linux/hercules-s390.html
542554
543555screen -S HERC_5 \
544556hercules
545557
546558cd ..
547559```
548560
549561Configuration:
550562
551-`CPUSERIAL 000069        # CPU serial number`\
552-`CPUMODEL  9672          # CPU model number`\
553-`MAINSIZE  256           # Main storage size in megabytes`\
554-`XPNDSIZE  0             # Expanded storage size in megabytes`\
555-`CNSLPORT  3270          # TCP port number to which consoles connect`\
556-`NUMCPU    2             # Number of CPUs`\
557-`LOADPARM  0120....      # IPL parameter`\
558-`OSTAILOR  LINUX         # OS tailoring`\
559-`PANRATE   SLOW          # Panel refresh rate (SLOW, FAST)`\
560-`ARCHMODE  ESAME         # Architecture mode ESA/390 or ESAME`\
563+``` pascal
564+CPUSERIAL 000069 # CPU serial number
565+CPUMODEL 9672 # CPU model number
566+MAINSIZE 256 # Main storage size in megabytes
567+XPNDSIZE 0 # Expanded storage size in megabytes
568+CNSLPORT 3270 # TCP port number to which consoles connect
569+NUMCPU 2 # Number of CPUs
570+LOADPARM 0120.... # IPL parameter
571+OSTAILOR LINUX # OS tailoring
572+PANRATE SLOW # Panel refresh rate (SLOW, FAST)
573+ARCHMODE ESAME # Architecture mode ESA/390 or ESAME
561574
562-`# .-----------------------Device number`\
563-`# |     .-----------------Device type`\
564-`# |     |       .---------File name and parameters`\
565-`# |     |       |`\
566-`# V     V       V`\
567-`#---    ----    --------------------`\
575+# .-----------------------Device number
576+# | .-----------------Device type
577+# | | .---------File name and parameters
578+# | | |
579+# V V V
580+#--- ---- --------------------
568581
569-`# console`\
570-`001F    3270`\
582+# console
583+001F 3270
571584
572-`# terminal`\
573-`0009    3215`\
585+# terminal
586+0009 3215
574587
575-`# reader`\
576-`000C    3505    /export/zlinux/rdr/kernel.debian /export/zlinux/rdr/parmfile.debian /export/zlinux/rdr/initrd.debian autopad eof`\
588+# reader
589+000C 3505 /export/zlinux/rdr/kernel.debian /export/zlinux/rdr/parmfile.debian /export/zlinux/rdr/initrd.debian autopad eof
577590
578-`# printer`\
579-`000E    1403    /export/zlinux/prt/print00e.txt crlf`\
591+# printer
592+000E 1403 /export/zlinux/prt/print00e.txt crlf
580593
581-`# dasd`\
582-`0120    3390    /export/zlinux/dasd/3390.LINUX.0120`\
583-`0121    3390    /export/zlinux/dasd/3390.LINUX.0121`\
594+# dasd
595+0120 3390 /export/zlinux/dasd/3390.LINUX.0120
596+0121 3390 /export/zlinux/dasd/3390.LINUX.0121
584597
585-`# tape`\
586-`0581    3420`\
598+# tape
599+0581 3420
587600
588-`# network                               s390     realbox`\
589-`# 0A00,0A01  CTCI -n /dev/net/tun -t 1500 10.1.1.2 10.1.1.1`\
590-`0A00,0A01  CTCI -n /dev/net/tun -t 1500 192.168.22.21 192.168.1.22`
601+# network s390 realbox
602+# 0A00,0A01 CTCI -n /dev/net/tun -t 1500 10.1.1.2 10.1.1.1
603+0A00,0A01 CTCI -n /dev/net/tun -t 1500 192.168.22.21 192.168.1.22
604+```
591605
592606Note that the guest network is configured as SLIP via a simulated CTC (Channel To Channel) device. Best not fooled with.
593607
594608## Debian zSeries Guest using Hercules, with VM
595609
596610This combination is unlikely to work using freely-available software, since Linux requires at least an S/390 G3 system while the most recent IBM VM available is VM/370. It might be technically possible to run a non-free VM on Hercules, but at the time of writing it is at best unclear whether this could be done legally.
597611
598612This means that it is not, for example, possible to run a VM host with simultaneous Linux and MUSIC/SP guests.
599613
600614## MUSIC/SP using Sim/390 or Hercules
601615
602616*This section is an outline only. Note that in the IBM ecosystem OS and VM are the names of specific operating systems, rather than being a generic abbreviation; in addition DOS is a '60s-era IBM operating system with no connection to Microsoft or PCs.*
603617
604618MUSIC/SP is a freely-available (but not open source) operating system which implements a subset of IBM's MVS API, i.e. is to some extent compatible with operating systems of the OS/360 lineage in particular OS/VS1, extended with some novel features including a filesystem with user-accessible directories. It does not provide an API compatible with Linux, and uses the EBCDIC character set.
605619
606620Unlike other freely-available OS-compatible operating systems (see for example [2](http://www.ibiblio.org/jmaynard/), [3](http://gunkies.org/wiki/Installing_VM/370_on_Hercules), and the section below), MUSIC/SP provides TCP/IP networking. However this requires that the IUCV (Inter User Communication Vehicle) be provided by the underlying platform and that there is a suitable network support kernel for it to talk to: these are normally made available by IBM's VM operating system (VM/SP or VM/ESA, a sufficiently-recent version of which is not freely available).
607621
608622Considering emulated environments, IUCV can be provided either by running a recent VM on top of Hercules, or by running the freely-available (but not open source) Sim/390 emulator on Windows. Hercules does not provide IUCV or a network support kernel directly (although as of early 2012 this might be being addressed), so while MUSIC/SP will run on Hercules it will not have TCP/IP-based networking facilities: use Sim/390 if you really need this.
609623
610624Regrettably, the maintainer of MUSIC/SP and Sim/390 is no longer active, and while binaries and documentation remain available for download via [4](http://www.canpub.com/teammpg/de/mcgweb/) the sources are not.
611625
612626## VM/370 using Hercules
613627
614628*This section is an outline only. Note that in the IBM ecosystem OS and VM are the names of specific operating systems, rather than being a generic abbreviation; in addition DOS is a '60s-era IBM operating system with no connection to Microsoft or PCs.*
615629
616630VM/370, which is freely available as the "SixPack" (currently v1.2 as of early 2013), provides a hypervisor running on the "bare metal" which can host multiple single- or multitasking operating systems such as the (provided) Conversational Monitor System (CMS) or derivatives of DOS or OS (e.g. VSE or MVS).
617631
618632The CMS interactive environment is a distant cousin to unix, and is probably usable by anybody who remembers MS-DOS or older operating systems; the "SixPack" includes extensive but not complete online help. There is no networking API exposed to user programs: code and data may be moved between the host computer (running Hercules) and guest sessions by mounting files simulating tape devices, by simulations of an 80-column card punch and reader, or by a simulation of a line printer.
619633
620634In common with other IBM operating systems of the era, the documented API is in the form of macros for an IBM-compatible assembler; other types of interface are available including diag codes for communication between CMS and VM, and virtualised hardware access using Channel Control Words (CCWs). The services provided are roughly comparable with MS-DOS v1 or CP/M, i.e. there are separate sets of macros for handling different classes of peripherals: do not expect to open the terminal, card reader or printer as a file. Particularly if the S/380 hack (see below) is applied, the GCC compiler and standard libraries may be used but most software development and maintenance is done using assembler.
621635
622636## IBM S/370, S/390, and the S/380 "hack"
623637
624638*This section is an even sketchier outline.*
625639
626640As discussed elsewhere, the S/360 and S/370 architectures are limited to 24-bit addresses while the S/390 allows 31-bit addresses without, in general, breaking compatibility. There is an unofficial extension of the Hercules emulator (frowned upon by purists) that implements a non-standard "S/380" architecture and modifies the most-recent freely-available IBM mainframe operating systems (VSE nee DOS, MVS nee OS, and VM/370) to exploit this extension. Using this, there is sufficient available memory to run a large-scale compiler such as GCC *natively* on one of the classic IBM operating systems, with the important caveats that only one program can use this facility at a time (i.e. while a 31-bit GCC and a 24-bit make should work, two copies of the 31-bit GCC won't), and that in the case of VM one program means one program per computer rather than one program per virtualised system/login.
627641
628642To make use of this, you need the Hercules-380 patch from [5](http://mvs380.sourceforge.net/), a classic operating system such as the VM/CMS "sixpack" from [6](http://vm370.31bits.net/vm370sixpack-1_2.zip), and possibly the MECAFF enhancement for additional terminal sessions and the IND\$FILE program. In practice, it is impossible to do any of this without joining Yahoo!, and subscribing to the Hercules-VM370, hercules-os380 and H390-VM groups.
629643
630644## IA-64 (Itanium, Merced, McKinley etc.)
631645
632646*Terminally sketchy.*
633647
634648The FPC port targeting IA-64 exists in absolutely minimal form, i.e. a few skeleton files and that's about it. Since the IA-64 architecture appears to be heading in the same direction as its predecessor the iAPX-432, it's highly questionable whether any more work will be done on this architecture. However, for completeness (and because this author wants to be able to inspect some Itanium binaries)...
635649
636650While a few systems turn up on eBay etc., the asking price tends to be dictated by what the seller paid a few years ago rather than by what anybody expects to pay today. There is a simulator, written by HP, called "Ski", which is now open source. See [7](http://www.gelato.unsw.edu.au/IA64wiki/SkiSimulator), [8](http://www.hpl.hp.com/research/linux/ski/download.php) plus the Sourceforge project repository.
637651
638652(On a fairly complete development system running Debian) get the most recent Ski sources from Sourceforge. Run autogen.sh, installing e.g. autoconf, libtool and libelf-dev if necessary. Run make, install additional libraries such as gperf, bison, flex etc. as necessary. It might be necessary to edit syscall-linux.c to comment out the reference to asm/page.h which apparently isn't needed for very recent (Linux 3.x) kernels. On success get root and run make install.
639653
640654Assuming the disc image is a file named /export/ia-64/sda (e.g. renamed from the downloaded sda-debian) then
641655
642-`bski bootloader vmlinux simscsi=/export/ia-64/sd`
656+```text
657+bski bootloader vmlinux simscsi=/export/ia-64/sd
658+```
643659
644660Note the dropped final letter, that parameter is used as a prefix rather than being the name of a file or directory.
645661
646662As with a number of other emulators described on this page, this requires an X session for the console.
647663
648664This writer (MarkMLl) can't get networking running, either using the instructions at [9](http://www.hpl.hp.com/research/linux/ski/HOWTO-ski-networking.php) or using a tun/tap solution very roughly as suggested by [10](http://www.gelato.unsw.edu.au/IA64wiki/SkiVirtualNetwork). It might be necessary to try a much older host kernel, i.e. late 2.4 or early 2.6, however this is not currently being pursued due to lack of relevance.
649665
650666The kernel from HP is 2.4.20, the filesystem is described as "Debian Sid" but from the kernel version is probably somewhere between "Woody" (3.0) and "Sarge" (3.1). I don't know how easy it's going to be to get this up to scratch, at the very least a working network is going to be a prerequisite.
651667
652668------------------------------------------------------------------------
653669
654670## Relative Performance
655671
656672Performance is, in general, disappointing. Using an informal "torture test" which exercises the CPU and disc access:
657673
658-`Compaq ProLiant ML530 G2, 2.8GHz, 3Gb, 8 jobs, 390W 0m12.170         79`\
674+```text
675+Compaq ProLiant ML530 G2, 2.8GHz, 3Gb, 8 jobs, 390W 0m12.170 79
659676
660-`Linksys NSLU2, 266MHz 32Mb, 1 job, 7W               6m35.014s        46`\
677+Linksys NSLU2, 266MHz 32Mb, 1 job, 7W 6m35.014s 46
661678
662-`Qemu ARM, 1 job, 390W                              42m58.925s    16,757`\
679+Qemu ARM, 1 job, 390W 42m58.925s 16,757
663680
664-`Qemu MIPS, 1 job, 390W                             17m49.103s     6,949`\
681+Qemu MIPS, 1 job, 390W 17m49.103s 6,949
665682
666-`Qemu x86, 1 job, 390W                              47m0.441s     18,330`\
683+Qemu x86, 1 job, 390W 47m0.441s 18,330
667684
668-`UML, 1 job, 390W                                    8m26.529s     3,289`\
685+UML, 1 job, 390W 8m26.529s 3,289
669686
670-`Hercules zSeries, 4 jobs, 390W                      9m43.330s     3,790`
687+Hercules zSeries, 4 jobs, 390W 9m43.330s 3,790
688+```
671689
672690The final column in the above list is the W-Mins to complete the job. These timings are without the benefit of kernel support from kqemu (obsolete) or KVM, but the fact that Qemu's support for MIPS is significantly better than that for other architectures, and the fact that the Hercules emulator is in all cases better than Qemu, does make one wonder how efficient the code is.
673691
674692Compiling FPC 2.4.2 using time make NOGDB=1 OPT='-O- -gl' all :
675693
676-`Host (x86, Linux, Debian):`\
694+```text
695+Host (x86, Linux, Debian):
677696
678-`  real    4m47.842s`\
679-`  user    3m42.126s`\
680-`  sys     0m33.506s`\
697+ real 4m47.842s
698+ user 3m42.126s
699+ sys 0m33.506s
681700
682-`Slug (32Mb, ARM, Linux, Debian):`\
701+Slug (32Mb, ARM, Linux, Debian):
683702
684-`  real    284m58.543s`\
685-`  user    86m45.570s`\
686-`  sys     20m46.500s`\
703+ real 284m58.543s
704+ user 86m45.570s
705+ sys 20m46.500s
687706
688-`Qemu (ARM, Linux, Debian):`\
707+Qemu (ARM, Linux, Debian):
689708
690-`  real    406m31.931s`\
691-`  user    236m49.030s`\
692-`  sys     148m58.110s`\
709+ real 406m31.931s
710+ user 236m49.030s
711+ sys 148m58.110s
693712
694-`Qemu (x86, Linux, Slackware):`\
713+Qemu (x86, Linux, Slackware):
695714
696-`  real    141m45.700s`\
697-`  user    122m40.724s`\
698-`  sys     17m15.670s`\
715+ real 141m45.700s
716+ user 122m40.724s
717+ sys 17m15.670s
699718
700-`Qemu (x86, Windows 2000):`\
719+Qemu (x86, Windows 2000):
701720
702-`  Elapsed 108m`\
721+ Elapsed 108m
703722
704-`UML (x86, Linux, Slackware):`\
723+UML (x86, Linux, Slackware):
705724
706-`  real    238m41.257s`\
707-`  user    45m54.460s`\
708-`  sys     3m44.140s`
725+ real 238m41.257s
726+ user 45m54.460s
727+ sys 3m44.140s
728+```
709729
710730Compiling Lazarus 0.9.30 using time make LCL_PLATFORM=gtk2 bigide :
711731
712-`Host (x86, Linux, Debian):`\
732+```text
733+Host (x86, Linux, Debian):
713734
714-`  real    2m21.072s`\
715-`  user    2m6.452s`\
716-`  sys     0m12.285s`\
735+ real 2m21.072s
736+ user 2m6.452s
737+ sys 0m12.285s
717738
718-`Slug (32Mb, ARM, Linux, Debian):`\
739+Slug (32Mb, ARM, Linux, Debian):
719740
720-`  real    9385m49.319s`\
721-`  user    67m23.460s`\
722-`  sys     430m9.870s`\
741+ real 9385m49.319s
742+ user 67m23.460s
743+ sys 430m9.870s
723744
724-`Qemu (ARM, Linux, Debian):`\
745+Qemu (ARM, Linux, Debian):
725746
726-`  real    281m55.536s`\
727-`  user    153m3.150s`\
728-`  sys     53m27.470s`\
747+ real 281m55.536s
748+ user 153m3.150s
749+ sys 53m27.470s
729750
730-`Qemu (x86, Linux, Slackware):`\
751+Qemu (x86, Linux, Slackware):
731752
732-`  real    70m53.957s`\
733-`  user    60m3.474s`\
734-`  sys     8m8.801s`\
753+ real 70m53.957s
754+ user 60m3.474s
755+ sys 8m8.801s
735756
736-`Qemu (x86, Windows 2000, default platform):`\
757+Qemu (x86, Windows 2000, default platform):
737758
738-`  Elapsed 53m`\
759+ Elapsed 53m
739760
740-`UML (x86, Linux, Slackware):`\
761+UML (x86, Linux, Slackware):
741762
742-`  real    489m40.233s`\
743-`  user    81m43.740s`\
744-`  sys     7m51.280s`
763+ real 489m40.233s
764+ user 81m43.740s
765+ sys 7m51.280s
766+```
745767
746768## Graphical Access using VNC etc.
747769
748770All of the above assumes that SSH is available so that shell (command line) sessions can be run over the network. Where necessary install e.g. the Debian ssh (or openssh, openssh-server etc.) package. It is also possible to run a program using a GUI over SSH by X forwarding, see the SSH client's -X option and the corresponding server configuration-file settings.
749771
750772There are several ways of running a program using a GUI without forwarding the X protocol over SSH:
751773
752774- Running Qemu or UML in an xterm.
753775
754776- Using Qemu's host VNC support.
755777
756778- Connecting to a Qemu (or UML etc.) guest using X.
757779
758780- Connecting to a Qemu (or UML etc.) guest using VNC.
759781
760782In all cases it is worth using a low-resource window manager such as FluxBox or xfwm rather than KDE or Gnome.
761783
762784### Running Qemu or UML in an xterm or with host VNC support
763785
764786This depends on the build options of the guest system kernel etc. In general, display resolution and depth will be limited by the emulated hardware, the network ports are associated with the host (rather than guest) system. See the Qemu documentation for details.
765787
766788### Connecting to a Qemu (or UML etc.) guest using X
767789
768790Install the Gnome Display Manager (gdm) on the guest system. This allows a desktop system to log into it using XDMCP, the desktop system determines the display resolution and depth.
769791
770792### Connecting to a Qemu (or UML etc.) guest using VNC
771793
772794This method also works well for arbitrary systems, even if Qemu etc. is not being used.
773795
774796Install gdm and RealVNC (or, with limitations, TightVNC) on the guest system; the latter might be needed for ARM guests but RealVNC is to be preferred when available. This allows a desktop system to log into it using VNC, the guest system determines the display resolution and depth and network ports are associated with the guest (rather than host) system.
775797
776798In /etc/inittab, insert something like this:
777799
778-`6:23:respawn:/sbin/getty 38400 tty6`\
800+```text
801+6:23:respawn:/sbin/getty 38400 tty6
779802
780-`# Added in lieu of trying to get it working in inetd.conf. MarkMLl.`\
803+# Added in lieu of trying to get it working in inetd.conf. MarkMLl.
781804
782-`8:23:respawn:/usr/local/vnc/vncshim-0-20`\
783-`# 9:23:respawn:/usr/local/vnc/vncshim-4-24`\
805+8:23:respawn:/usr/local/vnc/vncshim-0-20
806+# 9:23:respawn:/usr/local/vnc/vncshim-4-24
784807
785-`# Example how to put a getty on a serial line (for a terminal)`\
786-`#`\
787-`#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100`
808+# Example how to put a getty on a serial line (for a terminal)
809+#
810+#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
811+```
788812
789813Many systems limit the number of VNC servers that may be run per system (including localhost) as the side effect of a window manager XDMCP security precaution. If necessary, edit the window manager configuration file (gdm.conf, kdmrc etc.) to increase the number of sessions that each XDMCP client can request, e.g. in the case of gdm.conf:
790814
791-`[xdmcp]`\
792-`Enable=true`\
793-`DisplaysPerHost=6`
815+```text
816+[xdmcp]
817+Enable=true
818+DisplaysPerHost=6
819+```
794820
795821Create /usr/local/vnc/vncshim-0-20 to read:
796822
797823``` bash
798824#!/bin/bash
799825
800826# This forms a shim between /etc/inittab and the VNC server, necessitated by
801827# the facts that (a) I can't get this command working reliably in inetd.conf
802828# and (b) lines in initab have restricted length.
803829#
804830# Note that the name of the file reflects the fact that it might request non-
805831# standard combinations of VNC port and X display number. MarkMLl.
806832
807833# My preference is to select default linear dimensions that appear somewhere
808834# in the list of conventional graphics modes. 1200x960 fits inside a 1280x1024
809835# screen, even allowing that the title bar etc. will take additional space.
810836
811837SIZE=1200x960
812838
813839# The DPI setting can usefully be set to match the user's normal screen, leave
814840# undefined (commented out) if in doubt.
815841
816842DPI='-dpi 96'
817843
818844# Each VNC server running on a host must have a distinct suffix to prevent port
819845# and display number clashes.
820846
821847SUFFIX=0
822848
823849# Some option formats vary between RealVNC (top) and TightVNC (bottom).
824850
825851OPTIONS='DisconnectClients=0 -NeverShared'
826852# OPTIONS='-dontdisconnect -nevershared'
827853
828854####################### CHANGE NOTHING BELOW HERE ###########################
829855
830856VNCPORT=570$SUFFIX
831857XDISPLAY=:2$SUFFIX
832858
833859# Try to work out what this system is. Note particular care to allow spaces
834860# in the desktop name.
835861
836862WHATAMI=`dirname $0`/whatami
837863if [ -x $WHATAMI ]; then
838864 WHATAMI2=`$WHATAMI`
839865else
840866 if [ -r $WHATAMI ]; then
841867 WHATAMI2=`cat $WHATAMI`
842868 else
843869 WHATAMI2=$$
844870 fi
845871fi
846872DESKTOP='-desktop '\'$WHATAMI2\'
847873
848874# Optional Java viewer.
849875
850876if [ -r `dirname $0`/classes/index.vnc ]; then
851877 JAVA="-httpd `dirname $0`/classes -httpPort 580$SUFFIX"
852878fi
853879
854880# This is the only way I can get it working the way I want, i.e. with reliable
855881# handling of spaces in the desktop name. I'm hardly proud of it.
856882
857883rm -f `dirname $0`/.vncshim-$SUFFIX-1$SUFFIX
858884
859885cat >`dirname $0`/.vncshim-$SUFFIX-1$SUFFIX <<EOT
860886#!/bin/sh
861887exec /usr/bin/Xvnc -geometry $SIZE $DPI -depth 16 $DESKTOP \
862888 -rfbport $VNCPORT -rfbauth /root/.vnc/passwd-$SUFFIX $JAVA \
863889 $OPTIONS -query localhost -once $XDISPLAY
864890EOT
865891
866892chmod +x `dirname $0`/.vncshim-$SUFFIX-1$SUFFIX
867893exec `dirname $0`/.vncshim-$SUFFIX-1$SUFFIX
868894```
869895
870896Create /usr/local/vnc/whatami to read:
871897
872898``` bash
873899#!/bin/bash
874900
875901echo -n "`hostname`, "
876902_WHATAMI=`uname -m`
877903if [[ $_WHATAMI == i?86 ]]; then
878904 _WHATAMI='i586'
879905fi
880906if [[ $_WHATAMI == arm* ]]; then
881907 _WHATAMI='arm'
882908fi
883909
884910if [ -x `dirname $0`/whatami-$_WHATAMI ]; then
885911 `dirname $0`/whatami-$_WHATAMI
886912else
887913 uname -m
888914fi
889915```
890916
891917Additional scripts e.g. whatami-arm can query /proc/cpuinfo, which is different for each architecture. Make sure that all scripts are set +x for root.
892918
893919Use vncpasswd to set up password files /root/.vnc/passwd-0 etc.
894920
895921So far, I find that RealVNC works fine when invoked as above, but TightVNC doesn't correctly invoke the display manager.
896922
897923## Accessing "Unusual" Devices
898924
899925This section covers devices such as audio (i.e. used for playing .wav files) and MIDI, and USB devices which are not claimed by the host or guest kernel.
900926
901927### Sound/MIDI for Qemu
902928
903929Don't expect this to be hi-fi quality, but it should be adequate for operator alerts etc.
904930
905931#### Identifying the Host's Hardware
906932
907933Obviously, a good starting point for this is using lspci and lsusb to determine what physical hardware is installed. The next stage is usually to consult dmesg output and to use lsmod to determine what subsystems the kernel has loaded hence what APIs are available. Graphical tools such as the KDE Info Centre can also be useful here, however identifying which API is most useful can be a bit of a black art.
908934
909935The current writer (MarkMLl) has a Debian "Squeeze" host with USB-connected audio and MIDI devices, with the latter connected to a Yamaha tone generator. An alternative (and more conventional) configuration would be to have an internal soundcard, with both audio and MIDI output feeding a loudspeaker.
910936
911937Knowing what hardware and subsystems are available, the remaining question is which subsystems Qemu can make use of. Running this command goes some way towards providing an answer:
912938
913-`$ qemu -audio-help |grep ^Name:`\
914-`Name: alsa`\
915-`Name: oss`\
916-`Name: sdl`\
917-`Name: esd`\
918-`Name: pa`\
919-`Name: none`\
920-`Name: wav`
939+```text
940+$ qemu -audio-help |grep ^Name:
941+Name: alsa
942+Name: oss
943+Name: sdl
944+Name: esd
945+Name: pa
946+Name: none
947+Name: wav
948+```
921949
922950For reasons that are unclear *(roughly translated: I'd like some help here)* I've had most success with OSS, starting Qemu with a script that includes these lines:
923951
924952``` bash
925953export QEMU_AUDIO_DRV=oss
926954export QEMU_OSS_DAC_DEV=/dev/dsp1
927955export QEMU_OSS_ADC_DEV=/dev/dsp1
928956```
929957
930958#### Selecting the Guest's Soundcard
931959
932960Assuming that the guest is to have both audio and MIDI, common sense would suggest that the guest operating system should see both audio and MIDI hardware implemented by Qemu. According to <http://rubenerd.com/qemu-ad-lib-midi-win-31/>, this implies that Qemu should be recompiled with the capability of emulating an Adlib card, which for current versions of Qemu means running something like this:
933961
934962``` bash
935963make clean distclean
936964./configure --audio-card-list=ac97,es1370,sb16,adlib
937965make
938966```
939967
940968Irrespective of whether a custom Qemu is built or not, it's useful to check what devices it emulates:
941969
942970``` bash
943971$ qemu -soundhw ?
944972Valid sound card names (comma separated):
945973pcspk PC speaker
946974sb16 Creative Sound Blaster 16
947975ac97 Intel 82801AA AC97 Audio
948976es1370 ENSONIQ AudioPCI ES1370
949977```
950978
951979For some guest operating systems (e.g. Windows NT 4), adding Adlib emulation to Qemu is sufficient to get MIDI working with the Sound Blaster, i.e.
952980
953981``` bash
954982$ qemu ... -soundhw sb16,adlib ...
955983```
956984
957985In this case the guest uses only the standard Sound Blaster driver, possibly ignoring MPU-401 support.
958986
959987For guest systems which don't benefit from this, there's little point adding something like an Adlib card if the guest operating system doesn't have a driver for it- which appears to be the case with Windows 2000. The current writer's preference is to select the ES13770, since as a straightforward PCI device it should be enumerated without difficulty by almost any guest operating system:
960988
961989``` bash
962990$ qemu ... -soundhw es1370 ...
963991```
964992
965993Having started Qemu, it's possible to query the emulated devices:
966994
967-`(qemu) info pci`\
968-`...`\
969-`  Bus  0, device   4, function 0:`\
970-`    Audio controller: PCI device 1274:5000`\
971-`      IRQ 11.`\
972-`      BAR0: I/O at 0xc200 [0xc2ff].`\
973-`      id ""`
995+``` pascal
996+(qemu) info pci
997+...
998+ Bus 0, device 4, function 0:
999+ Audio controller: PCI device 1274:5000
1000+ IRQ 11.
1001+ BAR0: I/O at 0xc200 [0xc2ff].
1002+ id ""
1003+```
9741004
9751005The expected result of this is that the guest operating system would see audio hardware, but not MIDI. However in the case of Windows 2000 a MIDI device is emulated, so programs which use MIDI for e.g. operator alerts will work properly.
9761006
9771007*Anybody: need help here generalising this to other guest operating systems.*
9781008
9791009### USB for Qemu
9801010
9811011As an example, a Velleman K8055 board is plugged into the host. First use lsusb to gets its vid:pid identifiers:
9821012
9831013``` bash
9841014$ lsusb
9851015Bus 001 Device 005: ID 10cf:5500 Velleman Components, Inc. 8055 Experiment Interface Board (address=0)
9861016```
9871017
9881018Now add these parameters to the Qemu command line:
9891019
9901020``` bash
9911021qemu ... -usb -usbdevice host:10cf:5500 ...
9921022```
9931023
9941024On the guest, lsusb should show the device available for use.
9951025
9961026The Velleman board is unusual in that it has ID jumpers which set the last digit, i.e. multiple devices appear as 10cf:5500 through 10cf:5503. In cases where this facility is not available, the bus and device number can be used:
9971027
9981028``` bash
9991029qemu ... -usb -usbdevice host:1.5 ...
10001030```
10011031
10021032Obviously, there's a risk here that devices will move around between invocations.
10031033
10041034### USB for UML
10051035
10061036There was supposedly a patch that mapped unused USB devices on the host into the guest. I'm not sure it made it into the standard release.
10071037
10081038## QEMU User Emulation Mode in Chrooted Environment
10091039
10101040In previous chapters QEMU's full system emulation mode was described: a complete guest system is emulated including bios and hardware. Although this approaches a real environment as close as possible, the overhead created by emulating a complete system is considerable. QEMU's user emulation mode allows to run "guest" code directly on the "host" system. The cpu is still emulated but system calls are translated into system calls on the host system. Libraries used by the "guest" code are the "guest" libraries, not the host libraries. To run a small program created for fe. ARM with no dependencies you can simply do a
10111041
1012-`$ qemu-arm program`
1042+``` pascal
1043+$ qemu-arm program
1044+```
10131045
10141046When the program has more and more dependencies, it becomes increasingly difficult to put all dependencies in locations that can be found by qemu-arm without messing up your host system. The solution that will be developed here is to create a chroot environment on the host in which all code is "guest" code. Advantage of this solution:
10151047
10161048- the chroot isolates the guest from the host
10171049- no need for vnc, ssh or any other solution to export screens.
10181050- no booting of a guest OS system.
10191051- guest "immersion" for user programs is almost complete. Only very low level and hardware related programming will notice the difference.
10201052- a spectacular speed improvement for graphics (X) related tasks (running lazarus f.e.)
10211053- hard disk resources are common to host and guest. Host can read and modify "guest" files but not the other way around.
10221054
10231055Setting up the system.
10241056
10251057For a better comprehension of what follows, here is the directory structure used in this how-to:
10261058
1027-`home`\
1028-` qemu`\
1029-`   arm-linux-user`\
1030-`   sparc-linux-user`\
1031-`   scripts `\
1032-`   disks       // here are qemu images for the different systems emulated`\
1033-`   chroot`\
1034-`       mount   `\
1035-`       arm // here we'll chroot the arm environment`\
1036-`       sparc   `
1059+```text
1060+home
1061+ qemu
1062+ arm-linux-user
1063+ sparc-linux-user
1064+ scripts
1065+ disks // here are qemu images for the different systems emulated
1066+ chroot
1067+ mount
1068+ arm // here we'll chroot the arm environment
1069+ sparc
1070+```
10371071
10381072Get and build the latest qemu
10391073
10401074``` bash
10411075$ cd
10421076$ git clone git://git.savannah.nongnu.org/qemu.git qemu
10431077$ cd qemu
10441078```
10451079
10461080Build all emulations (full system and user emulation mode, all processors)
10471081
10481082``` bash
10491083$ ./configure --static to build
10501084```
10511085
10521086or only the user emulations needed
10531087
10541088``` bash
10551089$ ./configure --static --target-list=sparc-linux-user,arm-linux-user
10561090
10571091$ make clean all
10581092```
10591093
10601094The --static option makes that qemu-arm and qemu-sparc are linked statically. Since they will be running in the chroot environment later on, they must be build without dependencies. Some distributions provide already statically linked binaries. fe qemu-arm-static on debian. Although they are not the latest and greatest, using these packages makes it somewhat easier. Building QEMU from source is really just a matter of minutes.
10611095
10621096Now we need to copy the complete guest system into chroot/arm or chroot/sparc. There are several ways of doing this but when you don't have a real arm or sparc system at hand, using a QEMU image of a full system emulation as described in previous chapters is the easiest.
10631097
10641098Mount the QEMU image.
10651099
10661100WARNING: do not mount a qemu image when the associated guest is running!
10671101
10681102Only raw QEMU images can be mounted as a loop-back device. If you have a qcow formatted image, convert it to a raw image.
10691103
10701104``` bash
10711105$ qemu-img convert disks/armel_hda.img -O raw disks/armel_hda.raw
10721106
10731107$ cd chroot
10741108$ su
10751109# mount ../disks/armel_hda.raw mount -o loop,offset=32256
10761110```
10771111
10781112The offset is the start of the first partition on the ARM disk when the default disk layout was used during installation. If mount fails then the offset is probably wrong. To calculate the offset:
10791113
10801114``` bash
10811115# fdisk -lu ../disks/armel_hda.raw
10821116```
10831117
10841118Find the first sector of the partition that will be mounted as root. Calculate offset as (start sector number * 512). For the default SPARC debian etch installation using a sun partition table with a /boot first partition the offset is 98703360.
10851119
10861120Check if the correct partition is mounted:
10871121
10881122``` bash
10891123# ls mount
10901124```
10911125
10921126Copy the complete system
10931127
10941128``` bash
10951129# cp -r mount/* arm/
10961130# umount mount
10971131```
10981132
10991133Copy the QEMU arm emulator to the arm directory
11001134
11011135``` bash
11021136# cd arm
11031137# cp ../../arm-linux-user/qemu-arm usr/local/bin
11041138```
11051139
11061140Our "guest" system is complete. Since we are sharing our "host" devices and system, we need to mount a few special directories:
11071141
11081142``` bash
11091143# mount --bind /proc proc
11101144# mount --bind /dev dev
11111145# mount --bind /sys sys
11121146# mount --bind /tmp tmp
11131147```
11141148
11151149Why /tmp? The /tmp directory is used by the X window system. When you don't mount tmp on the host /tmp, you will get "can't open display 0:0" errors when trying to open a window in the guest.
11161150
11171151We are going to use the host network:
11181152
11191153``` bash
11201154# sudo cp /etc/resolv.conf etc
11211155```
11221156
11231157Remains one last thing: the emulator is copied into the guest but how do we tell the system that the emulator needs to kick in when a "quest" elf is detected? This is done with binfmt_misc. A configuration script is included with QEMU that registers the QEMU user mode emulators with binfmt_misc: (on my system I had to do a chmod +x on the script)
11241158
11251159``` bash
11261160# ../../scripts/qemu-binfmt-conf.sh
11271161```
11281162
11291163When you look at this script at the end of the binary data you'll notice that the emulator is registered as /usr/local/bin/qemu-arm. And that is where we put it a few lines ago.
11301164
11311165Launch the system:
11321166
11331167``` bash
11341168# chroot .
11351169```
11361170
11371171If all goes well:
11381172
11391173``` bash
11401174# uname -m
11411175armv7l
11421176```
11431177
11441178Everything you do from here is in your "guest" system. To exit the "guest" system.
11451179
11461180``` bash
11471181# exit
11481182```
11491183
11501184And unmount the special directories.
11511185
11521186``` bash
11531187# umount proc
11541188# umount dev
11551189# umount sys
11561190# umount tmp
11571191```
11581192
11591193Conclusion.
11601194
11611195The ARM emulation works very well, except for gdb. On the contrary there are still quite some problems with the SPARC emulation. There is a bug in duplicating pipes which makes the use of bash impossible. The sh shell works but several unix commands don't function correctly. What works fine is fpc and lazarus! Programs can't be launched from inside lazarus. Because of the improved graphics speed when using the user emulation mode it is still worthwhile for using lazarus. Instead of starting a shell in chroot, you start directly lazarus:
11621196
11631197``` bash
11641198$ sudo chroot . /your/lazarus/dir/lazarus
11651199```
11661200
11671201To run the program compiled in lazarus, you can launch it from another "host" terminal:
11681202
11691203``` bash
11701204$ cd qemu/chroot/arm
11711205$ sudo chroot . /your/program/dir/project
11721206```
11731207
11741208Here also gdb is not working.
11751209
11761210## Docker images
11771211
11781212Docker uses various APIs provided by the underlying operating system to isolate programs in separate namespaces.
11791213
11801214The implication of this is that every Docker container has its own process space (i.e. processes in different containers might have the same numeric PID), network space (processes in different containers can have different routing, firewall rules and so on), filesystems (except that they share kernel files and a number of crucial libraries and configuration files) and so on.
11811215
11821216Containerisation is distinct from virtualisation in that all containers which are running on the same host computer make use of the same host kernel, it is not possible for one container to use a different kernel (e.g. for development or deployment test purposes), and there is no absolute guarantee that a container taken over by malicious code cannot subvert the remainder of the system.
11831217
11841218***Note that there are pitfalls for the unwary. For example, having Docker installed and the Docker daemon running can break Qemu networking if this expects to have bridged access to the host interface rather than to be sitting on its own private subnet.***
11851219
11861220One thing that does work however, is running a 32-bit container on a 64-bit host, and in most cases the Linux kernel APIs are sufficiently backwards-compatible that the programs and libraries from an older release of a distro can run on a much more recent host. One of the cases which will be discussed here runs a container containing 32-bit Debian "Lenny" from 2008 on a host running Debian "Buster" from 2019, this combination allows e.g. compatibility with the GTK v1 widget set (no longer supported by more recent distreaux) to be tested.
11871221
11881222### Docker fundamentals
11891223
11901224This is not the place for a full discussion of the care and feeding of Docker, but it's worth establishing a few basic concepts.
11911225
11921226- Host: the physical computer running e.g. Qemu (with or without KVM) or Docker.
11931227
11941228- Guest: on a virtualised system (Qemu etc.), a completely separate memory space with its own kernel.
11951229
11961230- Container: on a Docker based system, a group of application programs sharing the host kernel but largely isolated from the rest of the host system using various namespace mechanisms.
11971231
11981232Looking specifically at Docker:
11991233
12001234- Dockerfile: a succinct description of what is to go into a Docker image.
12011235
12021236- Image: the Docker analogue of a bootable filesystem, initially built with reference to a Dockerfile.
12031237
12041238- Container: an image which has been run, whether or not it is currently running.
12051239
12061240Once running, a container has an associated parameter list which specifies the main program together with any sockets etc. exposed to the host. Neither an image nor a container correspond to a single file on the host, but:
12071241
12081242- A container may be stopped and committed to an image.
12091243
12101244- An image may be saved to a single file, in which state it can be moved between hosts.
12111245
12121246- An image may be run a set of parameters different from those of the container committed to it.
12131247
12141248The result of this is that if something is installed in the context of a container (e.g. Apache is added from the operating system's main repository) the container should be stopped, committed to a new image and then run with an additional parameter specifying what sockets etc. should be exposed. There are ways around that, but that combination appears to be the easiest to manage.
12151249
12161250The Docker community has a master repository, and the docker program on a host computer may search it to locate images. However in the context of those images there appears to be no "official" way of searching the tags that allow a specific version to be pulled, hence something "messy" and subject to change like
12171251
12181252 $ docker search debian
12191253
12201254 $ wget -q https://registry.hub.docker.com/v1/repositories/debian/tags -O - \
12211255 | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}' | grep buster
12221256
12231257 $ docker pull debian:buster
12241258
12251259or alternatively (for the really hard to reach bits)
12261260
12271261 $ docker search vicamo
12281262
12291263 $ wget -q https://registry.hub.docker.com/v1/repositories/vicamo/debian/tags -O - \
12301264 | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}'
12311265
12321266 ...
12331267 buster-i386
12341268 buster-i386-sbuild
12351269 buster-i386-slim
12361270 ...
12371271
12381272 $ docker pull vicamo/debian:buster-i386-slim
12391273
12401274Generally speaking, if a developer on e.g. Github says that he has a special-purpose image, some combination of the above commands will allow the required version (e.g. in the above example tagged buster-i386-slim) to be pulled.
12411275
12421276Neither a container nor an image is directly mountable e.g. by using losetup. It is possible to copy files to or from a container using the `docker container cp` command, subject to the same precautions that one would take on a running unix system.
12431277
12441278### A 64-bit Docker container with basic utilities
12451279
12461280This is a basic installation of a 64-bit Debian stable release ("Buster" at the time of writing) on the same host version. This is useful in a situation where a developer wants to experiment with libraries etc. that he does not normally have installed, it should probably not be trusted to quarantine untrusted code.
12471281
12481282In the instructions below, commands on the host are run in the context of a normal user so are shown prefixed by a \$ prompt, while commands run in the context of the container are run by root so shown prefixed by a \# prompt.
12491283
12501284 $ docker pull debian:buster
12511285
12521286 $ docker run --interactive --tty debian:buster
12531287
12541288 # apt-get update
12551289
12561290 # apt-get install dialog tasksel python3
12571291
12581292 # tasksel --new-install
12591293
12601294 # dpkg-reconfigure locales
12611295
12621296Using tasksel, remove desktop and print server and add SSH. The author favours installing net-tools so that the `netstat -an` command can be used to check socket accessibility.
12631297
12641298 # apt-get install net-tools elvis-tiny
12651299
12661300So far there is no provision for starting the SSH daemon. Add or edit /etc/rc.local to contain
12671301
12681302 #!/bin/sh
12691303
12701304 rm -rf /tmp/*
12711305
12721306 # For cases where a 32-bit container is running (by implication on a 64-bit host), make
12731307 # sure that commands such as uname -a return consistent information to avoid breaking
12741308 # the traditional ./configure && make operation.
12751309
12761310 (file -L /bin/sh | grep -q 'ELF 32-bit LSB')
12771311 if [ $? -eq 0 ] ; then
12781312 LINUX32=linux32
12791313 fi
12801314
12811315 cd /etc/init.d
12821316 $LINUX32 ./ssh start
12831317 # $LINUX32 ./openbsd-inetd start
12841318
12851319 cd
12861320 exec $LINUX32 /bin/bash
12871321
12881322The ID of the current container is in the prompt. Exit it and commit to a new image, then start with a parameter to expose the SSH socket:
12891323
12901324 # exit
12911325
12921326 $ docker container commit 4efab4804fb6 debian_minimal
12931327
12941328 $ docker run -it -p 65022:22 \
12951329 --entrypoint=/etc/rc.local debian_minimal
12961330
12971331 # groupadd -g 1000 markMLl
12981332
12991333 # useradd -g markMLl -u 1000 -m -d /home/markMLl markMLl
13001334
13011335 # passwd markMLl
13021336
13031337Add newly created user name to sudo group (/etc/group and /etc/gshadow files). Note the container ID, if it is now stopped the parameters are preserved and it should be possible to start it in the background and connect as the above user via SSH.
13041338
13051339 $ docker container stop c5be7fd96866
13061340
13071341 $ docker container start c5be7fd96866
13081342
13091343 $ ssh localhost -p 65022
13101344
13111345The above is a good starting point for a general-purpose containerised system. The section below will also show how to get a graphical program (e.g. the Lazarus IDE) running in a container.
13121346
13131347### A 32-bit Docker container with FPC and Lazarus
13141348
13151349An understanding of the principles and commands described above is a prerequisite to continuing with this section.
13161350
13171351Unlike Qemu, a container will run at the host computer's full speed. Unlike User Mode Linux (UML), a 32-bit container will run on a 64-bit host. Subject to security issues, this makes Docker the preferred choice when setting up a temporary 32-bit environment to e.g. investigate libraries which would not normally be installed on the host.
13181352
13191353This section discusses installing a 32-bit Debian "Lenny" container, which allows a program to be checked with libraries etc. dating from roughly 2008.
13201354
13211355Referring to <https://github.com/lpenz/docker-debian-releases/>
13221356
13231357 $ docker pull lpenz/debian-lenny-i386
13241358
13251359 $ docker image ls
13261360
13271361 $ docker run --interactive --tty lpenz/debian-lenny-i386
13281362
13291363Lenny authentication is broken and is not going to be fixed (short of forking the entire repository). In /etc/apt/apt.conf put
13301364
13311365 APT
13321366 {
13331367 // Options for apt-get
13341368 Get
13351369 {
13361370 AllowUnauthenticated "true";
13371371 }
13381372 }
13391373
13401374which should allow tasksel etc. to work. Add contrib and non-free to /etc/apt/sources.list, then
13411375
13421376 # apt-get update
13431377
13441378 # apt-get upgrade
13451379
13461380 # tasksel --new-install
13471381
13481382 # dpkg-reconfigure locales
13491383
13501384 # apt-get install openssh-server sudo
13511385
13521386Populate /etc/rc.local as discussed above, comment out the temporary setting from /etc/apt/apt.conf
13531387
13541388Create group and user as discussed above, add user to sudo group.
13551389
13561390Add the build-essential, gdb, subversion and zip packages as basic prequisites. Add libncurses5-dev, libncursesw5-dev and libgpm-dev to allow FPC to be rebuilt, plus possibly libpango1.0-dev for the FP IDE. Install FPC v2.2.4 binary for i386 and corresponding sources, the compiler should run and be able to recompile itself.
13571391
13581392Install the libgtk1.2-dev package then Lazarus 0.9.24.1, don't attempt to run it yet. In the per-user shell startup file e.g. ~/.bashrc put the line
13591393
1360-`export DISPLAY=:0`
1394+```text
1395+export DISPLAY=:0
1396+```
13611397
13621398then exit and commit the container as described above and restart with something like
13631399
1364-`$ docker run -it -p 65022:22 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \`\
1365-`       --entrypoint=/etc/rc.local lenny_with_lazarus`
1400+```text
1401+$ docker run -it -p 65022:22 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \
1402+ --entrypoint=/etc/rc.local lenny_with_lazarus
1403+```
13661404
13671405Again, details as discussed in the section above.
13681406
13691407It should now be possible to login to the container from the host over SSH, invoke e.g. /usr/local/share/lazarus/lazarus by name, and have the IDE appear on the host computer's screen.
13701408
13711409## Further Reading
13721410
13731411- [Debian on an emulated ARM machine](http://www.aurel32.net/info/debian_arm_qemu.php)
13741412- [Debian 11 on an emulated ARM/ARM64 machine](https://forum.lazarus.freepascal.org/index.php/topic,56098.msg420159.html#msg420159)
13751413- [Debian on an emulated MIPS(EL) machine](http://www.aurel32.net/info/debian_mips_qemu.php)
13761414- [QEMU/Windows XP on Wikibooks](http://en.wikibooks.org/wiki/QEMU/Windows_XP)
13771415- [The User-mode Linux Kernel Home Page](http://user-mode-linux.sourceforge.net/)
13781416- [Installing Debian under Hercules](http://www.josefsipek.net/docs/s390-linux/hercules-s390.html)
13791417
13801418## See also
13811419
13821420- [[Native ARM Systems]]
13831421- [[Native MIPS Systems]]
13841422- [[Small Virtual Machines]]
13851423- [[Docker Containerization]]
13861424
13871425---
13881426*From the Free Pascal wiki, page "Qemu and other emulators", as it stood on 2022-08-16 after a change by Skalogryz, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
13891427Category: Docker
13901428Category: Emulators

Back to history