File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
src/platform/backends/hyperv Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -455,14 +455,8 @@ void mp::HyperVVirtualMachine::update_state()
455
455
// Invalidate the management IP address on state update.
456
456
if (current_state () == VirtualMachine::State::running)
457
457
{
458
- // The reason "why" is as follows:
459
- // - The daemon starts and constructs the VM
460
- // - The mgmt IP address gets cached on the first invocation of management_ipv4()
461
- // - `multipass restart` initiates a guest reboot with "sudo reboot"
462
- // - It's an "out-of-band" reboot in perspective of Hyper-V backend since
463
- // it does not trigger the "on_restart" function afterwards.
464
- // - The cached "vm->ip address is not reset
465
- // - management_ipv4() continues to report the stale IP address from the previous boot
458
+ // Cached IPs become stale when the guest is restarted from within. By resetting them here
459
+ // we at least cover multipass's restart initiatives, which include state updates.
466
460
mpl::log (mpl::Level::debug,
467
461
vm_name,
468
462
" Invalidating cached mgmt IP address upon state update" );
You can’t perform that action at this time.
0 commit comments