hashicorp / hashicorp/nomad-driver-virt

Add support for external DNS/Static IPs, as well as bridged adapters other than virbr0

Open
#97 0 comments 1 reaction 0 assignees View on GitHub
stage/needs-investigation theme/bootstrap theme/network type/enhancement
Dominant language
Go
Stars
32
Forks
9
Avg merge
1d 10h
Merged PRs (30d)
11

Description

Many networks have external IPAM and/or DHCP servers to hand out IP addresses for VMs.

It would be great if a non-libvirt managed DHCP server could be used with Nomad's Virt driver.

Ideally, Nomad could use the builtin capability for qemu-agent to execute and return information from the guest's network adapters.

This method would enable almost universal support for different network configurations, like static IPs retrieved from an IPAM solution like Netbox/Infoblox, and enable bridged adapters other than the libvirt managed `virbr0`.

It would require qemu-guest-agent package to be installed inside the guest VM.

Example:
`virsh qemu-agent-command virt-task-4930bb25 '{"execute":"guest-network-get-interfaces"}' | jq .`

This returns JSON which could be parsed by Nomad:
```
{
"return": [
{
"name": "lo",
"ip-addresses": [
{
"ip-address-type": "ipv4",
"ip-address": "127.0.0.1",
"prefix": 8
},
{
"ip-address-type": "ipv6",
"ip-address": "::1",
"prefix": 128
}
],
"statistics": {
"tx-packets": 1875360,
"tx-errs": 0,
"rx-bytes": 133160856,
"rx-dropped": 0,
"rx-packets": 1875360,
"rx-errs": 0,
"tx-bytes": 133160856,
"tx-dropped": 0
},
"hardware-address": "00:00:00:00:00:00"
},
{
"name": "enp0s5",
"ip-addresses": [
{
"ip-address-type": "ipv4",
"ip-address": "10.14.30.29",
"prefix": 24
},
{
"ip-address-type": "ipv6",
"ip-address": "redacted",
"prefix": 64
}
],
"statistics": {
"tx-packets": 958693,
"tx-errs": 0,
"rx-bytes": 439869753,
"rx-dropped": 176893,
"rx-packets": 1563633,
"rx-errs": 0,
"tx-bytes": 80836052,
"tx-dropped": 0
},
"hardware-address": "redacted"
}
]
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the Virt driver's existing libvirt networking path, especially its reliance on virbr0, and review the qemu-agent guest-network-get-interfaces command shown in the issue. Define how external DHCP or IPAM, static addresses, and other bridged adapters should be represented and verified; done means these network configurations work through the driver.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
infrastructure, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.