var/lib/vz/images/$vmID/vm-$vmID-disk-1. Read -p "Please Enter free vm ID to use:" vmIDĮcho "- VM Directory exists! Ideally try another vm ID!"Įcho "- Converting image to qcow2 format " # List already existing VM's and ask for vmIDĮcho "= Printing list of VM's on this hypervisor!" # Check if image is available and download if neededĮcho "- Downloading CHR $version image file."Įcho "-" OR you can create a gateway VM in proxmox (like mikrotik CHR or pfsense) and. Read -p "Please input CHR version to deploy (6.38.2, 6.40.1, etc):" version Cloud Hosted Router, CHR - RouterOS - MikroTik Documentation WebCloud. Creates basic VM that is attached to MGMT bridge.Įcho "# Start of Script #Įcho "# Preparing for image download and VM creation!".Downloads raw image archive from MikroTik download page.If you have access to ProxMox host then CHR VM can also be created quickly via BASH script. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. Qemu-img convert -f raw -O qcow2 chr-6.40.3.img vm-(VM_ID)-disk-1.qcow2 Bash script approach These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. Now convert the CHR raw image to qcow2 format using qemu-img tool:.Via scp, wget or any other tool download CHR raw image (.img file) into this directory.Default local storage is located in: var/lib/vz/images/(VM_ID) Log into ProxMox host via SSH and navigate to VM image directory.Make sure that VM storage is on local storage (this way there will no need to work with LVM config side, and disk image can be moved later on to LVM or other desired storage if needed).conf file to make sure you get the syntax right Note: It's a good idea to create a second test VM so you can refer to it's.
0 Comments
Leave a Reply. |