mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 21:14:59 +00:00
pve-bridge: use enviroment variable PVE_MIGRATED_FROM
We use environment variable to pass additional information the the network script.
This commit is contained in:
parent
7e8dcf2cb0
commit
d691e6d3ec
@ -2735,6 +2735,9 @@ sub vm_start {
|
||||
|
||||
my $defaults = load_defaults();
|
||||
|
||||
# set environment variable useful inside network script
|
||||
$ENV{PVE_MIGRATED_FROM} = $migratedfrom if $migratedfrom;
|
||||
|
||||
my ($cmd, $vollist) = config_to_command($storecfg, $vmid, $conf, $defaults, $migrate_uri);
|
||||
# host pci devices
|
||||
for (my $i = 0; $i < $MAX_HOSTPCI_DEVICES; $i++) {
|
||||
|
@ -15,7 +15,9 @@ die "got strange interface name '$iface'\n"
|
||||
my $vmid = $1;
|
||||
my $netid = "net$2";
|
||||
|
||||
my $conf = PVE::QemuServer::load_config ($vmid);
|
||||
my $migratedfrom = $ENV{PVE_MIGRATED_FROM};
|
||||
|
||||
my $conf = PVE::QemuServer::load_config($vmid, $migratedfrom);
|
||||
|
||||
die "unable to get network config '$netid'\n"
|
||||
if !$conf->{$netid};
|
||||
|
Loading…
Reference in New Issue
Block a user