Guest User

Untitled

a guest
Dec 10th, 2018
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. # At this point I am quite confident you know what bhyve is, right? Well if not, I am sorry, you are missing out!
  2. # Bhyve stands for BSD Hypervisor, and was initially developed by NetApp and later gifted to the FreeBSD project.
  3. # Bhyve has seen a serious evolution and improvement over the course of the past years,
  4. # and it has been merged into SmartOS illumos since awhile now.
  5.  
  6. # This guide will show you how to setup a new Bhyve zone in SmartOS illumos.
  7.  
  8. 1. Create a .json file and add the following, man vmadm(1m) for reference;
  9. >>>
  10. {
  11. "brand": "bhyve",
  12. "vcpus": 1,
  13. "autoboot": false,
  14. "alias": "FreeBSD12a",
  15. "hostname": "fbsd12kvm",
  16. "ram": 1024,
  17. "resolvers": ["172.12.0.1", "8.8.8.8"],
  18. "disks": [
  19. {
  20. "boot": true,
  21. "model": "virtio",
  22. "size": 10960
  23. }
  24. ],
  25. "nics": [
  26. {
  27. "nic_tag": "admin",
  28. "model": "virtio",
  29. "ip": "172.12.0.212",
  30. "netmask": "255.255.255.0",
  31. "gateway": "172.12.0.1",
  32. "primary": "1"
  33. }
  34. ]
  35. }
  36. <<<
  37.  
  38. 2. Deploy the zone we just created (pay attention to the UUID of the zone once its created):
  39. > vmadm create -f /opt/freebsd12-bhyve.json
  40. - If all went well, you will see something similar
  41. >>>
  42. [root@homelab ~]# vmadm list
  43. UUID TYPE RAM STATE ALIAS
  44. 074bbaff-925c-e35e-e5a2-874630dee577 LX 512 running alpine.1
  45. efc6e98c-6aee-c819-9a36-d734620a292c LX 512 running alpine.2
  46. 1a70e929-9582-65ac-d252-d32712c4bbb0 BHYV 1024 stopped FreeBSD12a
  47. <<<
  48.  
  49. 3. Time to boot it up, (assumig the iso file is in /zones/ZONE_UUID/root/):
  50. > cd /zones/ZONE_UUID/root/
  51. > vmadm boot ZONE_UUID order=cd,once=d cdrom=/FreeBSD-12.0-RC3-amd64-bootonly.iso,ide
Add Comment
Please, Sign In to add comment