Francis Luong

View Original

JunosV Firefly Perimeter in VirtualBox and Serial Ports

Today I learned:

  • OVA files are zip files that contain OVFs, VMDKs, and Manifests
  • You can unpack the JunosV Firefly OVA using unzip.
  • Edit the OVF to make it compatible with VirtualBox. Look for the string %iid% and replace it with a hard sequence number (for my file it was after 1 and before 3 so I used ‘2’.)
  • Then you need to calculate a new SHA1 sum for the OVF and replace the sum in the manifest (.mf) file.

To get the serial port working on Mac OSX:

  • Modify Virtual Box to add a serial port
  • make it for COM1/IRQ4/0x3F8
    • But change Port Mode to 'Host Pipe’
    • Check “Create Pipe”,
    • and set a filename in the tmp folder such as /tmp/pipe
  • To get networking to work, use “Paravirtualized network adapter (virtio-net)” adapters. I was able to get this to work with host-only networking. Additional steps may be required to increase multicast TTL on the host config if you want it to work with Virtualbox NAT networking.

  • install socat if you don’t already have it (using homebrew).

    • brew install socat
  • then use it to associate the host pipe with a PTY
    • socat -d -d /tmp/pipe PTY
  • the logs will include the /dev/ttySXXX path…
    • 2014/08/14 19:40:07 socat[96334] N PTY is /dev/ttys006
  • note the /dev/ttySXXX in the output and use screen to connect.

See also: http://tonejito.blogspot.com/2012/05/virtualbox-serial-console-on-mac-os-x.html