how enable container on CHR\x86?

i post my experience…

i have a chr on ionos cloud.
i’m able to enable container successful with
/system/device-mode/update container=yes

then on console ionos (i think use vmware)
i shutdown VM ,
when ask me software or hardware i click on hardware shutdown

then start VM
now container is enabled

/system/device-mode/print 
mode: enterprise
container: yes

:slight_smile:

On AWS, after install container:

  1. Stop EC2 (wait until it’s stopped).

  2. Using AWS CLI (one after the other):
    aws ec2 start-instances --instance-ids i-???
    aws ec2 stop-instances --force --instance-ids i-???

  • On console in Instance state, it will be showing Stopping.
  1. Connect to CHR using your favorite client, to enable the container:
    /system/device-mode/update container=yes

The instance will shutdown between 3 and 4 minutes. Wait.

  1. Start EC2, the log will appear:
    router was rebooted without proper shutdown
  • The container will be enabled.

I just love the idea. AWS first sends the ACPI shutdown, and in few minutes, if the instance is still up will cold-stop it. And idea presumably is to make the machine “swallow” ACPI command sending that immediately after start.

Unfortunately, I couldn’t replicate this on my setup. And I’m doing that just a month later so I doubt AWS changed something.

I was testing on t2.micro. Used the AWS CloudShell to minimize the lag. I also tried to add arbitrary sleeps between start and stop, tried with and without “–force” – it just shows “Stopping” for 5-10 seconds and stops, without giving me a chance to input anything to terminal.

edv4ld0, could you share more detail how you did that?

Hi,

i’m also using VMware Player V15 … It’s not possible to activate the Container .

I tried at hetzner, that CHR is working with containers, but the vmware locally not

i tried V7.6 and the 7.7 beta 4.

for me the power off or reset is not working

any ideas ?

Christian

I have just spent a few hours trying on a CHR hosted with XCP-ng and I see no way to get this to activate. I can even see if they for chr did this in the licence management and done as a Lic update.

Regardless this needs to be added to winbox or a way for this to be authorized as there is no console for me when off because the system is off and their for is no console.

Hi,

funny I facing same problem on my RB4011iGS+5HacQ2HnD device. After executing “system device-mode update container=yes” command I did power on-off cycle with 5min, counting down on Terminal.

After trying to create new docker, Error pops out saying “Couldnt add Container - not allowed by device-mode(6)”
I tried to install docker on internal flash (>900MiB free).

Model:RB4011iGS+5HacQ2HnD
Firmware type: al2
Factory Firmware: 6.45.9
Current Firmware: 7.6
Upgrade Firmware: 7.6

Any thoughts what could be wrong?

Thanks, Rok

On such a device you should just press the RESET button.

Well that the other thing :grinning_face: push button is broken, accident happened :grinning_face:
User manual says either power cycle or reset button.
Do you think reset button is more likely to work than power cycle. If so i could replace it, if that is the only way …

Maybe… at least when I wanted to set the device mode, I used the RESET button and it worked.
(actually I was surprised that it immediately rebooted the router - I was under the impression that the RESET button was merely an input line to the processor that can be polled, e.g. to detect if it has to reset the config or start the network bootloader, and that it would just see that I pressed RESET and set my devicemode without a reboot)

I believe that is right, its not hardware reset button, but “soft” reset… Anyhow, I can not find any information about that only push button works, but not power cycle.
Both options are always mentioned. Do either power cycle or reset via push botton.

I seem to remember that one MT staffer once (with distinctly low voice) admitted in a post I can’t find that power cycle indeed doesn’t work.

[/quote]
I seem to remember that one MT staffer once (with distinctly low voice) admitted in a post I can’t find that power cycle indeed doesn’t work.
[/quote]

Well, I think I can confirm that power cycle does not work…

Rok

I am struggling with the same issue here. AWS support have advised that a “dirty shutdown” is not possible. Even using the force option listed in here.

If anyone has managed to recreate these steps, I would love a breakdown of how you managed it!

I have the very same issue! Mikrotik must devise a different method for enabling container on x86 or CHR platforms.Some VPS providers perform a gracefull shutdown/restart of the system no matter what. Best to change the method for CHR version…

One way to solve it would be it they added confirmation at boot. It would require access to physical or virtual console, i.e. something that any attacker wouldn’t have, so it would be safe. User would enable containers and do regular reboot. While booting, system would ask if they really want it (with e.g. 10 second timeout, defaulting to “no”). Anyone without access to console would be still out of luck, but many/most(?) have it, so it would better than now.

I agree with it, I’ve seen many server provider not to expose all the control functions, their shutdown button will send shutdown signal instead of forcing power down, I had to give up using RouterOS on these vps servers.

Good afternoon. Can you suggest how you did it?
I have exactly the same problem. I installed in hyper-v chr. How do I make image for transfer?

I can confirm that this method works. However at about 2m30s in the countdown was still going and AWS had not terminated the instance. So I went to the console and issued a Force Terminate. It said it was successful. After no shutdown after 30 seconds I issued it again. Then I waited. It eventually stopped. I started and was happy to see that it was enabled. BTW, I used this guide to install v7.8 from RAW disk https://bookstack.bluecrow.net/books/mikrotik/page/creating-a-chr-instance-in-aws-ec2.

on aws lightsail, issued stop command with --force parameter did not work.

Did you use the cli to run both “start” and then “stop -force” right after?