{"id":682,"date":"2016-12-14T16:02:17","date_gmt":"2016-12-14T15:02:17","guid":{"rendered":""},"modified":"2018-10-30T22:56:33","modified_gmt":"2018-10-30T21:56:33","slug":"running-junos-vmx-121-within-unetlab","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/running-junos-vmx-121-within-unetlab\/","title":{"rendered":"Running JunoS vMX 12.1 within UNetLab"},"content":{"rendered":"<p>\n\tThe article describes how to run Junos vSRX box within UNL.&nbsp;<\/p>\n<h2>\n\tInitial state, prerequisities and requirements<\/h2>\n<p style=\"margin-top: 0px; margin-bottom: 0px;\">\n\tMy working environment includes:<\/p>\n<ul>\n<li>\n\t\tLinux Mint 18.0 64bit<\/li>\n<li>\n\t\tInstalled qemu package<\/li>\n<li>\n\t\tWorking UNetLab installation (version 1.0.8)<\/p>\n<ul>\n<li>\n\t\t\t\ttested either within UNL over VMWare Player (<a href=\"https:\/\/nil.uniza.sk\/en\/network-simulation-and-modelling\/unetlab\/unified-network-lab-how-run-juniper-junos-vmx-141r1\/\">https:\/\/nil.uniza.sk\/network-simulation-and-modelling\/unetlab\/unified-network-lab-how-run-juniper-junos-vmx-141r1<\/a>), UNL within LXC (<a href=\"https:\/\/nil.uniza.sk\/en\/network-simulation-and-modelling\/unetlab\/unified-network-lab-unetlab-installing-linux-container-lxc\/\">https:\/\/nil.uniza.sk\/network-simulation-and-modelling\/unetlab\/unified-network-lab-unetlab-installing-linux-container-lxc<\/a>)<\/li>\n<\/ul>\n<\/li>\n<li>\n\t\tThen we need a junos ova image (60days testing image donwloadable from junox web page|<\/p>\n<ul>\n<li>\n\t\t\t\t<a href=\"http:\/\/www.juniper.net\/support\/downloads\/?p=firefly#sw\" rel=\"nofollow\" style=\"color: rgb(0, 141, 207); outline: none; font-family: Arial, Tahoma, Verdana;\">http:\/\/www.juniper.net\/support\/downloads\/?p=firefly#sw<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\n\tSteps<\/h2>\n<p>\n\tBe able to run Junos vSRX within Virtualbox (and probably then in GNS3) I had to do following steps.<\/p>\n<p>\n\t1. Direct import of the ova image into VBox does not work, so we need to extract partial parts from the ova file. So go where is your ova image file and then unarchive<\/p>\n<pre>\r\ntax xvf NAME.ova<\/pre>\n<p style=\"margin-top: 0px; margin-bottom: 0px;\">\n\tin my case<\/p>\n<pre>\r\ntar xvf media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova<\/pre>\n<p style=\"margin-top: 0px; margin-bottom: 0px;\">\n\twithin the folder several new files appears including .pem, .cert, . vmdk, .mv, .ovf<\/p>\n<pre>\r\nls -al\r\n\r\ntotal 6872984\r\ndrwxr-xr-x 2 palo palo       4096 Dec 14 14:56 .\r\ndrwxr-xr-x 3 palo palo       4096 Dec 14 15:14 ..\r\n-rw-r--r-- 1 palo palo       3684 Jul 31  2015 certchain.pem\r\n-rw-r--r-- 1 palo palo       2474 Jul 31  2015 media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.cert\r\n-rw-r--r-- 1 palo palo 2156756992 Jul 31  2015 media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4-disk1.vmdk\r\n-rw-r--r-- 1 palo palo        253 Jul 31  2015 media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.mf\r\n-rw-r--r-- 1 palo palo      50948 Jul 31  2015 media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ovf\r\n-rw-r--r-- 1 palo palo 2156820480 Nov  5  2015 media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova<\/pre>\n<p>\n\t2. Then we need to convert vmdk disk to qcow2 format. The name of the image have to be <span style=\"background-color:#ffff00;\">hda.qcow2<\/span><\/p>\n<pre>\r\nqemu-img convert -f vmdk -O qcow2 media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4-disk1.vmdk hda.qcow2<\/pre>\n<p>\n\t3. Using WinSCP of FileZilla connect to your UNL server (VmWare, VBox, LXC, HW). Within UNL server go to the folder<\/p>\n<pre>\r\n\/opt\/unetlab\/addons\/qemu<\/pre>\n<p>\n\tand create there a folder which name have to start vsrx-xy, in my case I have created vsrx-15.1<\/p>\n<p>\n\tUpload your hda.qcow2 file there.<\/p>\n<p>\n\t4. Log in on your UNL server and run&nbsp;<\/p>\n<pre>\r\n\/opt\/unetlab\/wrappers\/unl_wrapper -a fixpermissions<\/pre>\n<p>\n\t5. Create your lab and paste a Node , where you select Template Juniper vSRX. Do not forgett assign 2 CPUs and at least 3GB of RAM, ideal 4GB.<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"vsrx\" src=\"\/wp-content\/uploads\/files\/image\/Virtualization\/Unetlab\/2016-unl-vsrx.jpg\" style=\"width: 595px; height: 883px; border-width: 1px; border-style: solid;\" \/><\/p>\n<p>\n\t&nbsp;<\/p>\n<p>\n\t6. Run the node and start to play!<\/p>","protected":false},"excerpt":{"rendered":"<p>\n\tThe article describes how to run Junos vSRX box within UNL.&nbsp;<\/p>\n<h2>\n\tInitial state, prerequisities and requirements<\/h2>\n<p style=\"margin-top: 0px; margin-bottom: 0px;\">\n\tMy working environment includes:<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[685],"tags":[],"class_list":["post-682","post","type-post","status-publish","format-standard","hentry","category-linux_-_howto-en"],"taxonomy_info":{"category":[{"value":685,"label":"Linux - HOWTO"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":2,"category_info":[{"term_id":685,"name":"Linux - HOWTO","slug":"linux_-_howto-en","term_group":0,"term_taxonomy_id":683,"taxonomy":"category","description":"","parent":0,"count":71,"filter":"raw","cat_ID":685,"category_count":71,"category_description":"","cat_name":"Linux - HOWTO","category_nicename":"linux_-_howto-en","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=682"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/682\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}