From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 2/3] proxinstall: check hvm support through runtime env info
Date: Mon, 3 Jul 2023 09:34:59 +0200 [thread overview]
Message-ID: <20230703073500.290868-3-c.heiss@proxmox.com> (raw)
In-Reply-To: <20230703073500.290868-1-c.heiss@proxmox.com>
As that info is now available through the runtime environment info, use
it and avoid duplicating logic.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
proxinstall | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/proxinstall b/proxinstall
index 274f39c..d5b2565 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1583,14 +1583,11 @@ sub create_intro_view {
"See 'System Requirements' in the $iso_env->{cfg}->{fullname} documentation.");
}
- if ($iso_env->{product} eq 'pve') {
- my $cpuinfo = eval { file_read_all('/proc/cpuinfo') };
- if (!$cpuinfo || $cpuinfo !~ /^flags\s*:.*(vmx|svm)/m) {
- Proxmox::UI::error(
- "No support for hardware-accelerated KVM virtualization detected.\n\n"
- ."Check BIOS settings for Intel VT / AMD-V / SVM."
- );
- }
+ if ($iso_env->{product} eq 'pve' && !$run_env->{hvm_supported}) {
+ Proxmox::UI::error(
+ "No support for hardware-accelerated KVM virtualization detected.\n\n"
+ ."Check BIOS settings for Intel VT / AMD-V / SVM."
+ );
}
Proxmox::UI::display_html('license.htm', sub {
--
2.40.1
next prev parent reply other threads:[~2023-07-03 7:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 7:34 [pve-devel] [PATCH installer 0/3] export hvm support flag through runtime env Christoph Heiss
2023-07-03 7:34 ` [pve-devel] [PATCH installer 1/3] run env: add hardware-accelerated virtualization support flag Christoph Heiss
2023-07-03 7:34 ` Christoph Heiss [this message]
2023-07-03 7:35 ` [pve-devel] [PATCH installer 3/3] tui: check hvm support through runtime env info instead of open-coding Christoph Heiss
2023-07-04 8:27 ` [pve-devel] [PATCH installer 4/4] d/control: drop unused librust-proxmox-sys-dev build dependency Christoph Heiss
2023-07-13 13:50 ` [pve-devel] applied-series: [PATCH installer 0/3] export hvm support flag through runtime env Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230703073500.290868-3-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox