mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-03 09:58:29 +00:00
Use methods from PVE::QemuConfig
use config_file and load_config from PVE::QemuConfig
This commit is contained in:
parent
a9f712828d
commit
7141ae254a
@ -25,6 +25,7 @@ use PVE::APLInfo;
|
||||
use PVE::Report;
|
||||
use PVE::HA::Env::PVE2;
|
||||
use PVE::HA::Config;
|
||||
use PVE::QemuConfig;
|
||||
use PVE::QemuServer;
|
||||
use PVE::API2::Subscription;
|
||||
use PVE::API2::Services;
|
||||
@ -1193,7 +1194,7 @@ my $get_start_stop_list = sub {
|
||||
if ($d->{type} eq 'lxc') {
|
||||
$conf = PVE::LXC::Config->load_config($vmid);
|
||||
} elsif ($d->{type} eq 'qemu') {
|
||||
$conf = PVE::QemuServer::load_config($vmid);
|
||||
$conf = PVE::QemuConfig->load_config($vmid);
|
||||
} else {
|
||||
die "unknown VM type '$d->{type}'\n";
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ use PVE::INotify;
|
||||
use PVE::RPCEnvironment;
|
||||
use PVE::OpenVZ;
|
||||
use PVE::API2::OpenVZ;
|
||||
use PVE::QemuConfig;
|
||||
use PVE::QemuServer;
|
||||
use PVE::API2::Qemu;
|
||||
|
||||
@ -209,8 +210,8 @@ if ($cmd eq 'start') {
|
||||
ocf_log('info', "Move config for $status->{name} to local node");
|
||||
my ($oldconfig, $newconfig, $oldfiles, $newfiles);
|
||||
if ($status->{type} eq 'qemu') {
|
||||
$oldconfig = PVE::QemuServer::config_file($status->{vmid}, $status->{node});
|
||||
$newconfig = PVE::QemuServer::config_file($status->{vmid}, $nodename);
|
||||
$oldconfig = PVE::QemuConfig->config_file($status->{vmid}, $status->{node});
|
||||
$newconfig = PVE::QemuConfig->config_file($status->{vmid}, $nodename);
|
||||
} else {
|
||||
$oldconfig = PVE::OpenVZ::config_file($status->{vmid}, $status->{node});
|
||||
$newconfig = PVE::OpenVZ::config_file($status->{vmid}, $nodename);
|
||||
@ -349,7 +350,7 @@ if ($cmd eq 'start') {
|
||||
|
||||
my $oldconfig;
|
||||
if ($status->{type} eq 'qemu') {
|
||||
$oldconfig = PVE::QemuServer::config_file($status->{vmid}, $status->{node});
|
||||
$oldconfig = PVE::QemuConfig->config_file($status->{vmid}, $status->{node});
|
||||
$upid = PVE::API2::Qemu->migrate_vm($params);
|
||||
} else {
|
||||
$oldconfig = PVE::OpenVZ::config_file($status->{vmid}, $status->{node});
|
||||
|
Loading…
Reference in New Issue
Block a user