Vagrant

From tannerjc wiki
Jump to: navigation, search

converting a virtualbox machine to libvirt box

  784  cp -Rp ubuntu-VAGRANTSLASH-trusty64
  785  cp -Rp ubuntu-VAGRANTSLASH-trusty64 ubuntu-VAGRANTSLASH-trusty64.bak
  786  ls -al
  787  cp -Rp centos-VAGRANTSLASH-7/1704.01/libvirt ubuntu-VAGRANTSLASH-trusty64/20170530.0.0/.
  788  cd ubuntu-VAGRANTSLASH-trusty64/20170530.0.0/
  789  ls -al
  790  ls virtualbox/
  791  cp virtualbox/box-disk1.vmdk libvirt/.
  792  ls -al
  793  cd libvirt/
  794  ls -al
  795  mv box.img box.img.bak
  796  ls -al
  797  qemu-img convert -f vmdk box-disk1.vmdk -O qcow2 box.img
  798  ls -al
  799  vim metadata.json
  800  file *
  801  cat ~/Documents/tannerjcnet.txt
  802  history

getting nfs working from a fedora host

pre 31
  813  dnf install nfs-utils
  816  systemctl enable nfs
  817  systemctl restart nfs
  814  firewall-cmd --add-service=nfs --permanent
  819  firewall-cmd --permanent --add-service=rpc-bind
  820  firewall-cmd --permanent --add-service=mountd
  821  firewall-cmd --reload
31
rpcinfo -p 192.168.122.1 | awk '{print $4}' | fgrep -v port | sort -u | xargs -I {} firewall-cmd --zone=libvirt --permanent --add-port={}/tcp
rpcinfo -p 192.168.122.1 | awk '{print $4}' | fgrep -v port | sort -u | xargs -I {} firewall-cmd --zone=libvirt --permanent --add-port={}/udp
firewall-cmd --zone=libvirt --add-service=nfs --permanent
firewall-cmd --zone=libvirt --add-service=rpc-bind --permanent
firewall-cmd --reload


Disable udp so that it uses tcp instead ...

config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false