0.10.2: driver ISO (virtio-win) in the create wizard, separate download row, docs

This commit is contained in:
Claw committed 2026-11-17 21:22:28 +01:00
1 parent d8bf6ff475
commit f4160054ab
6 files changed
+55 -11

No files matched your search

+37 -5
View File
@@ -36,6 +36,7 @@ if ($post) {
$img = (string)($_POST['image'] ?? '');
$switch = trim((string)($_POST['switch'] ?? ''));
$iso = vmm_safe_basename((string)($_POST['iso'] ?? ''));
$driverIso = vmm_safe_basename((string)($_POST['driver_iso'] ?? ''));
$autostart = isset($_POST['autostart']);
if (!vmm_valid_name($name)) {
@@ -76,6 +77,9 @@ if ($post) {
if ($iso !== '' && str_ends_with(strtolower($iso), '.iso')) {
$meta['iso'] = vmm_data_dir('.iso') . '/' . $iso;
}
if ($driverIso !== '' && str_ends_with(strtolower($driverIso), '.iso')) {
$meta['driver_iso'] = vmm_data_dir('.iso') . '/' . $driverIso;
}
if ($autostart) {
$meta['autostart'] = '1';
}
@@ -184,11 +188,39 @@ vmm_nav('create');
<?php endforeach; ?>
</select>
<label style="margin-left:10px;"><input type="checkbox" name="autostart" value="1"/> <?=gettext('start right after create');?></label>
<div style="margin-top:8px;">
<input type="text" name="iso_url" size="52" placeholder="https://.../debian-13-netinst.iso"/>
<button type="submit" class="formbtn" name="act" value="download_iso"><?=gettext('Download ISO');?></button>
<a href="vmmngr_images.php" style="margin-left:8px;"><?=gettext('Images page');?></a>
</div>
</td>
</tr>
<tr>
<td class="celltag"><?=gettext('Driver ISO');?></td>
<td class="celldata">
<select name="driver_iso">
<option value=""><?=gettext('none');?></option>
<?php
$virtioCount = 0;
foreach ($isos as $i) {
if (stripos((string)$i['name'], 'virtio') !== false) {
$virtioCount++;
}
}
?>
<?php if ($virtioCount === 0): ?>
<option value="" disabled><?=gettext('no virtio ISO in .iso - download it on the Images page');?></option>
<?php endif; ?>
<?php foreach ($isos as $i): ?>
<?php if (stripos((string)$i['name'], 'virtio') === false) { continue; } ?>
<option value="<?=vmm_h((string)$i['name']);?>"><?=vmm_h((string)$i['name']);?></option>
<?php endforeach; ?>
</select>
<span style="opacity:.75;margin-left:8px;"><?=gettext('Windows: virtio-win ISO as second CD (drivers for disk/network).');?></span>
</td>
</tr>
<tr>
<td class="celltag"><?=gettext('Download ISO');?></td>
<td class="celldata">
<input type="text" name="iso_url" size="52" placeholder="https://.../debian-13-netinst.iso"/>
<button type="submit" class="formbtn" name="act" value="download_iso"><?=gettext('Download');?></button>
<a href="vmmngr_images.php" style="margin-left:8px;"><?=gettext('Images page');?></a>
<div style="opacity:.75;margin-top:4px;"><?=gettext('Downloads run as a job; reload the page afterwards to see the new file in the lists.');?></div>
</td>
</tr>
<tr>