Fog radio access network (F-RAN) and virtualisation are promising technologies for 5G networks. In F-RAN, the fog and cloud computing are integrated where the conventional C-RAN functions are diverged to the edge devices of radio access networks. F-RAN is adopted to mitigate the burden of front-haul and improve the end to end (E2E) latency. On other hand, virtualization and network function virtualization (NFV) are IT techniques that aim to convert the functions from hardware to software based functions. Many merits could be brought by the employment of NFV in mobile networks including a high degree of reliability, flexibility and energy efficiency. In this paper, a virtualization framework is introduced for F-RAN to improve the energy efficiency in 5G networks. In this framework, a gigabit passive optical network (GPON) is leveraged as a backbone network for the proposed F-RAN architecture where it connects several evolved nodes B (eNodeBs) via fibre cables. The energy-efficiency of the proposed F-RAN architecture has been investigated and compared with the conventional C-RAN architecture in two different scenarios using mixed integer linear programming (MILP) models. The MILP results indicate that on average a 30% power saving can be achieved by the F-RAN architecture compared with the C-RAN architecture.