1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
Commit graph

108 commits

Author SHA1 Message Date
catborise
479faaa4ca fix(instances): allow editing disks that have no driver format
A disk without driver/@type could not be edited: the empty format was
rejected, and edit_disk would have written type=''. An empty format is
now accepted and edit_disk leaves the type attribute out.
2026-10-02 23:58:55 +03:00
catborise
9205e56e3b fix(instances): change a disk's bus without rebuilding it as a file disk
The edit_volume bus change detached the disk and attached a new one built
as a file disk, so block and rbd disks lost their source and auth, and a
failed attach left the disk detached. Add wvmInstance.change_disk_bus,
which reuses the disk element and only changes <target> (dropping the old
bus address), and re-attaches the original disk if attaching fails.

edit_disk also rebuilt every disk with <source file=...>; it now keeps the
existing <source> and <auth> of block and network disks.
2026-10-02 23:06:42 +03:00
catborise
8a3ee13b41 fix(instances): restrict disk views to superusers and validate disk input
Disk and media mutation views (add_new_vol, add_existing_vol, edit_volume,
delete_vol, detach_vol, add_cdrom, detach_cdrom, mount_iso, unmount_iso)
were reachable by any owner with is_change, although the UI only shows the
Disk tab to superusers. An ordinary user could delete any volume on the
compute or attach arbitrary host files to their VM.

- Require superuser for all disk/media views, matching the UI.
- delete_vol resolves the volume from the VM's own disk XML by dev and
  ignores the posted storage/name.
- Validate bus/cache/io/discard/detect_zeroes against the hypervisor's
  lists, and format/serial/volume name against strict patterns.
- add_existing_vol only accepts volumes that exist in the selected pool.
- edit_volume only accepts a dev attached to the VM.
- vrtManager: escape all values interpolated into disk XML and pass dev
  as an XPath variable in detach_disk/edit_disk.
2026-10-02 17:11:12 +03:00
catborise
30c436ecde fix(snapshot): preserve loader XML during snapshot operations 2026-09-28 14:55:24 +03:00
catborise
5e240236c3 feat(security): harden storage uploads and vrtManager snapshot XML handling 2026-09-27 13:28:17 +03:00
fangebee
8c4f1d9fe8
Workaround issue #663
do not confuse a network volume with a network interface
2025-03-13 18:17:21 +01:00
catborise
56c92d90b5 fix show snapshot exist indicator 2023-08-23 09:26:39 +03:00
cserma
da9fbeaff4 refresh instance pools implementation 2023-04-27 16:04:43 +03:00
catborise
71f05089f6 experimental: external snapshot fixes 3 2023-04-24 14:38:51 +03:00
catborise
f4aa925e2a experimental: external snapshot fixes 2 2023-04-14 16:11:13 +03:00
catborise
33d49a68a7 experimental: external snapshot fixes 2023-04-13 12:25:42 +03:00
cserma
68b0494350 external snapshot logs and bug fixes 2023-04-13 12:25:42 +03:00
cserma
fd6b2ec4bf external snapshot implementation 2023-04-13 12:25:42 +03:00
herengui
fea1571e1a The storage pool path should be allowed to contain '-' and '_'
Signed-off-by: herengui <herengui@uniontech.com>
2022-11-15 17:19:03 +08:00
catborise
a1eab70e2d reorg imports and black format 2022-11-02 16:05:41 +03:00
catborise
217e106c8b format python code with black 2022-11-02 08:54:35 +03:00
catborise
c9f1a7d7c5 add description to snapshots. Stress out live snapshot risks 2022-09-19 15:44:57 +03:00
catborise
f500d44492 Optimize snapshot capabilities to snap UEFI type machines. by @qrwitu 2022-08-23 15:24:00 +03:00
catborise
cfce71ec2b
Rest framework (#24)
* Add rest framework for API: First Commit

* modify some shell scripts to make variable references safer; modify some python scripts to reduce the code complexity and cyclomatic complexity of functions.

* Add REST API for some webvirtcloud functions. Instance list/delete/create, compute list/delete/create, storages-network list/retrieve. Add swagger and redoc for API interface

* update requirements

Co-authored-by: herengui <herengui@uniontech.com>
2022-08-22 15:12:33 +03:00
Gaëtan Ferez
65dce10ce1 Implement Libvirt Serial Console as Console on WebVirtCloud 2022-07-17 13:25:47 +02:00
catborise
c77e049e82 add rbd support for add new/existing vol. create from rbd based flavor 2021-12-16 11:03:03 +03:00
catborise
fa4a3149c9 fix network add and change methods to handle bridge/mavctap differentation correctly. 2021-02-12 16:06:12 +03:00
catborise
d30e6470e2 Add guest info like:hostname,os,version,kernel. indendation fixes 2020-12-17 14:29:07 +03:00
catborise
508e3609be lint with black python. convert f style strings to old one. some small fixes 2020-11-05 12:34:31 +03:00
catborise
922a8e62d1 fix some linter warnings 2020-09-25 15:57:17 +03:00
catborise
015719b952 add macvtap support : create macvtap virtual net, add/edit instance network for macvtap 2020-07-23 13:36:49 +03:00
catborise
46884304b0 fix macvtap network list 2020-07-23 13:36:36 +03:00
catborise
84a545dc61 fix divide remainder error for memory resize etc 2020-07-20 12:10:30 +03:00
catborise
74028f35b8 fix console keymap auto related error 2020-07-20 12:00:01 +03:00
Real-Gecko
47009d47ca Instances overhaul 2020-07-13 15:33:09 +06:00
catborise
7538ddab4f Add all settings to appsettings page & Convert settings choices 2020-06-04 12:32:00 +03:00
catborise
a93f8b3321 convert strings to python3 f-Strings 2020-06-04 11:37:01 +03:00
catborise
e72073fa79 fix setting title/description function (xml -> lxml) 2020-06-04 08:50:17 +03:00
catborise
22cb8f702a fix code conventions for pylint 2020-06-04 08:48:43 +03:00
catborise
4d40de1b55 Python3 & Django 2.2 Migration - Fix & Updates 2020-03-16 16:59:45 +03:00
catborise
57665c2ab9 add cdrom to instance errors fixed. make cdrom readonly, disable cache. 2020-01-22 14:48:48 +03:00
catborise
c62e6ba3bc Add changing option of network model. Show model on instance network list 2020-01-10 17:55:42 +03:00
catborise
8b9fe4e887 rearrange instance network to show ipv4 and ipv6 address. Add capability to show all ip address not one of them. Add ipv4 address to instance summary 2020-01-10 15:28:09 +03:00
catborise
f2ba2b58b0 Add editing disk capability to instance. Add instance disk options like io, discard, detect zeroes. rewrite detach disk 2020-01-08 11:28:46 +03:00
catborise
38054d9882 for instances add guest agent indicator: installed, connected. 2019-12-25 14:36:43 +03:00
catborise
9d58e56d16 add/remove guest agent channel function added 2019-12-24 17:19:11 +03:00
catborise
ecf31b0b5b adds link state option for instance networks. Enable/disable link while instance running 2019-12-24 14:54:04 +03:00
catborise
592112590c add ability to show interface's ip address with qemu agent. Add checking agent if installed or not 2019-12-23 15:48:11 +03:00
catborise
2fa5a98844 Add new options for migrate: Auto converge, postcopy and compress 2019-12-19 16:06:51 +03:00
catborise
6634207ef5 Add nvram clone, rewrite instance migration, add some helper functions 2019-12-19 13:47:07 +03:00
catborise
28b001e7cb Add capability to remove UEFI instances: Add option for NVRAM delete 2019-12-13 16:40:59 +03:00
catborise
49e179590e adding enable/disable cpu hotplug, live add/remove vcpu to instance. 2019-11-29 14:48:24 +03:00
catborise
74eb8004d7 changing video card model functionality added to options. 2019-11-20 16:24:01 +03:00
catborise
ddd3dd5f65 instance network revamped. Qos config for instance net is added 2019-11-20 08:37:59 +03:00
catborise
f3f4f0afe8 Fix typos. Code Inspection for pep8 conventions 2019-10-30 11:05:50 +03:00