XCP-NG 7.6 system VMs always starting as HVM when PV is expected
ISSUE TYPE
- Bug Report
- Enhancement Request
COMPONENT NAME
- XCP-ng 7.6.0 under CloudStack 4.11.2
CLOUDSTACK VERSION
- CloudStack version 4.11.2
CONFIGURATION
n/a
OS / ENVIRONMENT
- ACS 4.11.2 management on CentOS7.x
- Niche case where the hypervisor can not provide HVM
SUMMARY
- System VMs are incorrectly identified as "no guest OS type"
- The XCP host will therefore start the system VM as "other": name-label ( RW): Other install media name-description ( RW): Template which allows VM installation from install media
- As a result the XCP-ng host will start the system VM as HVM and fail
- Note: as a dirty workaround setting the "Other install media" on the XCP host to domain-mode=pv and PV-bootloader=pygrub will make the system VMs boot - but this isn't solving the fact the wrong template is chosen at xenserver side in the first place
STEPS TO REPRODUCE
- Issue happens whether the XenServer system VM template is set to OS ID "Other (64-bit)", " Debian GNU/Linux 7(64-bit)" or even "Other (64-bit)"
- At the same time the guest_os_hypervisor table has been updated with the correct "XCP-ng 7.6.0" hypervisor version.
- This should force the system VM to start as PV, however they will attempt to start as HVM:
2018-12-07 17:10:28,805 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-63:ctx-0b190f08) (logid:b1d89a23) no guest OS type, start it as HVM guest
2018-12-07 17:10:32,500 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-63:ctx-0b190f08) (logid:b1d89a23) PV args are %template=domP%type=consoleproxy%host=192.168.56.20%port=8250%name=v-452-VM%zone=1%pod=1%guid=Proxy.452%proxy_vm=452%disable_rp_filter=true%eth2ip=172.30.0.151%eth2mask=255.255.255.0%gateway=172.30.0.1%eth0ip=169.254.0.240%eth0mask=255.255.0.0%eth1ip=192.168.56.207%eth1mask=255.255.255.0%mgmtcidr=192.168.56.0/24%localgw=192.168.56.254%internaldns1=8.8.8.8%internaldns2=8.8.4.4%dns1=8.8.8.8%dns2=8.8.4.4
2018-12-07 17:10:32,507 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-63:ctx-0b190f08) (logid:b1d89a23) HVM args are template=domP type=consoleproxy host=192.168.56.20 port=8250 name=v-452-VM zone=1 pod=1 guid=Proxy.452 proxy_vm=452 disable_rp_filter=true eth2ip=172.30.0.151 eth2mask=255.255.255.0 gateway=172.30.0.1 eth0ip=169.254.0.240 eth0mask=255.255.0.0 eth1ip=192.168.56.207 eth1mask=255.255.255.0 mgmtcidr=192.168.56.0/24 localgw=192.168.56.254 internaldns1=8.8.8.8 internaldns2=8.8.4.4 dns1=8.8.8.8 dns2=8.8.4.4
Then fails in this case with
2018-12-07 17:10:37,192 WARN [c.c.h.x.r.CitrixResourceBase] (DirectAgent-125:ctx-00de06c2) (logid:dd5a95dc) Task failed! Task record: uuid: c7b7c420-3ae6-16d1-b630-87bca4b068ea
nameLabel: Async.VM.start_on
nameDescription:
allowedOperations: []
currentOperations: {}
created: Fri Dec 07 17:10:36 GMT 2018
finished: Fri Dec 07 17:10:36 GMT 2018
status: failure
residentOn: com.xensource.xenapi.Host@42b297e4
progress: 1.0
type:
EXPECTED RESULTS
- It should be possible to force the system VM to start as PV
ACTUAL RESULTS
- Fails to start using HVM
Solved:
- The issue is the hypervisor version from the host table must match the hypervisor version set in guest_os_hypervisor
- The XCP-ng 7.6.0 will simply show up as "Xenserver" with version "7.6.0" in the hosts table.
- NOTE: this version in the host table is dynamically kept up to date hence you can not override by setting a version of XCP-ng 7.6.0
- A workaround is therefore to update the guest_os_hypervisor table to say hypervisor version "7.6.0" for the template ID in question.
- Following this system VMs will come online with correct type - in this case Debian 7 (64-bit)
name-label ( RW) : s-507-VM
name-description ( RW): Template that allows VM installation from Xen-aware Debian-based distros. 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://
name-label ( RW) : v-508-VM
name-description ( RW): Template that allows VM installation from Xen-aware Debian-based distros. 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://
Fixed with correct guest_os_hypervisor table version entries - which should simply be "7.6.0"