Removed an extra slash at the end when setting the user home directory. This was causing unexpected behavior for other scrips as ~ was aliased to /opt/gns3/ instead of the expected /opt/gns3.
This caused an extra / to appear in commands unexpectedly.
Removed an extra slash at the end when setting the user home directory. This was causing unexpected behavior for other scrips as ~ was aliased to /opt/gns3/ instead of the expected /opt/gns3.
This caused an extra / to appear in commands unexpectedly.
When `--with-iou` and `--with-openvpn` are both enabled, hostname
were updated in `/etc/hostname` but not on the running system (only
changed after reboot). So the old hostname were used in MOTD and
client OpenVPN config URL.
Some cloud providers (example, AWS EC2 for non-metal instances) do not
support nested virtualization, as well as some hypervisors (example,
VirtualBox prior to 6.x, Hyper-V on AMD). Option `--without-kvm` can
be used to disable hardware acceleration in these scenarios. Otherwise,
user will receive error when trying to start Qemu-based devices.
Commit also: replace `enable_kvm` and `require_kvm` with newer config
options (`enable_hardware_acceleration` and
`require_hardware_acceleration`); and do some code refactors.
One can argue that, instead of prividing option `--without-kvm`, we
should check if system supports KVM and enable/disable hardware
acceleration accordingly. However, there is the case when the
hypervisor supports nested virtualization, but feature is just disabled.
The chosen approach for this case is to keep KVM enabled and let user
known (user will eventually receive an error) so user can fix it.
Otherwise, user might never know and suffer from performance
degradation.