Xen issue during HVM booting

Hey,

I have a Xen with xl toolstack. To run linux pv vms are fine. vms boot up with no issue, however when I try to run a hvm vm, I get the following error:
Wed Dec 7 09:28:49 2016 [Z0][ReM][D]: Req:9200 UID:3 VirtualMachineInfo invoked , 37
Wed Dec 7 09:28:49 2016 [Z0][ReM][D]: Req:9200 UID:3 VirtualMachineInfo result SUCCESS, "37…"
Wed Dec 7 09:28:49 2016 [Z0][ReM][D]: Req:9392 UID:3 VirtualMachineRecover invoked , 37, 2
Wed Dec 7 09:28:49 2016 [Z0][ReM][D]: Req:9392 UID:3 VirtualMachineRecover result SUCCESS, 37
Wed Dec 7 09:28:49 2016 [Z0][ReM][D]: Req:8640 UID:3 VirtualMachineInfo invoked , 37
Wed Dec 7 09:28:49 2016 [Z0][ReM][D]: Req:8640 UID:3 VirtualMachineInfo result SUCCESS, "37…"
Wed Dec 7 09:28:49 2016 [Z0][VMM][D]: Message received: LOG I 37 Successfully execute transfer manager driver operation: tm_context.

Wed Dec 7 09:28:49 2016 [Z0][VMM][D]: Message received: LOG I 37 ExitCode: 0

Wed Dec 7 09:28:49 2016 [Z0][VMM][D]: Message received: LOG I 37 Successfully execute network driver operation: pre.

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG I 37 Command execution fail: cat << EOT | /var/tmp/one/vmm/xen/deploy ‘/var/lib/one//datastores/0/37/deployment.0’ ‘10.1.0.101’ 37 10.1.0.101

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG I 37 libxl: error: libxl_dm.c:717:libxl__build_device_model_args_new: qemu-xen doesn’t support read-only disk drivers

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG I 37 libxl: error: libxl_dm.c:1393:device_model_spawn_outcome: (null): spawn failed (rc=-3)

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG I 37 libxl: error: libxl_create.c:1188:domcreate_devmodel_started: device model did not start: -3

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG I 37 libxl: error: libxl_dm.c:1489:kill_device_model: unable to find device model pid in /local/domain/99/image/device-model-pid

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG I 37 libxl: error: libxl.c:1437:libxl__destroy_domid: libxl__destroy_device_model failed for 99

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG E 37 Unable

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG I 37 ExitCode: 3

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: LOG I 37 Failed to execute virtualization driver operation: deploy.

Wed Dec 7 09:28:53 2016 [Z0][VMM][D]: Message received: DEPLOY FAILURE 37 Unable

The source of the error is, the opennebula has own drive for implementing IP address usename etc. When I change it from hdc,r to hdc,w I can boot it up but from the HV’s command line. Anytime when I click to start on Sunstone, It changes back to the original hdc,r and the VM does not boot up. Any idea how I can fix it?

Many thanks

On the GIT I got a reason why I am having this.

I modified the context iso from hd prefix to sd.
Generated config:
name = ‘one-43’
#O CPU_CREDITS = 512
memory = ‘2048’
builder = ‘hvm’
disk = [
‘raw:/var/lib/one//datastores/0/43/disk.0,sdc,w’,
‘raw:/var/lib/one//datastores/0/43/disk.1,sda,w’,
‘raw:/var/lib/one//datastores/0/43/disk.2,sdb,r’,
]
vif = [
’ mac=02:00:0a:01:00:dc,ip=10.1.0.220,bridge=mgmt’,
]
vnc = '1’
vnclisten = '0.0.0.0’
vncunused = '0’
vncdisplay = '43

But I still have that issue.

Hi, me and someone else had the same issue some months ago but I think it was with PVM not HVM, not sure.
check out this thread, maybe it helps:

all the best
Jojo

On PV it work perfectly. But for example, I cannot run a windows in PV nor a FreeBSD.

There must be a solution for HVM as well.

Does it work if you would remove the context disk? e.g. remove the “context checkbox” in the onetemplate before you instantiate

Yes it works without context checkbox

Sorry for getting back to you so late, but there was christmas, holidays, opennebula projects and stuff :wink:

The reason that it’s working without the context checkbox is probably because it does NOT have to attach the context.iso file as a “cdrom” device on the VMs IDE Bus

IDE is obviously not supported from (some??) Xen versions.

you probably want to use contextualization at some point…

try setting the default for cdroms to something else. hd is the default:

DEFAULT_CDROM_DEVICE_PREFIX = “hd”

try “sd” for example

HTH
Jojo