Skip to content

Use Parallels Box

ppggff edited this page May 21, 2022 · 2 revisions

For example: bytesguy/ubuntu-server-20.04-arm64

Steps:

  1. Add box

    vagrant box add bytesguy/ubuntu-server-20.04-arm64
    
    # choose 'parallels' and wait
    
  2. Locate the box

    # find the box dir
    find .vagrant.d/boxes -name '*bytesguy*'
    
    # enter the main dir of this box
    cd ~/.vagrant.d/boxes/bytesguy-VAGRANTSLASH-ubuntu-server-20.04-arm64/1.0.0/parallels/
    
  3. Find the disk file: *.hds

    # run this command with in the 'parallels' dir
    find . -name '*.hds'
    
    # example result: ./Ubuntu Server 20.04.pvm/harddisk1.hdd/harddisk1.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds
    
  4. Convert it to qcow2 image

    qemu-img convert -c -f parallels -O qcow2 ./Ubuntu\ Server\ 20.04.pvm/harddisk1.hdd/harddisk1.hdd.0.\{5fbaabe3-6958-40ff-92a7-860e329aab41\}.hds box.qcow2
    
  5. Run local qcow2 with vagrant-qemu (see example in readme)

Notes:

  • the generated box.qcow2 can be used again for different machines
  • it's the user's response to maintain the generated box.qcow2
  • the example box may hang after vagrant up, see Fix ubuntu hang for details
Clone this wiki locally