[pve-devel] [PATCH manager] pve5to6: add check for nested kvm
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Jun 26 18:29:19 CEST 2019
On 6/26/19 2:25 PM, Fabian Grünbichler wrote:
> On Wed, Jun 26, 2019 at 12:34:55PM +0200, Dominik Csapak wrote:
>> this warns the user that he cannot live migrate VMs with svm/vmx to PVE6 when
>> the nested parameter of the kvm module is on
>>
>> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
>
> Tested (on Intel) + ACK
>
> check might be moved under MISC header instead of on its own though the
> running guests are also displayed there..
>
applied, albeit I'd maybe put it too in MISC header, it's not a thing
which a lot people will fall into, so while surely a good check to do,
it does not "deserves" it's own category (the more output here, the less
likely that people will see everything).
>> also for stable-5
>> PVE/CLI/pve5to6.pm | 25 +++++++++++++++++++++++++
>> 1 file changed, 25 insertions(+)
>>
>> diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm
>> index e5732681..43623652 100644
>> --- a/PVE/CLI/pve5to6.pm
>> +++ b/PVE/CLI/pve5to6.pm
>> @@ -111,6 +111,30 @@ sub check_pve_packages {
>> }
>> }
>>
>> +sub check_kvm_nested {
>> + print "\nCHECKING KVM NESTED PARAMETER\n\n";
>> + my $module_sysdir = "/sys/module";
>> + if (-e "$module_sysdir/kvm_amd") {
>> + $module_sysdir .= "/kvm_amd/parameters";
>> + } elsif (-e "$module_sysdir/kvm_intel") {
>> + $module_sysdir .= "/kvm_intel/parameters";
>> + } else {
>> + log_skip("no kvm module found");
>> + return;
>> + }
>> +
>> + if (-f "$module_sysdir/nested") {
>> + my $val = eval { PVE::Tools::file_read_firstline("$module_sysdir/nested") };
>> + if ($val && $val =~ m/Y|1/) {
>> + log_warn("KVM nested parameter set. VMs with vmx/svm flag will not be able to live migrate to PVE 6.");
>> + } else {
>> + log_pass("KVM nested parameter not set.")
>> + }
>> + } else {
>> + log_skip("KVM nested parameter not found.");
>> + }
>> +}
>> +
>> sub check_storage_health {
>> print "\nCHECKING CONFIGURED STORAGES\n\n";
>> my $cfg = PVE::Storage::config();
>> @@ -347,6 +371,7 @@ __PACKAGE__->register_method ({
>> my ($param) = @_;
>>
>> check_pve_packages();
>> + check_kvm_nested();
>> check_cluster_corosync();
>> check_ceph();
>> check_storage_health();
>> --
>> 2.20.1
>>
>>
>> _______________________________________________
>> pve-devel mailing list
>> pve-devel at pve.proxmox.com
>> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list