I’m no expert in Virtual Machining but have tried to understand and follow the Wiki on Mikrotik and Xen, setting up on a test 386 machine, as I can certainly comprehend its potential uses.
You have the main memory at 128mb, but your /system resource print is showing 345mb. Have you rebooted the box since applying the “set memory-for-main” parameter? If not, you need to such that the main MT can allocate the 128mb leaving the rest for your VM - otherwise the VM can’t allocate enough RAM to start. Also assuming this is the problem, you having 345mb (?) of RAM would not be sufficient for your 128mb system + 256mb VM.
Checking on mine, I have the 128mb system memory set and my /system resource print shows exactly 128mb assigned.
Thanks Rich, but there’s still something wrong. Even when I set main memory to 128MiB system resource still reports the full amount after a reboot - see below.
Xen is certainly running - it handles the boot process and reports that it starts RouterOS as dom0. It even creates the virtual interface to domU but can’t start it. Something’s wrong or missing but I’ve no clue what it is.
[admin@Elaine] /xen print
Flags: X - disabled, C - configuration-changed
Hmmm… this does seem a little odd. How much RAM does the machine have anyway? I’m a bit suspect that your “main” MT is still showing over 300mb of memory when you’ve set the limit at 128mb. When I first started playing with Xen I had a number of very similar issues - ie: VM fails to start, but log shows nothing helpful. The fix for me was to set the memory limit for main so that there’s enough free memory to allocate to my Xen VM - but you’ve done that anyway.
I know this sounds a bit odd, but try setting the memory-for-main to another value, then back to 128mb and then reboot. I’ve had a couple of bizzar instances now where a setting hasn’t taken effect, and then if I remove and re-apply the same config, it magically works!
FWIW, here’s my config incase it helps. I personally can’t see anything majorly different that is causing yours to fail - maybe the console port? Anyway, my MT PC has 512mb RAM total, my 1 VM has 256mb allocated, two virtual HDD images, and is based on the centos image from the MT Wiki pages.
How do you get Xen to log itself? I’ve tried Xen> debug but if it does anything I’ve no idea where to find it.
I guess that, like many of the ‘innovative’ Mikrotik developments. I’ll have to put it on the back-burner for a couple of years until they get around to writing a manual entry for it.
IMO, you did everything right, tombrdfrd66, but there’s a problem with memory-for-main xen parameter in RouterOS versions 3.23 and 3.24 - seems like it’s simply ignored.
I was using centos xen image with 3.22 and noticed it didn’t work any more after upgrade to 3.23 (failed-to-setup-vm status). It was reporting full physical memory size for main and ignored any setting I entered for memory limit in xen parameters - and the same thing happens with 3.24, too. After downgrade back to 3.22, everything is back to normal.
So it’s either waiting for a fix from MT or back to good ole 3.22… that is, if you need xen.
Thanks for posting that hush. I was about to upgrade my 3.22 Xen machines I think I’ll hold off for now.
Whilst Xen is very useful (particularly if you’re trying to save on datacentre hosting fees), it is still a bit buggy, and I believe MT are openly stating that Xen is in an “alpha” status right now.
For example, I’m currently facing an issue where all my Xen enabled machines are kernel panic’ing every 9 or so days requiring a power cycle to recover. Removing the Xen package has resolved the panic’s. I have an open case with support, but just be warned that it is not really production stability right now.
I dropped back to v3.16 and had no problem getting CentOS to work under Xen, but I banged my head for two hours trying to get the virtual ethernet link up before finding your fix and, bingo, all up and running.
I suppose if it was easy anyone could do it, so we’d all be out of a job!!!
For other dumbos like I, the Xenised CentOS 5 on offer from MT via the Wiki installs with an IPtables firewall in place which blocks practically everything, which is why it took me many happy hours of headbanging to discover why I couldn’t connect to Webmin having installed it.
Well, seems like 3.25 was a dud… let’s just hope the “memory-for-main” problem gets addressed in 3.26.
While at it, it would be nice to have some faster way of creating empty disk images for xen. As it is, it took me almost an hour to create a measly 5GB image using “Make RouterOS image” option, just to delete its contents right away under Xen/CentOS so I can use it as a SMB share…
Again, I’m sorry but Mikrotik why do these issues break when they used to work? If Xen ran but crash or something I’d understand, it’s experimental, but something stupid like main-memory not even being acknowledged by RouterOS seems more like a RouterOS issue, not Xen.
If there’s anything I’d like more to see from RouterOS it’s not so much features as just a damn stable and high level of Quality Assurance put into each and every RouterOS version (starting with 3.26 )