
Under Specify Generation click Generation 1 and click Next.In my case the virtual machine will be called “RouterOS” and I´ll use the default location. By default, Hyper-V Server will store virtual machines at C:\ProgramData\Microsoft\Hyper-V. Under Specify Name and Location, add your virtual machine name and choose where you would like to store your virtual machine, and then click Next.
Under the Actions pane, click on New and then Virtual Machine. virtio0 local:$vmID/vm-$vmID-disk-1.In the second step, we will create a virtual machine and load the downloaded VHDX file.
var/lib/vz/images/$vmID/vm-$vmID-disk-1.qcow2 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 "-" Read -p "Please input CHR version to deploy (6.38.2, 6.40.1, etc):" version
Creates a basic VM that is attached to the 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 the ProxMox host then CHR VM can also be created quickly via BASH script. Qemu-img convert -f raw -O qcow2 chr-6.40.3.img vm-(VM_ID)-disk-1.qcow2 Bash script approach 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 the VM image directory. Make sure that VM storage is on local storage (this way there will no need to work with the LVM config side, and the disk image can be moved later on to LVM or other desired storage if needed). Note: It's a good idea to create a second test VM so you can refer to it's.conf file to make sure you get the syntax right Alternative approach Look in /etc/pve/qemu-server/ for a file with the VM number followed by. For adding the existing file to the VM, edit the VM's. There should be a subdirectory called images with a directory for each VM (named by the VM number). Local storage on ProxMox is in /var/lib/vz directory. conf file or replace the previously created system image file used for booting the guest. Either copy the file to the server and then manually edit the VM's. Use scp or any other comparable tool as that will use SSH for the upload and it does not require any additional configuration. Then you have to manually upload the CHR disk (in qcow format) on the ProxMox host. Create a new guest with the system disk and other devices as required.