Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,3 +23,36 @@
UPDATE `cloud`.`guest_os` SET display_name='Fedora Linux (32 bit)' WHERE id=320;
UPDATE `cloud`.`guest_os` SET display_name='Mandriva Linux (32 bit)' WHERE id=323;
UPDATE `cloud`.`guest_os` SET display_name='OpenSUSE Linux (32 bit)' WHERE id=327;

-- Add support for SUSE Linux Enterprise Desktop 12 SP3 (64-bit) for Xenserver 8.1.0
INSERT INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (330, UUID(), 5, 'SUSE Linux Enterprise Desktop 12 SP3 (64-bit)', now());
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'SUSE Linux Enterprise Desktop 12 SP3 (64-bit)', 330, now(), 0);
-- Add support for SUSE Linux Enterprise Desktop 12 SP4 (64-bit) for Xenserver 8.1.0
INSERT INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (331, UUID(), 5, 'SUSE Linux Enterprise Desktop 12 SP4 (64-bit)', now());
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'SUSE Linux Enterprise Desktop 12 SP4 (64-bit)', 331, now(), 0);
-- Add support for SUSE Linux Enterprise Server 12 SP4 (64-bit) for Xenserver 8.1.0
INSERT INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (332, UUID(), 5, 'SUSE Linux Enterprise Server 12 SP4 (64-bit)', now());
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'SUSE Linux Enterprise Server 12 SP4 (64-bit)', 332, now(), 0);
-- Add support for Scientific Linux 7 for Xenserver 8.1.0
INSERT INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (333, UUID(), 9, 'Scientific Linux 7', now());
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'Scientific Linux 7', 333, now(), 0);
-- Add support for NeoKylin Linux Server 7 for Xenserver 8.1.0
INSERT INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (334, UUID(), 9, 'NeoKylin Linux Server 7', now());
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'NeoKylin Linux Server 7', 332, now(), 0);
-- Add support CentOS 8 for Xenserver 8.1.0
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'CentOS 8', 297, now(), 0);
-- Add support for Debian Buster 10 for Xenserver 8.1.0
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'Debian Buster 10', 292, now(), 0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shwstppr bitness (32/64-bit) missing for "Debian Buster 10" , mapping to guest os ids: 292 & 293 here ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sureshanaparti that is because there was no bitness mentioned in xcp-ng,

[16:25 xcp-ng1 ~]# xe template-list uuid ( RO) : 847f7f36-6da8-487d-940d-f0f06939a1b6
name-label ( RW): SUSE Linux Enterprise Desktop 12 SP4 (64-bit)
name-description ( RW): Template that allows VM installation from SLES-based distros. To use this template from the CLI, install your VM using vm-install, then watch the virtual display in XenCenter, and fill in the prompts.
uuid ( RO) : 4b6425be-728a-4a2c-8333-0aef209a348b
name-label ( RW): CentOS 8
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 552bce37-51b2-445d-84f2-5f33fa112d7e
name-label ( RW): Other install media
name-description ( RW): Template which allows VM installation from install media
uuid ( RO) : 4b116889-af64-42af-ba86-75dcb3cb7828
name-label ( RW): Scientific Linux 7
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 7774689b-4ca1-4dea-8545-dddd6b64c17f
name-label ( RW): Windows 10 (64-bit)
name-description ( RW): Clones of this template will automatically provision their storage when first booted and then reconfigure themselves with the optimal settings for Windows 10 (64-bit).
uuid ( RO) : 83af4ddb-e029-48ff-ba7a-11a23ff99caa
name-label ( RW): Windows Server 2012 (64-bit)
name-description ( RW): Clones of this template will automatically provision their storage when first booted and then reconfigure themselves with the optimal settings for Windows Server 2012 (64-bit).
uuid ( RO) : d986ea98-09fa-4e9a-9ee6-e6c78119496f
name-label ( RW): Windows Server 2019 (64-bit)
name-description ( RW): Clones of this template will automatically provision their storage when first booted and then reconfigure themselves with the optimal settings for Windows Server 2019 (64-bit).
uuid ( RO) : dda40663-76e5-45dd-a644-7eb0bed6a1f7
name-label ( RW): SUSE Linux Enterprise Desktop 12 SP3 (64-bit)
name-description ( RW): Template that allows VM installation from SLES-based distros. To use this template from the CLI, install your VM using vm-install, then watch the virtual display in XenCenter, and fill in the prompts.
uuid ( RO) : bac315b4-66fd-4488-82f5-9808e927b4b9
name-label ( RW): Debian Buster 10
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 9caee571-3b07-4673-940d-1d687b2818d6
name-label ( RW): Windows 10 (32-bit)
name-description ( RW): Clones of this template will automatically provision their storage when first booted and then reconfigure themselves with the optimal settings for Windows 10 (32-bit).
uuid ( RO) : f873abe0-b138-4995-8f6f-498b423d234d
name-label ( RW): Oracle Linux 7
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 094706dd-5d22-4830-99b7-c710769c9dcc
name-label ( RW): CoreOS
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 11c46476-bd5c-4d75-9cf0-57fe55343ba3
name-label ( RW): Windows 8.1 (64-bit)
name-description ( RW): Clones of this template will automatically provision their storage when first booted and then reconfigure themselves with the optimal settings for Windows 8.1 (64-bit).
uuid ( RO) : 381ebb02-96d5-11e7-92b9-b8ca3a97c5fc
name-label ( RW): Debian Stretch 9.0
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : c15fab79-6cce-4e1f-916f-a64b98ff9e7d
name-label ( RW): Windows Server 2016 (64-bit)
name-description ( RW): Clones of this template will automatically provision their storage when first booted and then reconfigure themselves with the optimal settings for Windows Server 2016 (64-bit).
uuid ( RO) : b5915805-d800-459d-826a-322dc9cf07e2
name-label ( RW): SUSE Linux Enterprise 15 (64-bit)
name-description ( RW): Template that allows VM installation from SLES-based distros. To use this template from the CLI, install your VM using vm-install, then watch the virtual display in XenCenter, and fill in the prompts.
uuid ( RO) : 110ecfa7-0fe4-4b35-a247-0b0141a738ba
name-label ( RW): SUSE Linux Enterprise Server 12 SP5 (64-bit)
name-description ( RW): Template that allows VM installation from SLES-based distros. To use this template from the CLI, install your VM using vm-install, then watch the virtual display in XenCenter, and fill in the prompts.
uuid ( RO) : 6959dfe8-534c-4c58-8a8c-3c3792293543
name-label ( RW): Oracle Linux 8
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 11fd3dc9-96cc-49af-b091-a2ca7e94c589
name-label ( RW): CentOS 7
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : c060fa00-8c96-4eb8-bcc9-772daaa01885
name-label ( RW): SUSE Linux Enterprise Server 12 SP4 (64-bit)
name-description ( RW): Template that allows VM installation from SLES-based distros. To use this template from the CLI, install your VM using vm-install, then watch the virtual display in XenCenter, and fill in the prompts.
uuid ( RO) : 74ae424d-a1d3-4d96-9827-d1d60a4c7511
name-label ( RW): Ubuntu Bionic Beaver 18.04
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 17a818b5-20a6-4d34-a7ef-320da9ef4c14
name-label ( RW): Windows Server 2012 R2 (64-bit)
name-description ( RW): Clones of this template will automatically provision their storage when first booted and then reconfigure themselves with the optimal settings for Windows Server 2012 R2 (64-bit).
uuid ( RO) : e9763585-f70a-4526-bfcb-822064742e9f
name-label ( RW): Ubuntu Xenial Xerus 16.04
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 4383f051-cc9e-48d5-99e9-8fa2e979e2d0
name-label ( RW): Windows 8.1 (32-bit)
name-description ( RW): Clones of this template will automatically provision their storage when first booted and then reconfigure themselves with the optimal settings for Windows 8.1 (32-bit).
uuid ( RO) : 79abf1d8-4b61-4fc3-aafa-58b0ccae48d3
name-label ( RW): Debian Jessie 8.0
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 7279a78a-4756-4fc3-99f0-3e7694c0319e
name-label ( RW): NeoKylin Linux Server 7
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 2cf37285-57bc-4633-a24f-0c6c825dda66
name-label ( RW): Ubuntu Focal Fossa 20.04
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 03d30863-86a2-428e-94c8-88ddfcb8cd29
name-label ( RW): Red Hat Enterprise Linux 7
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>
uuid ( RO) : 47fb0ec8-a0d5-46b8-a995-5455bf845bc7
name-label ( RW): SUSE Linux Enterprise Server 12 SP3 (64-bit)
name-description ( RW): Template that allows VM installation from SLES-based distros. To use this template from the CLI, install your VM using vm-install, then watch the virtual display in XenCenter, and fill in the prompts.
uuid ( RO) : 612863ed-900d-456d-b4b7-38b70915fd1f
name-label ( RW): Red Hat Enterprise Linux 8
name-description ( RW): To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>

INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'Debian Buster 10', 293, now(), 0);
-- Add support for SUSE Linux Enterprise 15 (64-bit) for Xenserver 8.1.0
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.1.0', 'SUSE Linux Enterprise 15 (64-bit)', 291, now(), 0);

-- Add XenServer 8.2.0 hypervisor capabilities
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(uuid, hypervisor_type, hypervisor_version, max_guests_limit, max_data_volumes_limit, max_hosts_per_cluster, storage_motion_supported) values (UUID(), 'XenServer', '8.2.0', 1000, 253, 64, 1);

-- Copy XenServer 8.1.0 hypervisor guest OS mappings to XenServer 8.2.0
INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) SELECT UUID(),'Xenserver', '8.2.0', guest_os_name, guest_os_id, utc_timestamp(), 0 FROM `cloud`.`guest_os_hypervisor` WHERE hypervisor_type='Xenserver' AND hypervisor_version='8.1.0';

-- Add support for Ubuntu Focal Fossa 20.04 for Xenserver 8.2.0
INSERT INTO `cloud`.`guest_os` (id, uuid, category_id, display_name, created) VALUES (335, UUID(), 10, 'Ubuntu 20.04 LTS', now());
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'Xenserver', '8.2.0', 'Ubuntu Focal Fossa 20.04', 330, now(), 0);
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,6 +17,7 @@
package com.cloud.hypervisor;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;

Expand DownExpand Up@@ -98,7 +99,14 @@ public VirtualMachineTO implement(VirtualMachineProfile vm) {
if (userVmVO != null) {
HostVO host = hostDao.findById(userVmVO.getHostId());
if (host != null) {
to.setVcpuMaxLimit(MaxNumberOfVCPUSPerVM.valueIn(host.getClusterId()));
List<HostVO> clusterHosts = hostDao.listByClusterAndHypervisorType(host.getClusterId(), host.getHypervisorType());
HostVO hostWithMinSocket = clusterHosts.stream().min(Comparator.comparing(HostVO::getCpuSockets)).orElse(null);
Integer vCpus = MaxNumberOfVCPUSPerVM.valueIn(host.getClusterId());
if (hostWithMinSocket != null && hostWithMinSocket.getCpuSockets() != null &&
hostWithMinSocket.getCpuSockets() < vCpus) {
vCpus = hostWithMinSocket.getCpuSockets();
}
to.setVcpuMaxLimit(vCpus);
}
}

Expand Down