Guest User

Untitled

a guest
Feb 8th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. MKII
  2.  
  3. sudo apt install snapd
  4. sudo snap install lxd
  5. #make pool
  6.  
  7. geek@bast:~$ sudo zfs create tank/vm
  8. geek@bast:~$ sudo zfs create tank/vm/lxd
  9.  
  10. #make storage volume for mssql
  11.  
  12. sudo zfs create -s -V 20G -o volblocksize=4k tank/vm/disks/bitwardendb
  13. sudo mkfs.ext4 /dev/zvol/tank/vm/disks/bitwardendb
  14. #init lxd
  15. lxd init
  16.  
  17. #output of lxd init. Make sure its been sucessfully configured - ya, the last two lines were garbled.
  18.  
  19. Do you want to configure a new storage pool (yes/no) [default=yes]?
  20. Name of the new storage pool [default=default]:
  21. Name of the storage backend to use (dir, btrfs, ceph, lvm, zfs) [default=zfs]:
  22. Create a new ZFS pool (yes/no) [default=yes]? no
  23. Name of the existing ZFS pool or dataset: tank/vm/lxd
  24. Would you like LXD to be available over the network (yes/no) [default=no]?
  25. Would you like stale cached images to be updated automatically (yes/no) [default=yes]?
  26. Would you like to create a new network bridge (yes/no) [default=yes]?
  27. What should the new bridge be called [default=lxdbr0]?
  28. What IPv4 address should be used (CIDR subnet notation, âautoânoneâ
  29. What IPv6 address should be used (CIDR subnet notation, âautoânoneâ
  30. LXD has been successfully configured.
  31.  
  32. #make container:run container
  33. lxc launch ubuntu:x bitwarden
  34. #Get information on bitwarden
  35.  
  36. lxc config show containername
  37. Get hostid from volatile.last_state.idmap
  38. #set permissions for storage volume - ugh
  39. #On host
  40. sudo mkdir /mnt/tmp
  41. sudo mount /dev/zvol/tank/vm/disks/bitwardendb /mnt/tmp
  42. chown -R 1000000:1000000 /mnt/tmp/
  43. #add the storage volume to the VM
  44. sudo lxc config device add bitwarden bitwardendb disk path=/var/opt/mssql source=/dev/zvol/tank/vm/disks/bitwardendb
  45.  
  46. lxc exec bitwarden bash
  47.  
  48. #mssql install - cause bleh, this is hard and 99% of the difficulty is due to this bloody thing.
  49. apt update, apt upgrade (needed new gnutls for reasons)
  50. install SQL Server as per https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu
Advertisement
Add Comment
Please, Sign In to add comment