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

Refactor VM networking #290

Merged
merged 1 commit into from
Oct 5, 2023
Merged

Refactor VM networking #290

merged 1 commit into from
Oct 5, 2023

Conversation

unbel13ver
Copy link
Contributor

Introduce new naming pattern for VMs
All VMs' names/hostnames are created using '-vm' pattern. All VMs' network interfaces named using
'tap-' pattern. NetVM's bridge is configured to include all 'tap-
' interfaces.
This approach makes no distinction between service VMs and application VMs, but it allows to easily guess the hostname without using a network toolkit.

*Introduce .ghaf local domain.
All VMs except of NetVM now get their IPs from NetVM's DHCP server. The VMs are accessible by their hostnames with .ghaf postfix added, for instance, 'ssh gui-vm.ghaf'.

*All VMs use separate subnet from now on, which is different from the debug-subnet.

*The network configuration which is common for every VM is now extracted into the separate 'vm-networking.nix' file.

targets/lenovo-x1-carbon.nix Outdated Show resolved Hide resolved
targets/lenovo-x1-carbon.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@vilvo vilvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice work. This makes it much nicer to refer to VMs with their hostnames.
Please clarify netvm inbound ssh on -debug targets.
appvms renaming can be scoped out of this PR at your convenience.

@mikatammi
Copy link
Contributor

Please rebase

@unbel13ver unbel13ver force-pushed the hostnames branch 2 times, most recently from c435710 to 9e34c2b Compare October 2, 2023 08:54
@brianmcgillion
Copy link
Collaborator

sorry needs a rebase again to fix conflicts

*Introduce new naming pattern for VMs
All VMs' names/hostnames are created using '<vmname>-vm'
pattern. All VMs' network interfaces named using
'tap-<hostname>' pattern. NetVM's bridge is configured to
include all 'tap-*' interfaces.
This approach makes no distinction between service VMs and
application VMs, but it allows to easily guess the hostname
without using a network toolkit.

*Introduce .ghaf local domain.
All VMs except of NetVM now get their IPs from NetVM's DHCP
server. The VMs are accessible by their hostnames with .ghaf
postfix added, for instance, 'ssh gui-vm.ghaf'.

*All VMs use separate subnet from now on, which is different
from the debug-subnet.

*The network configuration which is common for every VM is now
extracted into the separate 'vm-networking.nix' file.

Signed-off-by: Ivan Nikolaenko <[email protected]>
@brianmcgillion brianmcgillion merged commit ed56b00 into tiiuae:main Oct 5, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

6 participants