yeapYou have installed container package, first?
[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
+1pls 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
nopeWhen you do any option, are you see "router was rebooted without proper shutdown" error at first line at log when routeros come back?
I just tested with latest VirtualBox and it works fine using the "reset" in vitualbox with the CHR 7.5 imagesSame thing to me when i tried it on VirtualBox, can not update the device-mode.
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"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.
virsh destroy
/system/device-mode/update container=yes
Unfortunately it doesn't work for my vps provider...I asked the technical support of my vps provider to doCode: Select allvirsh destroy
/system/device-mode/print
mode: enterprise
container: yes
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.On AWS, after install container:
aws ec2 start-instances --instance-ids i-???
aws ec2 stop-instances --force --instance-ids i-???
I can not find any information about that only push button works, but not power cycle.
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.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.On AWS, after install container:
aws ec2 start-instances --instance-ids i-???
aws ec2 stop-instances --force --instance-ids i-???
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?
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.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...
Good afternoon. Can you suggest how you did it?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
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/mi ... in-aws-ec2.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.
Is there a third option not in your screenshot? I've had to try them all, one at a time, on various cloud platforms, to get it to work..m8, Im shutting down my virtual machine in isp manager via "restart" and "stop" buttons
without any effect.
/system device-mode update container=yes
Run a CHR in the local virtualization environment and enable the container, then package it and dd on the vps.
This is a proven and workable solution.
The most important thing is that this method is suitable for almost all cloud servers !!
If necessary contact me
Could you please provide a step-by-step explanation on how to "then package it and dd on the VPS"?
Thank you!
WORKED LIKE A CHARM!!! I had tried rebooting, stopping the EC2 instance with no luck. Install the containers x84 package, and run in the virtual CHR the command after rebooting:I was able to get device-mode set on AWS using a more reliable method than waiting on awscli to flake out. The idea is to create a snapshot of the instance during the 5 minute period and then to forcibly replace the running disk with the newly created snapshot, all from within the AWS web interface. I am sure you could automate this with awscli but I figure this would provide a simple way for users wanting to fully utilize RouterOS/CHR on AWS.
***Optional***
Create RouterOS AMI using the following guide: https://bookstack.bluecrow.net/books/mi ... in-aws-ec2
1. Locate the Volume ID of your CHR by going to your AWS EC2 Console and navigating to Instances > Storage and locating the Volume ID near the bottom of the page
2. Install container package and update the device-mode using the following command and stay logged into the CHR:3. Go to your AWS EC2 console and go to Snapshots, from there you will need to create a snapshot of the volume that you grabbed in step 1. Give it a memorable name.Code: Select all/system device-mode update container=yes
4. Go back to Instances, select your instance, and on the top right go to Actions > Monitor and Troubleshoot > Replace Root Volume
5. You are going to choose Snapshot in the list of options and then select the snapshot from the list, you should be able to find it quickly by using the memorable name.
6. You will notice that you will be kicked out of your session with the CHR. You will need to reboot the instance from the console at this point.
This allowed me to run containers on my AWS CHR, so hopefully it will work for others that run into this snag.
/system device-mode update container=yes