djgizmo Posted November 11, 2018 Share Posted November 11, 2018 (edited) I've spent the last 2 days trying to learn everything I can how to setup GNS3 on Unraid VM. Get a drink, this could take a while. Shutdown all of your VMs. Yes, this is needed. Install User Scripts if you don't have it already. Once installed, go to settings > User Scripts Add 2 new scripts - One "Enable Nested VMs" and another one, "Disable Nested VMs" Go here and grab the snippets for these. if you have AMD cpu, you'll need to adjust the scripts. Read the snippets, takes 2 seconds to adjust for AMD. Once done, run the Enable Nested VMs script via RUN IN BACKGROUND. It'll take about 5-10 seconds to run. click show log to verify that it was successful. Look for... Nested vms are enabled for intel cpus Script Finished blah blah blah Warning - if you have a Windows VM and AV on it, turning on these nesting settings can cause issues. My suggestion, turn off the AV for the vm. Download the GNS3 VMware workstation VM. (Yes, I know other posts have said download the virtual box one, but just humor me) Open the zip, extra the OVA file. Using Winrar or 7zip, open the OVA file, and extract the .vmdk files rename and remove any spaces out of the name of the vmdk files Login via ssh to your unraid box. I use mobaXterm to make this process easier as you'll need to get the domains folder and upload the .vmdk files we just extracted. path to the domains share Open your unraid gui and start creating an Ubuntu vm. Change your initial memory to whatever you think is best. I used 4096 for my box. Machine - Q35-2.12 Bios - SeaBIOS leave the rest the default. Make sure your Network Bridge is set (your VM needs an interface) Click Create, but do not start it. This will create the folder under the domains share. open the newly created folder in SSH (mine was GNS3), and then upload/scp files to this folder. Once these have been uploaded, we HAVE to convert them to raw. Yes, unraid does support vmdk, but in my experience over the past 48 hours has shown me, that not all things work the way they should. use these commands to convert them. Obviously, adjust your file names to what your files are named. qemu-img convert -f vmdk -O raw GNS3VM-disk1.vmdk GNS3VM-disk001.img qemu-img convert -f vmdk -O raw GNS3VM-disk2.vmdk GNS3VM-disk002.img This WILL expand the files... ALOT. Mine expanded to 117Gbits from 339MB. Thanks GNS3 for over killing the vmdk space :eyeroll: delete the other .img file that was created when you created the vm. Back in the Unraid gui, edit the newly created GNS3 vm. Primary vDisk Location - change to manual - path to your newly created disk001.img is (mine ended up being /mnt/user/domains/GNS3/GNS3VM-disk001.img) Add another vDisk location - change to manual - repeat - (/mnt/user/domains/GNS3/GNS3VM-disk002.img) Change BOTH of these to SATA. If you leave this as VirtIO, the vm will start to boot, but won't finish booting (the lizard will never get the bug) Once you change to SATA, save the changes and boot the vm, and connect to it via the VNC console. You might see an Ubuntu screen first, press enter and continue the boot. Voila! GNS3 vm has booted. However, it's might be complaining about KVM support (Nested Virtualization). Did you do Step 3? If GNS3 isn't complaining about KVM and it showing "KVM support available: True" then you're set to setup the network portion. Configure the network as you see fit. I personally statically assign all my vms, but if you have DHCP on your bridged network, it'll already have an IP. Finish that drink! P.S. Attached is my XML for this VM if you need to break it down for some reason. You'll need to reconfigure the GNS3 client app to use the VM. Open GNS3, edit, preferences, server, un-tick Enable local server, enter the IP of your GNS3 vm. I had to uncheck auth, but too tired to experiment anymore. Done. NOTE: If you've created any specific devices from templates... you'll probably have to recreate those as the devices you've saved were pointing a local VM (VMWare Workstation or Virtual Box). As a MIkrotik guy, this made me sad as I had 10 versions of RouterOS saved which had to be recreated. GNS3_XML.xml Edited November 11, 2018 by djgizmo added XML file and added GNS3 config detail 4 Quote Link to comment
A75G Posted December 30, 2019 Share Posted December 30, 2019 Thank you for the guide been using it for months now it really helped me on my certs. One question is there way to reduce the size of the IMG because my SSD isn't keeping up with it? Quote Link to comment
Cornstarch Posted March 9, 2020 Share Posted March 9, 2020 You deserve more than a thank you for this post. This has helped me so much! Quote Link to comment
Outlet6957 Posted April 17, 2020 Share Posted April 17, 2020 (edited) On 12/30/2019 at 1:59 AM, A75G said: Thank you for the guide been using it for months now it really helped me on my certs. One question is there way to reduce the size of the IMG because my SSD isn't keeping up with it? You can reduce the size by converting to a QCOW2 image instead. It is MUCH smaller than the .img file above. The command for that is this qemu-img convert -f vmdk -O qcow2 ./GNS3_VM-disk1.vmdk ./GNS3VM-disk1.qcow2 I've been running GNS3 for about 2 years now with this method. Here are my file sizes for reference 1.5G ./GNS3VM-disk1.qcow2 42M ./GNS3VM-disk2.qcow2 532M ./GNS3_VM-disk1.vmdk 1.9M ./GNS3_VM-disk2.vmdk As far as the settings for the VM, the only thing I changed was the bios stays SeaBIOS but the Machine is i440fx-4.2. Also the Primary vDisk Bus is now SCSI instead of SATA. Let me know if you get stuck! Edited April 17, 2020 by xhaloz 1 Quote Link to comment
testdasi Posted April 17, 2020 Share Posted April 17, 2020 Don't forget to change the format on the VM xml / GUI to qcow2 as well. It's very easy to forget after you finished the qemu-img convert. You don't need SCSI to use qcow2 but you should use it to allow the drive to show up correctly to Windows as thin provisioned. Note that you want to install the driver first before changing your drive bus or you may end up with endless bluescreen at VM boot (if that happens, switch back to SATA and it should boot normal again for you to install the driver). And note that raw img is also thin provisioned, just that the size you see is the max size and not the used size. Quote Link to comment
gacpac Posted November 14, 2020 Share Posted November 14, 2020 good question. I see your guide uses vmware, however. I see there's a KVM version of gsn3 that you can download. Have you tried it? Quote Link to comment
xifqaZ-bymxe4-quzrat Posted March 6 Share Posted March 6 Thank you so much for this guide! VM works like an absolute charm Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.