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:
/hostvar
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.
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
vhclient -s cp: /hostvar/id_int_rsa: No such file or directory ... Warning: Identity file /root/.ssh_int/id_int_rsa not accessible
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.
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.
Run:
show vmhost versionshow 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.
On systems exhibiting the issue:
start shellls -l /hostvar
Problem systems may contain only:
id_rsaid_rsa.pubid_rsa_host.pubvmhost_version
while healthy VMHost systems may additionally contain:
id_int_rsaid_int_rsa.pubid_int_rsa_host.pubssh_host_ed25519_keyssh_host_ed25519_key.pub
d_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.
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.
before and after upgrades.
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.
First publication 2026-08-17