One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
The following options that aren't in the kvm brand should work:
com1, com2
socket,/some/path.com1 defaults to /dev/zconsole and com2 defaults to /tmp/vm.ttyb.bootrom
/usr/share/bhyve/BHYVE_UEFI.fd or /usr/share/bhyve/BHYVE_UEFI_CSM.fd/usr/share/bhyve/BHYVE_UEFI_CSM.fd| #! /usr/local/bin/bash | |
| # | |
| # Calomel.org | |
| # https://calomel.org/zfs_health_check_script.html | |
| # FreeBSD 9.1 ZFS Health Check script | |
| # zfs_health.sh @ Version 0.15 | |
| # Check health of ZFS volumes and drives. On any faults send email. In FreeBSD | |
| # 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS | |
| # pools. For now, in FreeBSD 9, we will make our own checks and run this script |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <sys/un.h> | |
| #include <errno.h> | |
| #include <sys/signal.h> | |
| #include <wait.h> |
| #!/bin/bash | |
| # | |
| # Bash must have been compiled with this ability: --enable-net-redirections | |
| # The device files below do not actually exist. | |
| # Use /dev/udp for UDP sockets | |
| exec 3<>/dev/tcp/host/port | |
| # Write to the socket as with any file descriptor | |
| echo "Write this to the socket" >&3 |
| { | |
| "alias": "hass", | |
| "brand": "lx", | |
| "autoboot": true, | |
| "quota": 20, | |
| "delegate_dataset": true, | |
| "kernel_version": "4.3.0", | |
| "image_uuid": "7b5981c4-1889-11e7-b4c5-3f3bdfc9b88b", | |
| "max_physical_memory": 1024, | |
| "nics": [ |
SmartLogin only works with SmartOS zones. Control of key-based access to bhyve, kvm, and lx isntances can be accomplished using OpenSSH's authorized keys command to fetch authorized keys from the metadata service.
The guest OS needs to have the following added to {{/etc/ssh/sshd_config}}.
AuthorizedKeysCommand /usr/sbin/mdata-get "%u_authorized_keys"
AuthorizedKeysCommandUser mdataget
| Adding a new disk to a bhyve vm takes a few steps. | |
| 1. increase the quota on the zfs dataset to accomodate the additional | |
| space. | |
| 2. create a zvol inside the zone | |
| 3. stop the vm and update its configuration to reflect the change | |
| 4. start the vm, login and use the disk | |
| # update quota |
| { | |
| "brand": "bhyve", | |
| "alias": "centomdano", | |
| "hostname": "centodano", | |
| "dns_domain": "example.com", | |
| "vcpus": 2, | |
| "ram": 4096, | |
| "resolvers": ["8.8.8.8", "8.8.4.4"], | |
| "disks": [ | |
| { |
| # remove any existing dynamic module | |
| if ($null -ne (Get-Module -Name "alexxlabs-core")) { | |
| Remove-Module -Name "alexxlabs-core" -Force | |
| } | |
| # Helper functions which need to be defined before the module is loaded | |
| # See https://github.com/JanDeDobbeleer/oh-my-posh/discussions/2300 | |
| function global:test { | |
| Write-Host "! test !" | |
| return 0 |