Monday, October 03, 2016

VirtualBox Manual DPK Import Failure: Ran out of Virtual Disk

The DPK scripts are simply amazing. I enjoy the flexibility of the new DPK system. I will confess, creating an HCM demo environment with DPK is not as easy as the prior PUM image method, but it is pretty close. As I prepared for OpenWorld 2016, I thought I would download the latest HCM DPK (update 18) and build out a new demo server on my MacBook. Unfortunately, I wasn't able to use the standard Windows PowerShell approach (PowerShell on Mac? Yes, maybe...) so went with the manual VirtualBox import method described in the document: PeopleSoft_Deployment_Packages_For_Update_Images_Installation_July2016, page 31 Task 2-2-2. Everything was running great until the VM attempted to extract HCM-920-UPD-018-OVA_12of15. The install process seemed to hang. With a little investigation, I found that the VM's second disk was full. The solution was rather simple: expand the disk and try again. Just in case you find yourself in this situation, here are the steps I performed to expand the virtual disk.

  1. Following the manual steps, I first imported the VirtualBox shell appliance, but I didn't boot the image
  2. Next, I cloned the second disk using the command VBoxManage clonehd VBOX_8_55_06_SHELL-disk2.vmdk VBOX_8_55_06_SHELL-disk2.vdi --format vdi. The point of cloning into a VDI is so we can use VirtualBox commands to expand the disk.
  3. I then expanded that new disk using the command VBoxManage modifyhd VBOX_8_55_06_SHELL-disk2.vdi --resize 122880. I didn't need to make the disk 120 GB. VirtualBox tells me the image is only using 65 GB, but it doesn't hurt to have extra capacity. The disk files grow as needed.
  4. Optional step: If you want, you can convert the disk back to a VMDK, but this is not necessary. I kept the VirtualBox VDI. VBoxManage clonehd VBOX_8_55_06_SHELL-disk2.vdi VBOX_8_55_06_SHELL-disk2.vmdk --format vmdk.
  5. You need to tell VirtualBox to use the new disk you just created. Open the Virtual Machine's settings and switch to the storage section. Replace the exising *disk2 entry with the name of the file you just created.
  6. Now, here is the interesting part... The virtual disk is bigger, but the operating system doesn't know that yet. We have to stretch the partition table on that disk so the operating system can use the free space we just created. The way I handled this was to boot the VirtualBox guest using one of the amazing Linux live ISO distributions. Specifically, I chose GParted. So, your next step is to download a Linux live distribution. You can find the GParted ISO here. Download the ISO so you can make it available to the VirtualBox guest
  7. With the ISO downloaded, open the guest's properties and switch to the storage settings. Add an optical drive to the IDE controller and select the ISO you downloaded.

  8. Boot the Virtual Machine. The live CD image should take over. If you chose GParted, then you should see the GParted program load. Use the list of disks in the upper right corner to switch to sdb. You should now see a disk with lots of unallocated space. Edit this disk so that it uses all of the available space

  9. Apply your changes, shutdown the virtual machine, and then remove the GParted disk ISO from the virtual drive.
  10. Continue with the rest of the DPK Install steps as described in the Oracle provided documentation.

You should now have a fully functional VirtualBox demo image. Tip: if your usage is light (no SES, not running payroll, etc), then you can easily drop the allocated memory for your VirtualBox image down to 2 GB. I've even run them as low as 1 GB. Memory is important, but I derive the most performance improvement from running these images on an SSD.

No comments: