Skip to content

Conversation

@phip1611
Copy link
Member

@phip1611 phip1611 commented Sep 25, 2025

Building on the foundations merged as part of #7281, we can now easily support live-migration support for virtio-net devices and external FDs.

Part of #7291. Closes #7054

Steps to Undraft

@phip1611 phip1611 requested a review from a team as a code owner September 25, 2025 10:34
@phip1611
Copy link
Member Author

phip1611 commented Sep 25, 2025

ping @posk-io @alyssais might be interesting to you

@phip1611 phip1611 force-pushed the productize-net-fd-migration branch from e0fd975 to 7780730 Compare September 25, 2025 10:36
@phip1611 phip1611 changed the title vmm: migration: add external fd support fort virtio-net vmm: migration: add external fd support for virtio-net Sep 25, 2025
@phip1611 phip1611 force-pushed the productize-net-fd-migration branch from 7780730 to 3640817 Compare September 25, 2025 10:38
@phip1611 phip1611 changed the title vmm: migration: add external fd support for virtio-net vmm: migration: virtio-net devices with external FDs Sep 25, 2025
if let Some(cfgs) = &mut net_cfg.net_fds {
let mut cfgs = cfgs.iter_mut().collect::<Vec<&mut _>>();
let cfgs = cfgs.as_mut_slice();
attach_fds_to_cfgs(files, cfgs)?;
Copy link
Member Author

@phip1611 phip1611 Sep 25, 2025

Choose a reason for hiding this comment

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

btw: this single line is the reason why we merged #7281 - one common single abstraction (attach_fds_to_cfgs) - lovely!

@phip1611 phip1611 force-pushed the productize-net-fd-migration branch from 3640817 to 2dcc552 Compare September 25, 2025 15:45
@phip1611 phip1611 marked this pull request as draft September 25, 2025 15:45
@phip1611 phip1611 changed the title vmm: migration: virtio-net devices with external FDs [WIP] vmm: migration: virtio-net devices with external FDs Sep 25, 2025
}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This block doesn't look like it does anything other than increase the indentation level.

existing_memory_files.take(),
)?);

// TODO: add something like self.vm_config.apply_fds()?
Copy link
Member

Choose a reason for hiding this comment

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

Are there other places we already have code like this, or not yet?

if net_config.id == Some(net.id.clone())
&& net_config.fds.is_some()
{
net_config.fds.clone_from(&net.fds);
Copy link
Member

Choose a reason for hiding this comment

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

We could consume receive_data_migration.net_fds and avoid a clone, right? (Not that it's a big deal.)

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, this originates from early quick and dirty prototyping. Already fixed locally (not pushed yet)

@phip1611
Copy link
Member Author

phip1611 commented Oct 23, 2025

I’ll try to finish this next week. For some reason I don’t yet understand, it’s failing our internal test suite. Hopefully I can track down the bug quickly next week.

Postponed until #7431 is resolved and we agreed on a strategy.

@phip1611
Copy link
Member Author

Not urgent - we wait a little here because of #7431

@phip1611 phip1611 closed this Nov 11, 2025
@phip1611 phip1611 deleted the productize-net-fd-migration branch November 25, 2025 13:07
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.

Support Live Migration of VMs using Network Interfaces configured with explicit Net FDs

2 participants