churchers / vm-bhyve

Shell based, minimal dependency bhyve manager
BSD 2-Clause "Simplified" License
816 stars 173 forks source link

VM images versus cloud images #405

Open elasmo opened 3 years ago

elasmo commented 3 years ago

The distinguishment between VM images (vm image) and cloud images (vm img) is unclear and not explained in VM-BHYVE(8) and somewhat confusing for an end-user.

Excerpt from VM-BHYVE(8)

...
     vm image list
     vm image create [-d description] [-u] name
     vm image provision [-d datastore] uuid new-name
     vm image destroy uuid
...
     image list
             List available images.  Any virtual machine can be packaged into
             an image, which can then be used to create additional machines.
...

Excerpt from README.md ... To launch FreeBSD using official cloud image:

# vm img https://download.freebsd.org/ftp/releases/VM-IMAGES/11.2-RELEASE/amd64/Latest/FreeBSD-11.2-RELEASE-amd64.raw.xz
# vm create -t freebsd-zvol -i FreeBSD-11.2-RELEASE-amd64.raw freebsd-cloud
# vm start freebsd-cloud

To list downloaded images:

# vm img
DATASTORE           FILENAME
default             CentOS-7-x86_64-GenericCloud-20180930_02.raw
default             debian-9-openstack-amd64.qcow2

...

Ofloo commented 2 years ago

Also there seems to be an option running vm create -C -k that assigns to add a public key from what I can tell all it does is make a cdrom image with the supplied public key in a file called user_data.

Is there anything that it supposed to be doing? Can't seem to find any documentation on that in the man page nor on vm img.

Also -C -k -n flag are missing from the man mages. For vm create maybe I'm missing something

afbeelding

vm img isn't in there at all. At least for me. Installed vm-bhyve from pkg version is 1.5.0

elasmo commented 2 years ago

@Ofloo The cdrom image is used by cloud-image typically bundled with cloud images. It makes it possible to ssh into the guest without manually adding the key to an authorized_keys file or by using ssh-copy-id. Please, use the master branch while considering open issues here. Issues existing in the package version are likely to be fixed, and new functionality added.