Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9e2c7e5
Add explanations re:Storage Repositories to the Xen-API overview
shindere Jul 17, 2026
e730da0
CA-430085: Fix vncsnapshot 500 error
cplaursen Jul 28, 2026
115bd59
[ci] Don't use timedatectl to set timezone in actions
changlei-li Jul 31, 2026
8cf7f83
[ci] Don't use timedatectl to set timezone in actions (#7203)
BengangY Jul 31, 2026
4eb841c
CA-430085: Fix vncsnapshot 500 error (#7202)
cplaursen Jul 31, 2026
cc62cb3
xapi-rate-limit: Add auto-registered caller limit
cplaursen Jul 28, 2026
b3929f3
rate-limit: Only show caller groups in the RRDs
cplaursen Jul 29, 2026
11eeeb6
rate-limit: Improve debug messages when rate limit applied
cplaursen Jul 30, 2026
c1ea186
CA-430018: Fix mismatch between VGPU and PCI cards
freddy77 Jul 28, 2026
ae4d3ec
scripts/attach-static-vdis: Toggle nullglob to fix behavior on empty dir
last-genius Aug 3, 2026
b8779e0
Fix memory issues with caller rrd (#7201)
cplaursen Aug 3, 2026
b9114fd
xapi_globs: Remove unused code
last-genius Jul 21, 2026
d09606d
rate-limit: Add observers to rate limited calls
cplaursen Jul 14, 2026
f5c75e0
rate-limit: Add observers to rate limited calls (#7190)
cplaursen Aug 3, 2026
1100233
pygrub-wrapper: Drop the script, move logic into xenopsd
last-genius Aug 3, 2026
ac93801
CA-430018: Fix mismatch between VGPU and PCI cards (#7198)
cplaursen Aug 4, 2026
64be2ce
CP-314075: restore VDI.resize_online for online VDI resize
MarkSymsCtx Aug 4, 2026
4aaa358
CP-314075: allow reintroduction of removed lifecycle features
MarkSymsCtx Aug 6, 2026
610b848
pygrub misc cleanup (#7206)
minglumlu Aug 10, 2026
461ab30
CP-314075: restore VDI.resize_online for online VDI resize (#7211)
MarkSymsCtx Aug 10, 2026
cd53b06
Add explanations re:Storage Repositories to the Xen-API overview (#7101)
gthvn1 Aug 10, 2026
259c4cd
Update datamodel_lifecycle.ml after release v26.17.0
minglumlu Aug 11, 2026
72073f9
Update datamodel_lifecycle.ml after release v26.17.0 (#7215)
minglumlu Aug 11, 2026
b56692c
scripts/attach-static-vdis: Toggle nullglob to fix behavior on empty …
last-genius Aug 11, 2026
6d02ef6
Merge branch master into feature/lldp
changlei-li Aug 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/generate-and-build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
# isn't using UTC
- name: Set Timezone to Tokyo for datetime tests
run: |
sudo timedatectl set-timezone Asia/Tokyo
sudo ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

- name: Run CI for SDKs
uses: ./.github/workflows/sdk-ci
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
# isn't using UTC
- name: Set Timezone to Tokyo for datetime tests
run: |
sudo timedatectl set-timezone Asia/Tokyo
sudo ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

- name: Build Java SDK
shell: bash
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ install-extra:
install -D ./ocaml/xenopsd/scripts/xen-backend.rules $(DESTDIR)/$(ETCDIR)/udev/rules.d/xen-backend.rules
install -D ./ocaml/xenopsd/scripts/qemu-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/qemu-wrapper
install -D ./ocaml/xenopsd/scripts/swtpm-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/swtpm-wrapper
install -D ./ocaml/xenopsd/scripts/pygrub-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/pygrub-wrapper
DESTDIR=$(DESTDIR) SBINDIR=$(SBINDIR) QEMU_WRAPPER_DIR=$(QEMU_WRAPPER_DIR) XENOPSD_LIBEXECDIR=$(XENOPSD_LIBEXECDIR) ETCDIR=$(ETCDIR) ./ocaml/xenopsd/scripts/make-custom-xenopsd.conf

# common flags and packages for 'dune install' and 'dune uninstall'
Expand Down
33 changes: 28 additions & 5 deletions doc/content/xen-api/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,42 @@ The next step is to query the list of "templates" on the host. Templates are spe

Now that we have a snapshot of all the VM objects' field values in the memory of our client application we can simply iterate through them and find the ones that have their "`is_a_template`" set to true. At this stage let's assume that our example application further iterates through the template objects and remembers the reference corresponding to the one that has its "`name_label`" set to "Debian Etch 4.0" (one of the default Linux templates supplied with XenServer).

### Choosing a Storage Repository for the VM's disks

As mentioned above, templates generally embody software stored on
virtual disk images. Creating a VM from a template thus involves, in
particular, creating copies of the templates' disk images that will be
available for the VM to use.

These copies need to be stored somewhere and, in Xen-API
terminology, a place where **Virtual Disk Images** (VDIs) are stored is
called a **Storage Repository**.

Just as we had to list templates in order to choose one to use as a basis
for the VM, we need to list the available Storage Repositories and
pick one. We do so by calling `SR.get_all_records(session)`.

Let's assume this call returns a non-empty list of Storage
Repositories and choose one of them, whose reference is stored in
`my_sr_ref`. This reference will be used in the next step when
specifying where to store the VM's VDIs by default.

### Installing the VM based on a template

Continuing through our example, we must now install a new VM based on the template we selected. The installation process requires 4 API calls:
Continuing through our example, we now wanto to install a new VM based on the template we selected. The installation process requires 4 API calls:

- First we must now invoke the API call `VM.clone(session, t_ref, "my first VM")`. This tells the server to clone the VM object referenced by `t_ref` in order to make a new VM object. The return value of this call is the VM reference corresponding to the newly-created VM. Let's call this `new_vm_ref`.
- First we must invoke the API call `VM.clone(session, t_ref, "my first VM")`. This tells the server to clone the VM object referenced by `t_ref` in order to make a new VM object. The return value of this call is the VM reference corresponding to the newly-created VM. Let's call this `new_vm_ref`.

- Next, we need to specify the UUID of the Storage Repository where the VM's
disks will be instantiated. We have to put this in the `sr` attribute in
- Next, we need to specify the UUID of the Storage
Repository where the VM's disks will be stored by
default. We do so by putting `my_sr_ref` in the `sr` attribute in
the disk provisioning XML stored under the "`disks`" key in the
`other_config` map of the newly-created VM. This field can be updated by
calling its getter (`other_config <- VM.get_other_config(session,
new_vm_ref)`) and then its setter (`VM.set_other_config(session,
new_vm_ref, other_config)`) with the modified `other_config` map.

- At this stage the object referred to by `new_vm_ref` is still a template (just like the VM object referred to by `t_ref`, from which it was cloned). To make `new_vm_ref` into a VM object we need to call `VM.provision(session, new_vm_ref)`. When this call returns the `new_vm_ref` object will have had its `is_a_template` field set to false, indicating that `new_vm_ref` now refers to a regular VM ready for starting.
- At this stage the object referred to by `new_vm_ref` is still a template (just like the VM object referred to by `t_ref`, from which it was cloned). To make `new_vm_ref` into a VM object we need to call `VM.provision(session, new_vm_ref)`. When this call returns, the `new_vm_ref` object will have had its `is_a_template` field set to false, indicating that `new_vm_ref` now refers to a regular VM ready for starting.

> **Note**
>
Expand Down Expand Up @@ -94,6 +115,8 @@ We have seen how the API can be used to install a VM from a XenServer template a

- One call to query the VM (and template) objects present on the XenServer installation: `VM.get_all_records()`. Recall that we used the information returned from this call to select a suitable template to install from.

- One call to list the Storage Repositories: `SR.get_all_records()`.

- Four calls to install a VM from our chosen template: `VM.clone()`, followed
by the getter and setter of the `other_config` field to specify where to
create the disk images of the template, and then `VM.provision()`.
Expand Down
4 changes: 4 additions & 0 deletions ocaml/idl/datamodel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5464,6 +5464,10 @@ module VDI = struct
, rel_inverness
, "Online VDI resize is not supported by any of the storage backends."
)
; ( Published
, "26.16.1-next"
, "Reintroduced to allow online resize of a VDI whose SR supports it"
)
]
~params:
[
Expand Down
5 changes: 5 additions & 0 deletions ocaml/idl/datamodel_caller.ml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ let t =
"Rate limiter attached to this caller, if any. Populated via \
Rate_limit.add_caller rather than set directly."
~default_value:(Some (VRef null_ref))
; field ~qualifier:DynamicRO ~ty:Bool ~lifecycle "auto_registered"
"True if this caller was created automatically by the rate limiter \
rather than by an administrator. Auto-registered callers are \
subject to the max-auto-registered-callers cap."
~default_value:(Some (VBool false))
]
~messages:
[
Expand Down
2 changes: 1 addition & 1 deletion ocaml/idl/datamodel_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open Datamodel_roles
to leave a gap for potential hotfixes needing to increment the schema version.*)
let schema_major_vsn = 5

let schema_minor_vsn = 908
let schema_minor_vsn = 909

(* Historical schema versions just in case this is useful later *)
let rio_schema_major_vsn = 5
Expand Down
58 changes: 30 additions & 28 deletions ocaml/idl/datamodel_lifecycle.ml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
let prototyped_of_class = function
| "Rate_limit" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller" ->
Some "26.16.1-next"
Some "26.17.0"
| "Driver_variant" ->
Some "25.2.0"
| "Host_driver" ->
Expand All @@ -18,33 +18,35 @@ let prototyped_of_class = function

let prototyped_of_field = function
| "Rate_limit", "fill_rate" ->
Some "26.16.1-next"
Some "26.17.0"
| "Rate_limit", "burst_size" ->
Some "26.16.1-next"
Some "26.17.0"
| "Rate_limit", "callers" ->
Some "26.16.1-next"
Some "26.17.0"
| "Rate_limit", "name__description" ->
Some "26.16.1-next"
Some "26.17.0"
| "Rate_limit", "name__label" ->
Some "26.16.1-next"
Some "26.17.0"
| "Rate_limit", "uuid" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "auto_registered" ->
Some "26.17.0"
| "Caller", "rate_limit" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "groups" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "last_access" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "client_ip" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "user_agent" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "name__description" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "name__label" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "uuid" ->
Some "26.16.1-next"
Some "26.17.0"
| "Driver_variant", "status" ->
Some "25.2.0"
| "Driver_variant", "priority" ->
Expand Down Expand Up @@ -134,7 +136,7 @@ let prototyped_of_field = function
| "SM", "host_pending_features" ->
Some "24.37.0"
| "VIF", "trunks" ->
Some "26.16.0-next"
Some "26.17.0"
| "host", "timezone" ->
Some "26.0.0"
| "host", "ntp_custom_servers" ->
Expand Down Expand Up @@ -194,7 +196,7 @@ let prototyped_of_field = function
| "VM", "actions__after_softreboot" ->
Some "23.1.0"
| "pool", "auto_update_vm_secureboot_certificates" ->
Some "26.16.0-next"
Some "26.16.1"
| "pool", "vm_console_idle_timeout" ->
Some "26.1.0"
| "pool", "limit_console_sessions" ->
Expand Down Expand Up @@ -240,15 +242,15 @@ let prototyped_of_field = function

let prototyped_of_message = function
| "Rate_limit", "set_fill_rate" ->
Some "26.16.1-next"
Some "26.17.0"
| "Rate_limit", "set_burst_size" ->
Some "26.16.1-next"
Some "26.17.0"
| "Rate_limit", "remove_caller" ->
Some "26.16.1-next"
Some "26.17.0"
| "Rate_limit", "add_caller" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "query_all_usage" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "query_group_call_count" ->
Some "26.15.0"
| "Caller", "query_group_token_usage" ->
Expand All @@ -258,9 +260,9 @@ let prototyped_of_message = function
| "Caller", "query_token_usage" ->
Some "26.15.0"
| "Caller", "remove_group" ->
Some "26.16.1-next"
Some "26.17.0"
| "Caller", "add_group" ->
Some "26.16.1-next"
Some "26.17.0"
| "Driver_variant", "select" ->
Some "25.2.0"
| "Host_driver", "rescan" ->
Expand Down Expand Up @@ -312,11 +314,11 @@ let prototyped_of_message = function
| "VDI", "revert" ->
Some "26.16.0"
| "VIF", "set_trunks" ->
Some "26.16.0-next"
Some "26.17.0"
| "VIF", "remove_trunks" ->
Some "26.16.0-next"
Some "26.17.0"
| "VIF", "add_trunks" ->
Some "26.16.0-next"
Some "26.17.0"
| "host", "set_servertime" ->
Some "26.0.0"
| "host", "get_ntp_synchronized" ->
Expand Down
3 changes: 2 additions & 1 deletion ocaml/idl/datamodel_types.ml
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ module Lifecycle = struct
- The rest of the changes are not idempotent, they cannot be applied twice
in a row
- Objects can only be removed when are prototyped or deprecated
- A removed object can be published again, i.e. reintroduced
*)
let automaton =
{
Expand All @@ -528,7 +529,7 @@ module Lifecycle = struct
)
| (Published as into), _, _ -> (
function
| Unreleased_s | Prototyped_s ->
| Unreleased_s | Prototyped_s | Removed_s ->
Published_s
| from ->
raise_invalid_next ~from ~into
Expand Down
2 changes: 1 addition & 1 deletion ocaml/idl/schematest.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let hash x = Digest.string x |> Digest.to_hex
(* BEWARE: if this changes, check that schema has been bumped accordingly in
ocaml/idl/datamodel_common.ml, usually schema_minor_vsn *)

let last_known_schema_hash = "e5bb3f3b53e89a81d7a7fcee7ead9efe"
let last_known_schema_hash = "4f4145585a0be563e77b01220bf3f6af"

let current_schema_hash : string =
let open Datamodel_types in
Expand Down
Loading
Loading