Hi, Andrija:
I am willing to try this approach given that we are working in a lab
environment. Otherwise we would have to downgrade to use XenServer 7.1 +
installing security patches afterwards
Since we also need to add one new entry in hypervisor_capabilities table for
XenServer 7.1.1 and there is no API to *add* new entry into this table, we
decided to use SQL directly. After reading source code in
cloudstack/engine/schema/src/main/resources/META-INF/db directory on Github, we
come up with following SQL statements to seed DB tables for XenServer 7.1CU1
support:
INSERT IGNORE INTO hypervisor_capabilities (uuid, hypervisor_type,
hypervisor_version, max_guests_limit, max_data_volumes_limit,
storage_motion_supported) values (UUID(), "XenServer", "7.1.1", 500, 13, 1);
INSERT IGNORE INTO guest_os_hypervisor (uuid,hypervisor_type,
hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined)
SELECT UUID(),"Xenserver", "7.1.1", guest_os_name, guest_os_id,
utc_timestamp(), 0
FROM guest_os_hypervisor
WHERE hypervisor_type="Xenserver"
AND hypervisor_version="7.1.0";
After executing these two SQL statements, and restarting management service,
all my RHEL 6.x VM instances can be started successfully as PV instances. Now
we just have to do a lot more validation checks to make sure all is well,
especially with our own particular setups and usages. I'd appreciate very much
if anyone else could send their feedbacks and gotchas if they have done
anything similar and any area I may need to pay more attention with.
Thanks
Yiping
On 1/30/19, 2:34 AM, "Andrija Panic" <[email protected]> wrote:
Hi Yiping,
As far as I can expect, patch level should not break any functionality with
ACS (except, obviously, guest OS mappings...) so I assume it should work same
was as unpatched/vanila version.
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcloudstack.apache.org%2Fapi%2Fapidocs-4.11%2Fapis%2FaddGuestOsMapping.html&data=02%7C01%7Cyipzhang%40adobe.com%7C7be8d8c0b54748293cc308d6869e9335%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636844412977844955&sdata=x6cRVNkrIw2bN87nibCtwlgwfZ3GfWm%2Buxsg4R7oyVg%3D&reserved=0
Please use above API call to make needed guest OS mapping - i.e. observe
needed (or all ???) OS types (ID value from guest_os table for each guest OS
type in ACS) and use it to generate appropriate API calls which will create
missing mapping records inside guest_os_hypervisor table).
Alternatively, just copy all 192 rows that you have for 7.1.0 - duplicate
all these rows with changing hypervisor_version to 7.1.1 - I assume mgmt.
restart might be needed, but since test env, doesn't hurt.
Let me know how this worked for you,
Best
Andrija
[email protected]
https://na01.safelinks.protection.outlook.com/?url=www.shapeblue.com&data=02%7C01%7Cyipzhang%40adobe.com%7C7be8d8c0b54748293cc308d6869e9335%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636844412977844955&sdata=XeE6PL2DHQZhBlkXLA6o3bjIqfRZFTklrFBp85naDeU%3D&reserved=0
Amadeus House, Floral Street, London WC2E 9DPUK
@shapeblue
-----Original Message-----
From: Yiping Zhang <[email protected]>
Sent: 29 January 2019 21:54
To: [email protected]
Subject: Re: how to run rhel 6.x VM as PV VM on xenserver 7.1CU1?
Hi, Andrija:
I think you are
on to something here:
Here are my query results for these sql statements:
mysql> select id,name,hypervisor_type,hypervisor_version from host where
type="Routing" and removed is NULL;
+----+---------------+-----------------+--------------------+
| id | name | hypervisor_type | hypervisor_version |
+----+---------------+-----------------+--------------------+
| 56 | lab-hv03 | XenServer | 7.1.1 |
| 57 | lab-hv02 | XenServer | 7.1.1 |
| 58 | lab-hv04 | XenServer | 7.1.1 |
+----+---------------+-----------------+--------------------+
3 rows in set (0.00 sec)
mysql> SELECT count(*) FROM guest_os_hypervisor WHERE
hypervisor_type="Xenserver" AND hypervisor_version = "7.1.0";
+----------+
| count(*) |
+----------+
| 192 |
+----------+
1 row in set (0.00 sec)
mysql> SELECT count(*) FROM guest_os_hypervisor WHERE
hypervisor_type="Xenserver" AND hypervisor_version = "7.1.1";
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.01 sec)
mysql>
As can be seen, there are 192 entries for hypervisor_version "7.1.0", but
zero entries for "7.1.1" which is what my hypervisors are. I went back to read
4.11.2.0 release notes again on supported hypervisor lists and sure enough,
there is no mention of XenServer 7.1CU1 being supported.
What changes are required on CloudStack side to add support for XenServer
7.1CU1 (aka 7.1.1)? Would it be sufficient by adding missing mappings in
guest_os_hypervsior table and adding new entry in hypervisor_capabilities
table? Is there any code change required?
Thanks
Yiping
On 1/29/19, 12:34 AM, "Andrija Panic" <[email protected]> wrote:
Yiping,
Here is one more thing to check - please check your hypervisor version,
as reported inside cloud.host table:
i.e.
select id,name,hypervisor_type,hypervisor_version from host where
type="Routing" and removed is NULL;
would in my lab return something like this:
+----+------------+-----------------+--------------------+
| id | name | hypervisor_type | hypervisor_version |
+----+------------+-----------------+--------------------+
| 1 | 10.2.2.202 | VMware | 6.5 |
+----+------------+-----------------+--------------------+
Check the version reported for your XenServer, I'm assuming it might
report true version after upgrade i.e. "7.1.2", for which there are NO mappings
inside guest_os_hypervisor table - if so, you would need to duplicate all the
mapping records for XenServer 7.1.0 (or 7.0.0).
Different way to say it :
SELECT * FROM guest_os_hypervisor WHERE hypervisor_type="Xenserver" AND
hypervisor_version = "7.1.2";
...gives no result (there is no mapping from ACS guest OS to hypervisor
guest OS)
while
SELECT * FROM guest_os_hypervisor WHERE hypervisor_type="Xenserver" AND
hypervisor_version = "7.1.0";
...would return many rows with proper mappings
Check this, and we can work from there, once you confirm this might be
the issue (there are API calls to do this, or we can do it with SQL etc - add
missing mappins).
Kind regards,
Andrija
[email protected]
https://na01.safelinks.protection.outlook.com/?url=www.shapeblue.com&data=02%7C01%7Cyipzhang%40adobe.com%7C7be8d8c0b54748293cc308d6869e9335%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636844412977844955&sdata=q3JwtIm6i8PGD%2BAZ71pNIbNw65b4123BNMfC%2FO71860%3D&reserved=0
Amadeus House, Floral Street, London WC2E 9DPUK
@shapeblue
-----Original Message-----
From: Andrija Panic <[email protected]>
Sent: 29 January 2019 00:54
To: [email protected]
Subject: RE: how to run rhel 6.x VM as PV VM on xenserver 7.1CU1?
Additionally, I expect that following table is correct in sense of
paper vs reality, but always good to check:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.citrix.com%2Fen-us%2Fxenserver%2F7-1%2Fsystem-requirements%2Fguest-os-support.html&data=02%7C01%7Cyipzhang%40adobe.com%7C7be8d8c0b54748293cc308d6869e9335%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636844412977844955&sdata=1jBk2oozYq2awyJGg%2Fx1vLIkVyB57w49IjRr3c%2Fpm60%3D&reserved=0
[email protected]
https://na01.safelinks.protection.outlook.com/?url=www.shapeblue.com&data=02%7C01%7Cyipzhang%40adobe.com%7C7be8d8c0b54748293cc308d6869e9335%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636844412977844955&sdata=q3JwtIm6i8PGD%2BAZ71pNIbNw65b4123BNMfC%2FO71860%3D&reserved=0
Amadeus House, Floral Street, London WC2E 9DPUK @shapeblue
-----Original Message-----
From: Andrija Panic <[email protected]>
Sent: 29 January 2019 00:52
To: [email protected]
Subject: RE: how to run rhel 6.x VM as PV VM on xenserver 7.1CU1?
Hi Yiping,
If you do the following SQL: SELECT * FROM guest_os_hypervisor WHERE
hypervisor_type="XenServer" and hypervisor_version="7.1.0" AND guest_os_id IN
(SELECT id FROM guest_os WHERE display_name="CentOS 6.4 (64-bit)");
+-------------------+
| guest_os_name |
+-------------------+
| CentOS 6 (64-bit) |
+-------------------+
It basically shows you, that for ACS OS type called "CentOS 6.4
(64-bit)", this is translated/matches/mapped to the "CentOS 6 (64-bit)" as seen
from the XenServer 7.1.x hypervisor.
Now, there IS a possibility that some of these mappings is incorrect...
I would just go to XenServer and try to deploy manually (via XenCenter
etc) a VM with selecting the OS type from above SQL results set (CentOS 6
(64-bit)) and observe if it gets provisioned as HVM or PV - if XenServer brings
it as HVM, then you can see it's XenServer making it HVM. But if XenServer
starts that manually deployed VM as PV - then we can assume some wrong mapping
from ACS side.
If you have time to test this, I'm also interested in root cause -
since I saw with 7.1.x XenServer that you can't even restore a VM from
snapshot, if you change OS type on existing VM in ACS from, i.e. centos 6.4 to
6.5 etc.
Kind regards,
Andrija
[email protected]
https://na01.safelinks.protection.outlook.com/?url=www.shapeblue.com&data=02%7C01%7Cyipzhang%40adobe.com%7C7be8d8c0b54748293cc308d6869e9335%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636844412977844955&sdata=q3JwtIm6i8PGD%2BAZ71pNIbNw65b4123BNMfC%2FO71860%3D&reserved=0
Amadeus House, Floral Street, London WC2E 9DPUK @shapeblue
-----Original Message-----
From: Yiping Zhang <[email protected]>
Sent: 28 January 2019 23:16
To: [email protected]
Subject: how to run rhel 6.x VM as PV VM on xenserver 7.1CU1?
Hi, All:
I have a large number of RHEL 6.x VM instances running in our ACS
environment. Last time when I upgraded our XenServer from 6.5SP1 to 7.0, I
have to change my templates to assign OS TYPE as “RHEL 6.4 (64bit)” so that my
VM instances can be started as PV instances. Anything above “RHEL 6.5 (64bits)”
would be started as HVM instances and they would get stuck during boot.
Last week, after I upgraded my lab hypervisors to use XenServer 7.1CU1,
all my (lab) rhel 6.x VM instances would get started as HVM instances, thus
stuck during boot. I even tried to change template’s OS TYPE to other types
such as “rhel 5.10/5.0/6.0/, Other PV(64bit)” etc without any luck.
What did I miss? My lab is running ACS 4.11.2.0 packages from
Shapeblue. According to Citrix document,
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.citrix.com%2Fen-us%2Fxenserver%2F7-1%2Fdownloads%2Fvm-users-guide.pdf&data=02%7C01%7Cyipzhang%40adobe.com%7C7be8d8c0b54748293cc308d6869e9335%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636844412977844955&sdata=NEEXuScaso5iKld2CGnTo8DngBnEduLGukX6TfxTv0w%3D&reserved=0,
RHEL 6.x should always be started as PV instance. So why I only get HVM
instances instead?
Is it CloudStack or XenServer which decides an instance to be started
as PV or HVM instance?
Thanks, all helps are appreciated.
Yiping