Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Featurerequest: Importing small VM's from img or iso disk image #365

Closed
Doralitze opened this issue Dec 14, 2018 · 5 comments
Closed

Featurerequest: Importing small VM's from img or iso disk image #365

Doralitze opened this issue Dec 14, 2018 · 5 comments

Comments

@Doralitze
Copy link

Mandatory info for bug reports:
It would be a nice feature if one would be able to create / import VM's giving a hard drive dump (as .img of .iso file for example) in order to test firmware images.

FreeBSD version ( uname -a ):
FreeBSD case.nobreakspace.org 11.2-RELEASE-p4 FreeBSD 11.2-RELEASE-p4 #0: Thu Sep 27 08:16:24 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

CBSD version ( cbsd version ):
11.2.1

@olevole
Copy link
Member

olevole commented Dec 14, 2018

Can you explain what “hard drive dump” means? what exactly is it created and what is the format? maybe some real life example of this case?

@Doralitze
Copy link
Author

Hard drive dump means a file of the follwing format (a real live firmware build): https://luebeck.freifunk.net/firmware/0.9.5/sysupgrade/gluon-ffhl-0.9.5-x86-generic-sysupgrade.img.gz

It is created by a couple of automatic build scripts but could be obtained by attaching the flash of a device and using dd. For example (after flashing the device) the following command would result in the same file:

# dd if=/dev/sda of=/tmp/ff-image.img

A different use case (not required by us but by many others) of such a feature would be downloading an disk image on any popular distribution website and using that specific image in order to not being required to execute the installer before testing or creating a VM from a real machine.

@T-X
Copy link

T-X commented Feb 21, 2019

Commonly, the format would be a Master Boot Record (MBR). So executing the loader in the according section in an MBR of an image. Ideally, even UEFI booting would be supported.

By skimming some webpages briefly it seems that bhyve is supposed to be able to boot a UEFI image? At least here seems to be an example which uses and selects a UEFI bootrom capable of booting an image in UEFI format: https://wiki.freebsd.org/bhyve/UEFI

Could cbsd make use of this? (Or is this maybe supported already and we only have a misunderstanding? Booting an image file seems like a quite common usage for virtualization?)

@olevole
Copy link
Member

olevole commented Feb 21, 2019

By skimming some webpages briefly it seems that bhyve is supposed to be able to boot a UEFI image? At least here seems to be an example which uses and selects a UEFI bootrom capable of booting an image in UEFI format: https://wiki.freebsd.org/bhyve/UEFI

Could cbsd make use of this?

Currently, CBSD supports UEFI- ONLY boot method for some reason.
Details: #323

@olevole
Copy link
Member

olevole commented May 29, 2019

Take a look on cloud-init support: https://www.bsdstore.ru/en/12.0.x/wf_bhyve_cloudinit_ssi.html
Use latest CBSD for that

@olevole olevole closed this as completed May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants