esxi: warn if the guest was running
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
aba709f247
commit
1128100569
@ -751,6 +751,7 @@ __PACKAGE__->register_method({
|
||||
description => 'What this warning is about.',
|
||||
enum => [
|
||||
'cdrom-image-ignored',
|
||||
'guest-is-running',
|
||||
'nvme-unsupported',
|
||||
'ovmf-with-lsi-unsupported',
|
||||
'serial-port-socket-only',
|
||||
|
||||
@ -903,6 +903,7 @@ sub get_create_args {
|
||||
|
||||
my $storeid = $self->storeid;
|
||||
my $manifest = $self->manifest;
|
||||
my $vminfo = $manifest->vm_for_vmx_path($self->vmx_path);
|
||||
|
||||
my $create_args = {};
|
||||
my $create_disks = {};
|
||||
@ -1052,6 +1053,8 @@ sub get_create_args {
|
||||
++$serid;
|
||||
});
|
||||
|
||||
$warn->('guest-is-running') if defined($vminfo) && ($vminfo->{power}//'') ne 'poweredOff';
|
||||
|
||||
return {
|
||||
type => 'vm',
|
||||
source => 'esxi',
|
||||
|
||||
Reference in New Issue
Block a user