-
-
Notifications
You must be signed in to change notification settings - Fork 11
new_vm_image
- A FreeBSD host
- A bhyvemgr ready to run
- A minimal or optimal network configuration used by bhyvemgr. Take a look at network configuration guide
There are two ways to add a new virtual machine to bhyvemgr: Click on Add button or right click over a Virtual machines category like BSD, Linux, Windows or Other. Choose one of them to create your first virtual machine.
From Initial configuration, select the option Create a virtual disk from image. A virtual disk from image will be used and a new Image tab will show.
Now, you can download an image or select it from local disk. The best is use a cloud-init/nuageinit support image because it can be customized on first boot time. Take on mind that only img.xz, raw.xz, qcow2.xz, qcow2, img, and raw files are supported to download and raw image is supported to select it from a local disk.
If you are using a cloud-init/nuageinit support image, you have two options for configure the image: minimal configuration or files configuration. If you use minimal configuration, you can select and put minimal settings to be applied to the virtual machine image.
If you want to use files configuration, you can use user-data, meta-data and network-config files for a more advanced image settings. Custom changes will depend on content that you put inside of these files.
You can keep %%UUID%% and %%HOSTAME%% inside of them as you can look at samples directory. Also, you can keep %%MACADDRESS%%, %%GATEWAY4%%, %%IP4ADDRESS%%, and %%DNS4SERVERS%% wildcards inside of network-config file.
They will be replaced with virtual machine values depending on selected options.
Optionally, you can defined IPv4 addresss. It is useful when you want to assign directly an static IPv4 address to your virtual machine.
When it is done, you can click on Create Virtual Machine button.
The virtual machine will be created with some Global settings default values, but you can change them before of start it. The same way, the virtual machine will include minimal devices needed to run it. If you want, you can add new ones or modify them. I will change disk size to 30G.
If every changes are done, you can start the virtual machine click on Start button. Cloud-init or nuageinit service will apply changes on first boot time.
By default, vnc support is enabled to connect a vnc client to the virtual machine. Take a look at fbuf device from Device settings.
Bhyvemgr can use remote-viewer for vnc connection. It works even when fbuf device includes a vnc password session.
Otherwise, you can connect from console to the new virtual machine althrought of nmdm device. By default a com1 interface is attached to lpc device.
# cu -l /dev/nmdm-freebsd16.1B
When the first boot time is done, your virtual machine is ready to use. Try connect to it using your ssh public key and doas.
- If you have issues running a virtual machine, you can obtain useful information from bhyvemgr log file. Bhyvemgr save a log file to ~/.config/bhyvemgr/bhyvemgr.log
- An image without cloud-init or nuageinit support can be used, but no changes will be applied to it. Generally this kind of images only includes a dhcp client configuration and it has defined an user/pass by default.