Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for building a custom libvirt Vagrant box for the generic linux device by wiring it into the existing netlab libvirt package workflow and documenting the procedure.
Changes:
- Add NoCloud (
cloud-init) ISO contents for thelinuxdevice (meta-data+user-datatemplate). - Enable box-building for
linuxinnetsim/devices/linux.ymlviacreate_image,create_template, andcreate_iso. - Extend documentation to describe building custom Linux boxes and link it from the libvirt lab index.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| netsim/install/libvirt/linux/user-data.j2 | New cloud-init user-data template used when building a Linux libvirt Vagrant box. |
| netsim/install/libvirt/linux/meta-data | New NoCloud meta-data file used to build the bootstrap ISO. |
| netsim/devices/linux.yml | Enables netlab libvirt package linux by defining create_* settings for libvirt packaging. |
| docs/labs/linux.md | Documents the custom Linux Vagrant box build workflow. |
| docs/labs/libvirt.md | Adds a link to the new Linux box-building documentation. |
Comments suppressed due to low confidence (1)
netsim/install/libvirt/linux/user-data.j2:24
- Inside the
vagrantuser definition,ssh_authorized_keyslist items are not indented under the key (the-entries need to be further indented). This makes the YAML invalid and will break cloud-init processing of the user config.
lock_passwd: true
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN1YdxBpNlzxDqfJyw/QKow1F+wvG9hXGoqiysfJOn5Y vagrant insecure public key
Comment on lines
+8
to
+10
| ssh_authorized_keys: | ||
| - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key | ||
| - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN1YdxBpNlzxDqfJyw/QKow1F+wvG9hXGoqiysfJOn5Y vagrant insecure public key |
Comment on lines
+15
to
+21
| # Create Vagrant user with disabled password | ||
| - name: vagrant | ||
| plain_text_passwd: vagrant | ||
| doas: ["permit nopass vagrant"] | ||
| sudo: ["ALL=(ALL) NOPASSWD:ALL"] | ||
| shell: /bin/sh | ||
| lock_passwd: true |
Comment on lines
+4
to
+6
| ssh_pwauth: true | ||
| disable_root: false | ||
| datasource_list: [ NoCloud, None ] |
| ssh_pwauth: true | ||
| disable_root: false | ||
| datasource_list: [ NoCloud, None ] | ||
| ssh_pwauth: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.