-   Linux - Virtualization and Cloud (
-   -   QEMU / DosEMU inside OpenVZ container (

kirtimaan_bkn 11-09-2010 12:03 AM

QEMU / DosEMU inside OpenVZ container

I am trying to run QEMU + FreeDOS /DosEMU inside a OpenVZ container. While its not a wise idea to run a VM inside another VM, currently I have no other option as I need to check some old dos application (clipper/blinker) based.

This OpenVZ container is running Cent OS 5.4 32 bit and got 512 MB RAM. I tried dosemu but that doesn't work. Because it require change in mmap_min_addr in /proc/sys/vm/mmap_min_addr. But OpenVZ is preventing me to make this change, saying Operation not permitted (even when I am logged in as root).

Therefore I tried QEMU. First it also asked to load some kernel module (kqemu) but after spending some time over Google and reading docs, I finally found a flag to disable kqemu (as again OpenVZ prevents to load kernel modules inside containers).

Currently my command is like :

qemu -nographic -no-kqemu -hda c.hd -cdrom fdbasecd.iso -boot d
This gives no error/warning, but all I get is (qemu) in shell and then no response. I had to login via other shell to kill qemu process to get on shell prompt back. If I am missing anything?

I have seen forum posts from user saying that they are running QEMU inside OpenVZ to run windows application. So it should be possible. Any clue ? Also if you can suggest any alternate (like how to get dosemu working in OpenVZ container), that will be also fine. All I want to do is running that MS Dos application on server for few days.


paulsm4 11-09-2010 07:01 PM

Is it possible to run DOSBox under your virtual OS? Under your host OS?

kirtimaan_bkn 11-09-2010 10:59 PM


Originally Posted by paulsm4 (Post 4154134)
Is it possible to run DOSBox under your virtual OS? Under your host OS?

I don't have access to host OS. If I would have that, then first thing I was going to try was changing mmpa_min_addr parameter to get dosemu. But unfortunately its a cheap VPS server and it gave access to OpenVZ container only.

Dosbox requires SDL and X display. But this server got only console. One possible way I can think of is installing TWM or any other light weight window manager and then accessing that over VNC. Then running dosbox under that. In theory, seems a working solution, but haven't tried this way yet. Also I am not sure if its possible to use xfce/twm over VNC directly (means starting X and using VNC client to connect that).

Yesterday I managed to get qemu over vnc though. I started QEMU using following command:


qemu -no-kqemu -hda myfreedos.img -vnc :1 &
then used a VNC client to connect to QEMU instance and was able to run without any problem. Though its not a secure way. As while QEMU is running this way, any one can access over VNC without requiring any password. So I am not leaning towards this solution.

Sounds interesting challenge :)

All times are GMT -5. The time now is 04:38 AM.