Cohort 1: Newly Diagnosed MGMT Unmethylated Glioblastoma  Inclusion Criteria Cohort 1 - Newly Diagnosed MGMT Unmethylated Glioblastoma:  Histologically-confirmed glioblastoma (WHO Grade IV glioma); tumors situated primarily in the infratentorial compartment will be excluded. Optimal surgical resection performed, with satisfactory clinical recovery in the judgment of the investigator (patients for who whom "optimal" surgical resection is considered only a subtotal resection or a biopsy, will be considered eligible). No clear evidence of tumor progression through radiation. Patient must have had previous radiation. NOTE: For patients with post-radiation scans suggestive of radiation-induced "pseudoprogression", patients can be consented and enrolled on this trial but investigational treatment will not start until a repeat MRI scan is obtained 4 weeks later (8-9 weeks following completion of radiation). If that scan shows no further tumor progression, despite no interval treatment in those preceding 4-weeks, then it will be assumed that the post-radiation MRI scans represent radiation-induced pseudoprogression rather than true tumor progression. In such a case, patients will start on treatment with paxalisib, the ketogenic diet and metformin. Assessment of PFS will start for such patients from this 8-9 week time point. By contrast, for patients whose 8-9 week "pseudoprogression assessment" MRI scan shows continued tumor progression, then these patients will be assumed to have true tumor progression and will not be eligible to remain treated on this study. Such patients will be deemed for the sake of the study as consented and screened. They will be evaluable for toxicity but not evaluable for response. Such patients may be replaced by an evaluable patient. Chemoradiotherapy administered according to the Stupp regimen, with at least 90% of the radiation prescribed dosing administered, and with initiation occurring less than six weeks after surgery and completion occurring 5 weeks prior to accrual into this study. Demonstrated unmethylated MGMT promotor status confirmed by validated PCR or alternate genomic analysis; subjects with methylated or indeterminate MGMT status that are unwilling, or otherwise unable, to undergo treatment with temozolomide may be enrolled. Patients of any gender, with age ≥ 18 years at the time of randomization. Written, signed, and dated informed consent to participate in this study, in a format approved by each site's Institutional Review Board (IRB). Life expectancy > 12 weeks in the judgment of the investigator. Karnofsky Performance Status (KPS) ≥ 70. If receiving dexamethasone, dose is < 4mg daily No history of allergy or other intolerance to metformin.  Adequate organ and bone marrow function at the time of screening, including  White blood cell count (WBC) > 3,000/µL; Absolute neutrophil count > 1,500/mm3 Platelet count of > 100,000/mm3; Hemoglobin > 10 mg/dL (post-transfusion allowed) Total bilirubin ≤ 1.5 x ULN AST and ALT ≤ 2.5 x ULN Serum glucose < 140 mg/dL Urine dipstick for proteinuria < 2+. Patients discovered to have ≥ 2+ proteinuria on dipstick urinalysis should undergo a 24-hour urine collection and must demonstrate ≤ 1.0 g of protein in 24 hours, OR Urine protein/creatinine ratio ≤ 1. The effects of paxalisib on the developing human fetus are unknown. For this reason, women of child-bearing potential and men must agree to use adequate contraception (e.g. hormonal or barrier method of birth control) prior to study entry, for the duration of study participation and for a three month period (90 days) afterwards in an abundance of caution. Female subjects will be required to demonstrate a negative urine pregnancy test prior to study entry and subjects who are lactating should be excluded. Able and willing, in the judgment of the investigator, to meet all protocol-required treatments, investigations and visits. This must include the ability for the subject to comply with daily self-administration of an oral therapy, or reliable means for treatment to be administered by a dependable third party such as a relative or caregiver. In addition, subjects must be willing and able to comply with the requirements of a ketogenic diet. Subjects must also be able and willing to undergo cranial magnetic resonance imaging and positron-emission tomography, and to receive gadolinium-containing contrast agent.  Exclusion Criteria Cohort 1 - Newly Diagnosed MGMT Unmethylated Glioblastoma:  Patients with tumors exhibiting mutated isocitrate dehydrogenase-1 or 2 (IDH-1, 2). Patients receiving treatment with any other standard or investigational anti-glioma agents (e.g. Optune, bevacizumab). Patients with type 1 diabetes or poorly controlled type 2 diabetes with A1C > 7.5%. QT interval of ≥ 450 msec. Any ongoing malignancy requiring treatment currently or expected to require treatment in the next 12 months. Any pre-existing or inter-current illness or pathology which, in the judgment of the investigator, has the potential to increase the safety risk associated with paxalisib administration, or to confound the results of the study. Patients receiving any medications or substances that are moderate and/or potent enzyme inducers or inhibitors which may have an effect on the metabolism of paxalisib. Known hypersensitivity or intolerance to paxalisib or metformin. Patients unable to undergo an MRI scan. Tumor Progression through chemoradiation (see section 4.2.1.4 above regarding question of radiation-induced "pseudoprogression"). History of bariatric surgery. History of severe nephrolithiasis requiring urologic intervention. History of severe pancreatitis or pancreatic exocrine insufficiency. History of primary hypertriglyceridemia (Familial chylomicronemia, familial hypertriglyceridemia, or familial dysbetalipoproteinemia).  Cohort 2: Recurrent Glioblastoma  Inclusion Criteria Cohort 2 - Recurrent Glioblastoma:  Histologically-confirmed, on initial diagnosis and/or at the time of recurrence, glioblastoma (WHO Grade IV glioma); tumors situated primarily in the infratentorial compartment will be excluded. Radiologically-confirmed disease progression at a minimum of three months after completion of chemoradiotherapy. Having previously been treated with definitive fractionated radiation consistent with NCCN guidelines for radiotherapy of GBM. Any MGMT promoter methylation status is acceptable. Patients of any gender, with age ≥ 18 years at the time of randomization. Written, signed, and dated informed consent to participate in this study, in a format approved by each site's Institutional Review Board (IRB). Life expectancy > 12 weeks in the judgment of the investigator. Karnofsky Performance Status (KPS) ≥ 70. If receiving dexamethasone, dose is < 4mg daily No history of allergy or other intolerance to metformin.  Adequate organ and bone marrow function at the time of screening, including  White blood cell count (WBC) > 3,000/µL; absolute neutrophil count > 1,500/mm3 Platelet count of > 100,000/mm3; Hemoglobin > 10 mg/dL (post-transfusion allowed) Total bilirubin ≤ 1.5 x ULN AST and ALT ≤ 2.5 x ULN Serum glucose < 140 mg/dL Urine dipstick for proteinuria < 2+. Patients discovered to have ≥ 2+ proteinuria on dipstick urinalysis should undergo a 24-hour urine collection and must demonstrate ≤ 1.0 g of protein in 24 hours, OR Urine protein/creatinine ratio ≤ 1.  Patients having undergone recent resection of recurrent or progressive tumor will be eligible as long as all of the following conditions apply:  They have recovered from the effects of surgery Residual disease following resection of recurrent tumor is not mandated for eligibility into the study. To best assess the extent of residual disease post-operatively, a MRI should be done:  i. No later than 96 hours in the immediate post-operative period OR ii. At least 4 weeks post-operatively In both cases, they also need to have it within 21 days of registration and be on a steroid dosage (<4mg of dex) that has been stable for at least 5 days before registration on a steroid dosage that has been stable for at least 5 days. If the steroid dose is increased (but not if its decreased) between the date of imaging and registration, a new baseline MRI is required on a stable steroid dosage for at least 5 days  The effects of paxalisib on the developing human fetus are unknown. For this reason, women of child-bearing potential and men must agree to use adequate contraception (e.g., hormonal or barrier method of birth control) prior to study entry, for the duration of study participation and for a three-month period (90 days) afterwards in an abundance of caution. Female subjects will be required to demonstrate a negative urine pregnancy test prior to study entry and subjects who are lactating should be excluded. Able and willing, in the judgment of the investigator, to meet all protocol-required treatments, investigations and visits. This must include the ability for the subject to comply with daily self-administration of an oral therapy, or reliable means for treatment to be administered by a dependable third party such as a relative or caregiver. In addition, subjects must be willing and able to comply with the requirements of a ketogenic diet. Subjects must also be able and willing to undergo cranial magnetic resonance imaging and positron-emission tomography, and to receive gadolinium-containing contrast agent.  Exclusion Criteria Cohort 2 - Recurrent Glioblastoma:  Patients with tumors exhibiting mutated isocitrate dehydrogenase-1 or 2 (IDH-1, 2). Patients receiving prior treatment with bevacizumab, other PI3K inhibitors or inhibitors of the PI3K pathway (e.g. mTOR inhibitors). Patients currently are during the course of their illness on a ketogenic diet for more than 2 weeks. Patients with type 1 diabetes or poorly controlled type 2 diabetes with A1C > 7.5%. QT interval of ≥ 450 msec. Any ongoing malignancy requiring treatment currently or expected to require treatment in the next 12 months. Any pre-existing or inter-current illness or pathology which, in the judgment of the investigator, has the potential to increase the safety risk associated with paxalisib administration, or to confound the results of the study. Patients receiving any medications or substances that are moderate and/or potent enzyme inducers or inhibitors which may have an effect on the metabolism of paxalisib (e.g. Nystatin swish and swallow, rather than Fluconazole, will be used for oral candidiasis). Known hypersensitivity or intolerance to paxalisib or metformin. Patients unable to undergo an MRI scan. History of bariatric surgery. History of severe nephrolithiasis requiring urologic intervention. History of severe pancreatitis or pancreatic exocrine insufficiency. History of primary hypertriglyceridemia (Familial chylomicronemia, familial hypertriglyceridemia, or familial dysbetalipoproteinemia).