Day One Tips
Day One Tips

How to shutdown the vMX BOX # virtual forwarding plane (VFP) and the virtual control plane (VCP)

[ Edited ]
‎12-29-2016 04:41 AM

Hi Folks,

The vMX instance contains two separate VMs for the virtual forwarding plane (VFP) and the virtual control plane (VCP). Please find the details to power-off these Virtual Machines individually.


Virtual control plane (vCP)

====================

If you issue the request system power-off command on the vCP routing engine cli, the RE/vCP will be powered off.

 

lab> request system power-off message "Powering Off the box - admin"
Power Off the system ? [yes,no] (no) yes

Shutdown NOW!
[pid 37178]

lab>
*** FINAL System shutdown message from lab@ ***

System going down IMMEDIATELY


Powering Off the box - admin

 

 

Virtual forwarding plane (vFP)

======================

1. ssh to vFP Management address and run "shutdown -h now"
2. login from vCP by ssh to command "ssh root@128.0.0.16 routing-instance __juniper_private1__" and run "shutdown -h now

 

Either #1 or #2 will do the job.

Also, if you do "set chassis fpc <> power off" it only breaks the connection between RE and FPC0. I.e., it prevents RIOT to start.

The power off command enable you to "power on" and "power off" [1] from the VCP JUNOS CLI.

Both methods you described will require a "virsh reset" from the host OS in order to boot up the FPC again.

[1] double quoted here as you are actually not powering it off - you are just breaking the connection

 

• For VMware, you just shut it down from either the VMWare client, vCenter , esx-cli, ssh to the VFP from an external host or the vmware SDK API's
• For KVM on linux, you could use the 'virsh destroy' command, you could ssh into the VFP from an external host, you could use virt-manager from another host to shutdown the VFP

 

shutdown the vFPC in a safe way. You can shutdown the vFPC immediately
shutdown -h now


The h option is for halt which means to stop. The second parameter is the time parameter. "now" means that shutdown the system right away.

 

The time parameter can be specified in minutes or hours also. For example,

shutdown -h +5 "vFPC is going down for upgrade; shutdown initiated in 5 minutes"


The above command shall flash the message to all other logged in users and give them 5 minutes before the system goes for shutdown.

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Wind River Linux 6.0.0.13 localhost console

localhost login: root
Password:
Last login: Tue Dec 27 16:57:57 UTC 2016 from vfp on pts/0
root@localhost:~# shutdown -h now

Broadcast message from root@localhost (console) (Thu Dec 29 17:19:09 2016):
The system is going down for system halt NOW!
INIT: root@localhost:~#
INIT: Sending processes the TERM signal
Stopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 712)
.
Saving the System Clock time to the Hardware Clock...
Hardware Clock updated to Thu Dec 29 17:19:11 UTC 2016.
Stopping ntpd: stopped process in pidfile '/var/run/ntp.pid' (pid 761)
done
Stopping syslogd/klogd: stopped syslogd (pid 765)
stopped klogd (pid 768)
done
Stopping internet superserver: xinetd.
Stopping crond: OK
Stopping rpcbind daemon...
done.
Deconfiguring network interfaces... ifdown: interface int not configured
done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Saving random seed...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
sd 0:0:0:0: [sda] Stopping disk
ACPI: Preparing to enter system sleep state S5
Power down.

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
root@localhost:~# shutdown -h +5 "vFPC is going down for upgrade; shutdown initiated in 5 minutes"

Broadcast message from root@localhost (console) (Thu Dec 29 17:28:35 2016):
vFPC is going down for upgrade; shutdown initiated in 5 minutes
The system is going DOWN for system halt in 5 minutes!

Broadcast message from root@localhost (console) (Thu Dec 29 17:29:35 2016):
vFPC is going down for upgrade; shutdown initiated in 5 minutes
The system is going DOWN for system halt in 4 minutes!

Broadcast message from root@localhost (console) (Thu Dec 29 17:30:35 2016):
vFPC is going down for upgrade; shutdown initiated in 5 minutes
The system is going DOWN for system halt in 3 minutes!

Broadcast message from root@localhost (console) (Thu Dec 29 17:31:35 2016):
vFPC is going down for upgrade; shutdown initiated in 5 minutes
The system is going DOWN for system halt in 2 minutes!

Broadcast message from root@localhost (console) (Thu Dec 29 17:32:35 2016):
vFPC is going down for upgrade; shutdown initiated in 5 minutes
The system is going DOWN for system halt in 1 minute!

Broadcast message from root@localhost (console) (Thu Dec 29 17:33:35 2016):
vFPC is going down for upgrade; shutdown initiated in 5 minutes
The system is going down for system halt NOW!
INIT: Switching to runlevel: 0
root@localhost:~# Stopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 693)
.
Saving the System Clock time to the Hardware Clock...
Hardware Clock updated to Thu Dec 29 17:33:37 UTC 2016.
Stopping ntpd: stopped process in pidfile '/var/run/ntp.pid' (pid 742)
done
Stopping syslogd/klogd: stopped syslogd (pid 746)
stopped klogd (pid 749)
done
Stopping internet superserver: xinetd.
Stopping crond: OK
Stopping rpcbind daemon...
done.
Deconfiguring network interfaces... ifdown: interface int not configured
done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Saving random seed...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
sd 0:0:0:0: [sda] Stopping disk
ACPI: Preparing to enter system sleep state S5
Power down.

 

-A.Rengaramalingam

-Python JNCIE 3X [SP|DC|ENT] JNCIP-SEC JNCDS 3X [ WAN | DC|SEC] JNCIS-Cloud JNCIS-DevOps CCIP ITIL
#Please mark my solution as accepted if it helped, Kudos are appreciated as well.