Manual:CHR GCE: Difference between revisions
Created page with "RouterOS CHR supports Google Compute Engine since introduction of VirtIO-SCSI driver in version 6.42RC38. Launching your RouterOS in Google Compute Cloud requires a few modif..." |
m MTU limitations |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
RouterOS CHR supports Google Compute Engine since introduction of VirtIO-SCSI driver in version 6. | RouterOS CHR supports Google Compute Engine since introduction of VirtIO-SCSI driver in version 6.42rc28. | ||
Launching your RouterOS in Google Compute Cloud requires a few modifications to the default RAW Disk image, because Google only allows disk images in 1GB size increments. | Launching your RouterOS in Google Compute Cloud requires a few modifications to the default RAW Disk image, because Google only allows disk images in 1GB size increments. | ||
The following instructions assume you have installed Google Cloud Console CLI tools, but you can do the exact steps from the Google Cloud Console in your web browser, via the GUI, if you don't like to install the CLI tools. | The following instructions assume you have installed [https://cloud.google.com/sdk/ Google Cloud Console CLI tools], but you can do the exact steps from the Google Cloud Console in your web browser, via the GUI, if you don't like to install the CLI tools. | ||
Download the raw disk image archive from Mikrotik | Download the raw disk image archive from Mikrotik | ||
wget https://download2.mikrotik.com/routeros/6.42rc30/chr-6.42rc30.img.zip | wget https://download2.mikrotik.com/routeros/6.42rc30/chr-6.42rc30.img.zip | ||
Unzip the archive | Unzip the archive | ||
unzip chr-6.42rc30.img | unzip chr-6.42rc30.img | ||
Expand the image size to 1GB | Expand the image size to 1GB | ||
truncate --size=1G chr-6. | truncate --size=1G chr-6.42rc30.img | ||
Create the image archive for Google GCE | Create the image archive for Google GCE | ||
mv chr-6. | mv chr-6.42rc30.img disk.raw | ||
tar -Sczf chr-6. | tar -Sczf chr-6.42rc30-image.tar.gz disk.raw | ||
Create a bucket to store image archives | Create a bucket to store image archives | ||
Line 20: | Line 20: | ||
Copy the new image to the bucket | Copy the new image to the bucket | ||
gsutil cp chr-6. | gsutil cp chr-6.42rc30-image.tar.gz gs://cloud-hosted-router-images | ||
Create an image for GCE from the archive | Create an image for GCE from the archive | ||
gcloud compute images create " | gcloud compute images create "routeros" \ | ||
--family=cloud-hosted-router \ | --family=cloud-hosted-router \ | ||
--description "Mikrotik Cloud Hosted Router (CHR) is a RouterOS version intended for running as a virtual machine." \ | --description "Mikrotik Cloud Hosted Router (CHR) is a RouterOS version intended for running as a virtual machine." \ | ||
--source-uri "https://storage.googleapis.com/cloud- | --source-uri "https://storage.googleapis.com/cloud-hosted-router-images/chr-6.42rc30-image.tar.gz" | ||
Create an instance | Create an instance | ||
Line 33: | Line 33: | ||
--machine-type "f1-micro" \ | --machine-type "f1-micro" \ | ||
--image-family=cloud-hosted-router | --image-family=cloud-hosted-router | ||
{{Note| For GCE instances, packets leaving the instance must not exceed 1460 bytes. To account for the additional ESP overhead, the [https://cloud.google.com/vpn/docs/concepts/advanced#mtu recommended MTU value] is 1360. }} | |||
== macOS specifics == | == macOS specifics == | ||
Please note, that when using macOS, you will need to install gnu-tar and truncate via Homebrew. See above as to when the respective commands must be used. | Please note, that when using macOS, you will need to install gnu-tar (built in macOS tar is not supported for some reason) and truncate via Homebrew. See above as to when the respective commands must be used. | ||
For truncate: | For truncate: |
Latest revision as of 12:32, 26 February 2018
RouterOS CHR supports Google Compute Engine since introduction of VirtIO-SCSI driver in version 6.42rc28. Launching your RouterOS in Google Compute Cloud requires a few modifications to the default RAW Disk image, because Google only allows disk images in 1GB size increments. The following instructions assume you have installed Google Cloud Console CLI tools, but you can do the exact steps from the Google Cloud Console in your web browser, via the GUI, if you don't like to install the CLI tools.
Download the raw disk image archive from Mikrotik
wget https://download2.mikrotik.com/routeros/6.42rc30/chr-6.42rc30.img.zip
Unzip the archive
unzip chr-6.42rc30.img
Expand the image size to 1GB
truncate --size=1G chr-6.42rc30.img
Create the image archive for Google GCE
mv chr-6.42rc30.img disk.raw tar -Sczf chr-6.42rc30-image.tar.gz disk.raw
Create a bucket to store image archives
gsutil mb gs://cloud-hosted-router-images
Copy the new image to the bucket
gsutil cp chr-6.42rc30-image.tar.gz gs://cloud-hosted-router-images
Create an image for GCE from the archive
gcloud compute images create "routeros" \ --family=cloud-hosted-router \ --description "Mikrotik Cloud Hosted Router (CHR) is a RouterOS version intended for running as a virtual machine." \ --source-uri "https://storage.googleapis.com/cloud-hosted-router-images/chr-6.42rc30-image.tar.gz"
Create an instance
gcloud compute instances create "chr-1" \ --zone "us-central1-c" \ --machine-type "f1-micro" \ --image-family=cloud-hosted-router
Note: For GCE instances, packets leaving the instance must not exceed 1460 bytes. To account for the additional ESP overhead, the recommended MTU value is 1360.
macOS specifics
Please note, that when using macOS, you will need to install gnu-tar (built in macOS tar is not supported for some reason) and truncate via Homebrew. See above as to when the respective commands must be used.
For truncate:
brew install truncate truncate -s 1G chr-6.42rc30.img
For gnu-tar:
brew install gnu-tar gtar -Sczf chr-6.42rc30.tar.gz disk.raw