Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[QFX] Copying a file from Junos VM to a host OS



Article ID: KB34004 KB Last Updated: 25 Mar 2019Version: 1.0

In some cases, it may be necessary to copy a file from Junos VM to a host OS for troubleshooting purposes.

This article details the steps to do the same.



To copy a file from Junos VM to a host OS, perform the following steps:

  1. Log in as root.
labroot@qfx5100> start shell user root
  1. Locate the file that you want to copy:

root@qfx5100:RE:0% ls -l /var/tmp
total 896
drwxrwxr-x  2 root     wheel     512 Jan 14 20:00 .snap
-rw-r--r--  1 labroot  wheel  414703 Mar  8 19:29 file.tgz <<< file we want to copy
drwxr-xr-x  2 root     field     512 Jan 15 18:06 gres-tp
drwxrwxrwx  2 root     wheel     512 Jan 15 18:06 install
  1. Enter the host shell (root account is needed).

root@qfx5100:RE:0% cli

labroot@qfx5100> request app-engine host-shell
--- Host 14.1X53-D46.7 built 2017-11-24 16:34:04 UTC
  1. Copy the file from Junos VM. Use a username that is present on Junos OS and has sufficient permissions.

-sh-4.1# scp labroot@ /var/tmp/file.tgz   <<< copying file using existing user account in Junos (labroot)
The authenticity of host ' (' can't be established.
RSA key fingerprint is 42:a5:5b:13:c2:d1:07:e6:ed:9d:ee:16:48:85:b7:4e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '' (RSA) to the list of known hosts.
file.tgz                                      100%  405KB 405.0KB/s   00:00
  1. Verify that the file was copied successfully:

-sh-4.1# ls -l /var/tmp
total 408
-rw-r--r-- 1 root root 414703 Mar  8 20:02 file.tgz


Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search