Description

Summary

When upgrading a Junos VMHost system -such as an MX2010 system- you may encounter upgrade failures that appear to be related to missing SSH key files in the /hostvar directory. Symptoms often include errors referencing:

    id_int_rsa
    id_int_rsa.pub
    id_int_rsa_host.pub
    ssh_host_ed25519_key
    ssh_host_ed25519_key.pub

While these missing files may appear to be the root cause, investigation showed that the underlying issue can occur when a system is running a traditional Junos installation and an upgrade is attempted directly to a VMHost release. The upgrade process cannot complete successfully because the system is not in the expected VMHost state.

Affected Platforms:

Junos platforms running VMHost software releases. See the "VM Host Overview" article for more information

Symptoms

The VMHost upgrade may fail with output similar to:

    cp: /hostvar/id_int_rsa: No such file or directory
    cp: /hostvar/id_int_rsa.pub: No such file or directory
    cat: /hostvar/id_int_rsa_host.pub: No such file or directory
    cp: /hostvar/ssh_host_ed25519_key*: No such file or directory
    
    Warning: Identity file /root/.ssh_int/id_int_rsa not accessible
    ...
    upgrade failed
Customers may also observe:
    vhclient -s
    cp: /hostvar/id_int_rsa: No such file or directory
    ...
    Warning: Identity file /root/.ssh_int/id_int_rsa not accessible
and a lack of expected VMHost operational information.

 

Root Cause

We determined that the affected system was running the standard Junos package (as an example)

    junos-install-mx-x86-64-24.2R2-S1.6.tgz

while the customer attempted to upgrade directly to a VMHost package:

    junos-vmhost-install-mx-x86-24.2R2-S4.3.tgz

The system had not been properly established as a VMHost installation, which caused the VMHost upgrade workflow to fail. Although missing SSH-related files were visible during troubleshooting, they were a symptom rather than the primary cause of the upgrade failure. 

How to Verify

Step 1: Check Previously Installed Software

Review installation history:

show log install | match /var/tmp/junos

If you see entries similar to:

/var/tmp/junos-install-mx-x86-24.2R2-S1.6.tgz

the system was previously loaded using a standard Junos package rather than a VMHost package.

Step 2: Verify VMHost Status

Run:

show vmhost version
show vmhost information

If VMHost information is incomplete, missing, or inconsistent with the target image type, investigate the current installation state before attempting another VMHost upgrade.

Step 3: Check Hostvar Contents

On systems exhibiting the issue:

start shell
ls -l /hostvar

Problem systems may contain only:

id_rsa
id_rsa.pub
id_rsa_host.pub
vmhost_version

while healthy VMHost systems may additionally contain:

id_int_rsa
id_int_rsa.pub
id_int_rsa_host.pub
ssh_host_ed25519_key
ssh_host_ed25519_key.pub

However, the absence of these files should not automatically be assumed to be the root cause.

Solution

Recommended Resolution

Preferred Recovery Method

Use a USB-based installation to migrate the system to the intended VMHost release.

The engineering team determined that the affected MX system has been loaded with a non-VMHost image and recommended a USB upgrade procedure to establish the correct VMHost software baseline before proceeding with normal VMHost upgrades.


Best Practices

Do

  • Verify whether the currently installed image is a standard Juno package or a VMHost package before upgrading.
  • Use VMHost packages when performing VMHost upgrade workflows
  • Validate VMHost status using:
    show vmhost version
    show vmhost information

    before and after upgrades.

  • Follow supported migration procedures when moving from non-VMHost to VMHost software versions.

Do Not

  • Assume missing SSH key files alone are responsible for upgrade failures
  • Copy SSH or hostvar files from another device as a workaround unless specifically directed by JTAC or Engineering
  • Attempt direct migration between image formats without verifying platform and release requirements.

Key Takeaway

If an MX VMhost upgrade fails with missing /hostvar SSH key errors, first verify that the system was installed using the correct VMHost software package. In the investigated cases, the failure was caused by attempting to upgrade from a standard Junos installation to a VMHost release, and the recommended corrective action was to perform a USB-based installation of the intended VMHost software baseline.

Modification History

First publication 2026-08-17