Skip to content

Commit

Permalink
Don't use localhost as default source for PXE installation
Browse files Browse the repository at this point in the history
  • Loading branch information
skobyda committed Sep 4, 2023
1 parent 8873d42 commit e917953
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/create-vm-dialog/pxe-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ export function getPXEInitialNetworkSource(nodeDevices, virtualNetworks) {
virtualNetworks
);

// Don't use localhost as default PXE source
const source = netNodeDevices.find(dev => dev.capability.interface !== "lo");

if (netNodeDevices.length > 0)
return cockpit.format('type=direct,source=$0,source.mode=bridge', netNodeDevices[0].capability.interface);
return cockpit.format('type=direct,source=$0,source.mode=bridge', source.capability.interface);
}

/**
Expand Down

0 comments on commit e917953

Please sign in to comment.