]>
git.proxmox.com Git - qemu-server.git/blob - PVE/API2/Qemu/Machine.pm
1 package PVE
::API2
::Qemu
::Machine
;
8 use PVE
::JSONSchema
qw(get_standard_option);
10 use PVE
::Tools
qw(file_get_contents);
12 use base
qw(PVE::RESTHandler);
14 __PACKAGE__-
>register_method({
19 description
=> "Get available QEMU/KVM machine types.",
24 additionalProperties
=> 0,
26 node
=> get_standard_option
('pve-node'),
33 additionalProperties
=> 1,
37 description
=> "Full name of machine type and version.",
41 enum
=> ['q35', 'i440fx'],
42 description
=> "The machine type.",
46 description
=> "The machine version.",
53 my $raw = file_get_contents
('/usr/share/kvm/machine-versions-x86_64.json');
54 return from_json
($raw, { utf8
=> 1 });
56 die "could not load supported machine versions - $@\n" if $@;