Community discussions

MikroTik App
 
whyborn
just joined
Topic Author
Posts: 7
Joined: Thu Jun 23, 2022 10:47 am

how enable container on CHR\x86?

Fri Sep 02, 2022 11:37 am

hi!
pls tell me how to enable CHR\x86 in system/device-mode/container?
/system/device-mode/updatecontainer=yes asks for a manual poweroff or reset - turn off vps via isp manager there is not working


[admin@CHR] > system/device-mode/print
mode: enterprise
[admin@CHR] > /system/device-mode/update container=yes
update: please activate by turning power off or pressing reset or mode button in 4m33s
-- [Q quit|D dump|C-z pause]


thx
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 8505
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: how enable container on CHR\x86?

Fri Sep 02, 2022 11:48 am

You have installed container package, first?
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
whyborn
just joined
Topic Author
Posts: 7
Joined: Thu Jun 23, 2022 10:47 am

Re: how enable container on CHR\x86?

Fri Sep 02, 2022 4:26 pm

You have installed container package, first?
yeap
I see container menu, but it gives an error.
[admin@CHR] > /container/add remote-image=pihole/pihole:latest interface=veth1 root-dir=pihole mounts=dnsmasq_pihole,etc_pi
hole envlist=pihole_envs
failure: not allowed by device-mode
[admin@CHR] > system/device-mode/print
mode: enterprise 
 
nick209
just joined
Posts: 2
Joined: Tue Jul 23, 2019 11:43 am

Re: how enable container on CHR\x86?

Fri Sep 02, 2022 7:52 pm

pls tell me how to enable CHR\x86 in system/device-mode/container?
/system/device-mode/updatecontainer=yes asks for a manual poweroff or reset - turn off vps via isp manager there is not working
+1
I am also unable to change device-mode on my CHR. Turn off or reboot vds over VMmanager is not working for me. Container package is installed.
 
User avatar
ID
just joined
Posts: 4
Joined: Tue Dec 26, 2006 10:36 pm

Re: how enable container on CHR\x86?

Fri Sep 02, 2022 9:49 pm

after issue command;
/system/device-mode/update container=yes

do not shutdown or reboot at routeros. power off vm directly.
 
whyborn
just joined
Topic Author
Posts: 7
Joined: Thu Jun 23, 2022 10:47 am

Re: how enable container on CHR\x86?

Fri Sep 02, 2022 10:48 pm

m8, Im shutting down my virtual machine in isp manager via "restart" and "stop" buttons
without any effect.
its very strange, thats why I created this topic here
111.png

anyway thanks for the answer! i hope dev will pay attention to this problem, or they will tell me in detail where im wrong
You do not have the required permissions to view the files attached to this post.
 
User avatar
ID
just joined
Posts: 4
Joined: Tue Dec 26, 2006 10:36 pm

Re: how enable container on CHR\x86?

Fri Sep 02, 2022 10:56 pm

When you do any option, are you see "router was rebooted without proper shutdown" error at first line at log when routeros come back?
 
fragtion
Member Candidate
Member Candidate
Posts: 194
Joined: Fri Nov 13, 2009 10:08 pm
Location: Johannesburg, South Africa

Re: how enable container on CHR\x86?

Fri Sep 02, 2022 10:57 pm

Only thing that worked for me to get it working on AWS, was to launch the cloud vm as an ubuntu/debian VM, then set up the chr with container enabled on another local vm with virtualbox or whatever, ssh the image over to a ramdrive on the ubuntu CHR, and then dd the image and reboot. But beware all of this wipes the license. Oh and I'm sure there's an easier way, but I don't know it
 
whyborn
just joined
Topic Author
Posts: 7
Joined: Thu Jun 23, 2022 10:47 am

Re: how enable container on CHR\x86?

Fri Sep 02, 2022 11:27 pm

loss license is catastrophic, thank you, but its not my way
 
User avatar
hegars
just joined
Posts: 19
Joined: Sun Feb 05, 2012 9:30 am
Location: Melbourne, AU
Contact:

Re: how enable container on CHR\x86?

Sat Sep 03, 2022 5:31 am

I know it probably dosent help your exact problem but I had the exact same issue on Linode.com instances, so I hope this helps someone in the same situation.

The fix was after entering the /system/device-mode/update container=yes then going into the LISH console then issuing a CTL+A then D to exit from the running vm console to the lish submenu, issuing the "destroy" command then finnally the "boot" command.

However you might be able to issue a SysRq B comand, so look that up maybe?

In AWS you'll need to get on the CLI and issue a force stop "aws ec2 stop-instances --force --instance-ids i-xxxxxxxxx". I'll see if I can do it now on my AWS instances and update this post.
Last edited by hegars on Sat Sep 03, 2022 8:11 am, edited 2 times in total.
 
whyborn
just joined
Topic Author
Posts: 7
Joined: Thu Jun 23, 2022 10:47 am

Re: how enable container on CHR\x86?

Sat Sep 03, 2022 6:53 am

When you do any option, are you see "router was rebooted without proper shutdown" error at first line at log when routeros come back?
nope
logs empty
 
User avatar
ID
just joined
Posts: 4
Joined: Tue Dec 26, 2006 10:36 pm

Re: how enable container on CHR\x86?

Sat Sep 03, 2022 1:19 pm

You aren't doing anything wrong. Probably when you hit stop or restart isp manager notify routeros and do it graceful reboot/shutdown.
No matter what i did, container permission given only when i force vm to stop like power off and on like hardware. That's why i ask if you see that error/information at first place.

Maybe mikrotik dev's give an exception for CHR instances at later versions since we don't have button and not everybody can hard stop vm because of permissions or incompatibility of software. =/

Anyway if i find easy way to do it, let this thread aware.
 
avraamd
just joined
Posts: 7
Joined: Mon Oct 11, 2021 6:11 pm

Re: how enable container on CHR\x86?

Sun Sep 04, 2022 11:48 am

Same thing to me when i tried it on VirtualBox, can not update the device-mode.
 
User avatar
hegars
just joined
Posts: 19
Joined: Sun Feb 05, 2012 9:30 am
Location: Melbourne, AU
Contact:

Re: how enable container on CHR\x86?

Sun Sep 04, 2022 2:26 pm

Same thing to me when i tried it on VirtualBox, can not update the device-mode.
I just tested with latest VirtualBox and it works fine using the "reset" in vitualbox with the CHR 7.5 images
 
avraamd
just joined
Posts: 7
Joined: Mon Oct 11, 2021 6:11 pm

Re: how enable container on CHR\x86?

Sun Sep 04, 2022 6:45 pm

Correction. After reinstalling VirtualBox worked ok! Thanks

Hello i have the latest Virtualbox, and tried from the VM Menu-->Machine -->Reset.

But the mode did not update to container.
 
whyborn
just joined
Topic Author
Posts: 7
Joined: Thu Jun 23, 2022 10:47 am

Re: how enable container on CHR\x86?

Mon Sep 05, 2022 9:47 am

You aren't doing anything wrong. Probably when you hit stop or restart isp manager notify routeros and do it graceful reboot/shutdown.
No matter what i did, container permission given only when i force vm to stop like power off and on like hardware. That's why i ask if you see that error/information at first place.

Maybe mikrotik dev's give an exception for CHR instances at later versions since we don't have button and not everybody can hard stop vm because of permissions or incompatibility of software. =/

Anyway if i find easy way to do it, let this thread aware.
I also thought that from the management console, only a warm restart. I created a ticket with the provider and they answered me in technical support, "stop button in the console executes the virsh shutdown command"
 
User avatar
hegars
just joined
Posts: 19
Joined: Sun Feb 05, 2012 9:30 am
Location: Melbourne, AU
Contact:

Re: how enable container on CHR\x86?  [SOLVED]

Mon Sep 05, 2022 2:45 pm

If its virsh then a "virsh destroy" need to be issued. this is the command that initiates an immediate ungraceful shutdown and stops the specified guest virtual machine https://access.redhat.com/documentation ... rsh-delete
 
whyborn
just joined
Topic Author
Posts: 7
Joined: Thu Jun 23, 2022 10:47 am

Re: how enable container on CHR\x86?

Mon Sep 05, 2022 7:54 pm

thnx !
your answer helped

I asked the technical support of my vps provider to do
virsh destroy

on the hypervisor to my VM
/system/device-mode/update container=yes
and rearm from console my VM
after hard reset it and everything worked out!

please mark this answer as solved
thank you all for your help and advice
 
nick209
just joined
Posts: 2
Joined: Tue Jul 23, 2019 11:43 am

Re: how enable container on CHR\x86?

Tue Sep 06, 2022 10:15 pm

I asked the technical support of my vps provider to do
virsh destroy
Unfortunately it doesn't work for my vps provider...

Dear mikrotik developers, please add the ability to change device-mode easier especially for chr
 
User avatar
hegars
just joined
Posts: 19
Joined: Sun Feb 05, 2012 9:30 am
Location: Melbourne, AU
Contact:

Re: how enable container on CHR\x86?

Wed Sep 07, 2022 3:34 pm

the methods to enable containers are a little harsh but the security implications are pretty wild so you're not going to get very far with support on this one.
 
aleab
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Sat Sep 22, 2018 6:13 pm

Re: how enable container on CHR\x86?

Sat Sep 10, 2022 10:53 pm

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
:)
 
edv4ld0
just joined
Posts: 1
Joined: Thu Jan 17, 2013 12:38 am

Re: how enable container on CHR\x86?

Tue Sep 20, 2022 6:11 am

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.

3) 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.

4) Start EC2, the log will appear:
router was rebooted without proper shutdown

* The container will be enabled.

Who is online

Users browsing this forum: No registered users and 2 guests