Skip to contentSkip to conversation

Unable to add disk on ARM64

DISCUSSION Peng Fan 3 participants 5 messages Aug 12, 2016 – Aug 13, 2016

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

Hi,

I am using xen master branch on i.MX8 ARM64.

My xl configuration:

kernel = "/root/xen/Image"
memory = "128"
name = "DomU"
vcpus = 1
serial="pty"
disk = [ 'phy:/dev/loop0,xvda,w' ]
extra = "console=hvc0 root=/dev/xvda debug=/bin/sh"

And I "losetup /dev/loop0 /root/DomU-rootfs" in Dom0 Linux.

But I met the following error:
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: /etc/xen/scripts/block add ^M^M Device /dev/loop0 is mounted in the privileged domain,^M^M
and so cannot be mounted by a guest.^M^M
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [800] exited with error status 1^M^M
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0xfee100: deregister unregistered^M^M
libxl: error: libxl_devi
ce.c:1202:device_hotplug_child_death_cb: script: Device /dev/loop0 is mounted in the privileged domain,^M^M and so cannot be mounted by a guest.^M^M
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0xfee100: deregister unregistered^M^M
libxl: error: libxl_create.c:1244:domcreate_launch_dm: unable to add disk devices

Then I change disk to "disk = [ 'format=raw, vdev=xvda, access=rw, target=/root/DomU-rootfs' ]" But met other errors:
"
/etc/xen/scripts/block failed; error detected.
"

Any ideas?

Thanks,
Peng.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#1 lore raw
Quoted 1 line · Peng Fan

Hi,

Hello Peng,

I have CCed Roger who is more familiar than me with the hotplug scripts.

Quoted 15 lines

I am using xen master branch on i.MX8 ARM64.

My xl configuration:

kernel = "/root/xen/Image"
memory = "128"
name = "DomU"
vcpus = 1
serial="pty"
disk = [ 'phy:/dev/loop0,xvda,w' ]
extra = "console=hvc0 root=/dev/xvda debug=/bin/sh"

And I "losetup /dev/loop0 /root/DomU-rootfs" in Dom0 Linux.

Quoted 9 lines

But I met the following error:
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: /etc/xen/scripts/block add ^M^M Device /dev/loop0 is mounted in the privileged domain,^M^M
and so cannot be mounted by a guest.^M^M
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [800] exited with error status 1^M^M
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0xfee100: deregister unregistered^M^M
libxl: error: libxl_devi
ce.c:1202:device_hotplug_child_death_cb: script: Device /dev/loop0 is mounted in the privileged domain,^M^M and so cannot be mounted by a guest.^M^M

From my understanding, you have mounted /dev/loop0 in Dom0, is that correct? However, we don't support sharing the same mounting point by default (Roger can you confirm).

Quoted 8 lines

libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0xfee100: deregister unregistered^M^M
libxl: error: libxl_create.c:1244:domcreate_launch_dm: unable to add disk devices

Then I change disk to "disk = [ 'format=raw, vdev=xvda, access=rw, target=/root/DomU-rootfs' ]" But met other errors:
"
/etc/xen/scripts/block failed; error detected.
"

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#2 lore raw
Quoted 32 lines · Julien Grall
Quoted 1 line · Peng Fan

Hi,

Hello Peng,

I have CCed Roger who is more familiar than me with the hotplug scripts.

Quoted 15 lines

I am using xen master branch on i.MX8 ARM64.

My xl configuration:

kernel = "/root/xen/Image"
memory = "128"
name = "DomU"
vcpus = 1
serial="pty"
disk = [ 'phy:/dev/loop0,xvda,w' ]
extra = "console=hvc0 root=/dev/xvda debug=/bin/sh"

And I "losetup /dev/loop0 /root/DomU-rootfs" in Dom0 Linux.

Quoted 9 lines

But I met the following error:
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: /etc/xen/scripts/block add ^M^M Device /dev/loop0 is mounted in the privileged domain,^M^M
and so cannot be mounted by a guest.^M^M
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [800] exited with error status 1^M^M
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0xfee100: deregister unregistered^M^M
libxl: error: libxl_devi
ce.c:1202:device_hotplug_child_death_cb: script: Device /dev/loop0 is mounted in the privileged domain,^M^M and so cannot be mounted by a guest.^M^M

Quoted 3 lines

From my understanding, you have mounted /dev/loop0 in Dom0, is that correct? However, we don't support sharing the same mounting point by default (Roger can you confirm).

It seems like the hotplug script has detected that you have the device already attached to Dom0, can you paste the output of xenstore-ls -fp when this happens?

It could be that there's some garbage in xenstore from a device that hasn't been properly detached.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#3 lore raw

Hi Julien, Roger

Quoted 33 lines · Roger Pau Monné
Quoted 32 lines · Julien Grall
Quoted 1 line · Peng Fan

Hi,

Hello Peng,

I have CCed Roger who is more familiar than me with the hotplug scripts.

Quoted 24 lines

I am using xen master branch on i.MX8 ARM64.

My xl configuration:

kernel = "/root/xen/Image"
memory = "128"
name = "DomU"
vcpus = 1
serial="pty"
disk = [ 'phy:/dev/loop0,xvda,w' ]
extra = "console=hvc0 root=/dev/xvda debug=/bin/sh"

And I "losetup /dev/loop0 /root/DomU-rootfs" in Dom0 Linux.

But I met the following error:
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: /etc/xen/scripts/block add ^M^M Device /dev/loop0 is mounted in the privileged domain,^M^M
and so cannot be mounted by a guest.^M^M
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [800] exited with error status 1^M^M
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0xfee100: deregister unregistered^M^M
libxl: error: libxl_devi
ce.c:1202:device_hotplug_child_death_cb: script: Device /dev/loop0 is mounted in the privileged domain,^M^M and so cannot be mounted by a guest.^M^M

Quoted 3 lines
Quoted 3 lines

From my understanding, you have mounted /dev/loop0 in Dom0, is that correct? However, we don't support sharing the same mounting point by default (Roger can you confirm).

No I only do "losetup /dev/loop0 DomU-rootfs". And I not mount it.

Quoted 4 lines

It seems like the hotplug script has detected that you have the device already attached to Dom0, can you paste the output of xenstore-ls -fp when this happens?

I add xenstore-ls -fp in /etc/xen/scripts/block.
"

        test -b "$dev" || fatal "$dev is not a block device."
	
	xenstore-ls -fp  ---> Here
	claim_lock "block"
	check_device_sharing "$dev" "$mode" ---> seems fail in this function

"

I use busybox, not sure whether it supports the xen scripts well or not. such as "losetup -a" is not supported by busybox.

Log:

device_hotplug: calling hotplug script: /etc/xen/scripts/block add
libxl: debug: libxl_device.c:1135:device_hotplug: extra args:
libxl: debug: libxl_device.c:1143:device_hotplug: env:
libxl: debug: libxl_device.c:1150:device_hotplug: script: /etc/xen/scripts/block
libxl: debug: libxl_device.c:1150:device_hotplug: XENBUS_TYPE: vbd
libxl: debug: libxl_device.c:1150:device_hotplug: XENBUS_PATH: backend/vbd/1/51712
libxl: debug: libxl_device.c:1150:device_hotplug: XENBUS_BASE_PATH: backend
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: /etc/xen/scripts/block add
/tool = "" (n0)
/tool/xenstored = "" (n0)
/local = "" (n0)
/local/domain = "" (n0)
/local/domain/0 = "" (n0)
/local/domain/0/domid = "0" (n0)
/local/domain/0/name = "Domain-0" (n0)
/local/domain/0/backend = "" (n0)
/local/domain/0/backend/vbd = "" (n0)
/local/domain/0/backend/vbd/1 = "" (n0)
/local/domain/0/backend/vbd/1/51712 = "" (n0,r1)
/local/domain/0/backend/vbd/1/51712/frontend = "/local/domain/1/device/vbd/51712" (n0,r1)
/local/domain/0/backend/vbd/1/51712/params = "/dev/loop0" (n0,r1)
/local/domain/0/backend/vbd/1/51712/script = "/etc/xen/scripts/block" (n0,r1)
/local/domain/0/backend/vbd/1/51712/frontend-id = "1" (n0,r1)
/local/domain/0/backend/vbd/1/51712/online = "1" (n0,r1)
/local/domain/0/backend/vbd/1/51712/removable = "0" (n0,r1)
/local/domain/0/backend/vbd/1/51712/bootable = "1" (n0,r1)
/local/domain/0/backend/vbd/1/51712/state = "2" (n0,r1)
/local/domain/0/backend/vbd/1/51712/dev = "xvda" (n0,r1)
/local/domain/0/backend/vbd/1/51712/type = "phy" (n0,r1)
/local/domain/0/backend/vbd/1/51712/mode = "w" (n0,r1)
/local/domain/0/backend/vbd/1/51712/device-type = "disk" (n0,r1)
/local/domain/0/backend/vbd/1/51712/discard-enable = "1" (n0,r1)
/local/domain/1 = "" (n0,r1)
/local/domain/1/vm = "/vm
/63997893-f587-4bdc-9bf3-dd5c7614bb51" (n0,r1)
/local/domain/1/name = "DomU" (n0,r1)
/local/domain/1/cpu = "" (n0,r1)
/local/domain/1/cpu/0 = "" (n0,r1)
/local/domain/1/cpu/0/availability = "online" (n0,r1)
/local/domain/1/memory = "" (n0,r1)
/local/domain/1/memory/static-max = "131072" (n0,r1)
/local/domain/1/memory/target = "131072" (n0,r1)
/local/domain/1/memory/videoram = "0" (n0,r1)
/local/domain/1/device = "" (n0,r1)
/local/domain/1/device/suspend = "" (n0,r1)
/local/domain/1/device/suspend/event-channel = "" (n1)
/local/domain/1/device/vbd = "" (n0,r1)
/local/domain/1/device/vbd/51712 = "" (n1,r0)
/local/domain/1/device/vbd/51712/backend = "/local/domain/0/backend/vbd/1/51712" (n1,r0)
/local/domain/1/device/vbd/51712/backend-id = "0" (n1,r0)
/local/domain/1/device/vbd/51712/state = "1" (n1,r0)
/local/domain/1/device/vbd/51712/virtual-device = "51712" (n1,r0)
/local/domain/1/device/vbd/51712/device-type = "disk" (n1,r0)
/local/domain/1/device/vbd/51712/protocol = "arm-abi" (n1,r0)
/local/domain/1/control = "" (n0,r1)
/local/domain/1/control/shutdown = "" (n1)
/local/domain/1/control/feature-poweroff = "" (n1)
/local/domain/1/control/feature-reboot = "" (n1)
/local/domain/1/control/feature-suspend = "" (n1)
/local/domain/1/control/platform-feature-multiprocessor-suspend = "1" (n0,r1)
/local/domain/1/control/platform-feature-xs_reset_watches = "1" (n0,r1)
/local/domain/1/data = "" (n1)
/local/domain/1/drivers = "" (n1)
/local/domain/1/feature = "" (n1)
/local/domain/1/attr = "" (n1)
/local/domain/1/domid = "1" (n0,r1)
/local/domain/1/store = "" (n0,r1)
/local/domain/1/store/port = "1" (n0,r1)
/local/domain/1/store/ring-ref = "233473" (n0,r1)
/vm = "" (n0)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51 = "" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/name = "DomU" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/uuid = "63997893-f587-4bdc-9bf3-dd5c7614bb51" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/image = "" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/image/ostype = "linux" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/image/kernel = "/root/xen/Image" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/image/cmdline = "console=hvc0 root=/dev/xvda debug=/bin/sh" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/start_time = "0.80" (n0,r1)
/libxl = "" (n0)
/libxl/1 = "" (n0)
/libxl/1/device = "" (n0)
/libxl/1/device/vbd = "" (n0)
/libxl/1/device/vbd/51712 = "" (n0)
/libxl/1/device/vbd/51712/frontend = "/local/domain/1/device/vbd/51712" (n0)
/libxl/1/device/vbd/51712/backend = "/local/domain/0/backend/vbd/1/51712" (n0)
/libxl/1/device/vbd/51712/params = "/dev/loop0" (n0)
/libxl/1/device/vbd/51712/script = "/etc/xen/scripts/block" (n0)
/libxl/1/device/vbd/51712/frontend-id = "1" (n0)
/libxl/1/device/vbd/51712/online = "1" (n0)
/libxl/1/device/vbd/51712/removable = "0" (n0)
/libxl/1/devic
e/vbd/51712/bootable = "1" (n0)
/libxl/1/device/vbd/51712/state = "1" (n0)
/libxl/1/device/vbd/51712/dev = "xvda" (n0)
/libxl/1/device/vbd/51712/type = "phy" (n0)
/libxl/1/device/vbd/51712/mode = "w" (n0)
/libxl/1/device/vbd/51712/device-type = "disk" (n0)
/libxl/1/device/vbd/51712/discard-enable = "1" (n0)
/libxl/1/dm-version = "qemu_xen_traditional" (n0)

Thanks,
Peng.

Quoted 5 lines

It could be that there's some garbage in xenstore from a device that hasn't been properly detached.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#4 lore raw
In reply to Roger Pau Monné
Quoted 33 lines · Roger Pau Monné
Quoted 32 lines · Julien Grall
Quoted 1 line · Peng Fan

Hi,

Hello Peng,

I have CCed Roger who is more familiar than me with the hotplug scripts.

Quoted 24 lines

I am using xen master branch on i.MX8 ARM64.

My xl configuration:

kernel = "/root/xen/Image"
memory = "128"
name = "DomU"
vcpus = 1
serial="pty"
disk = [ 'phy:/dev/loop0,xvda,w' ]
extra = "console=hvc0 root=/dev/xvda debug=/bin/sh"

And I "losetup /dev/loop0 /root/DomU-rootfs" in Dom0 Linux.

But I met the following error:
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: /etc/xen/scripts/block add ^M^M Device /dev/loop0 is mounted in the privileged domain,^M^M
and so cannot be mounted by a guest.^M^M
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [800] exited with error status 1^M^M
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0xfee100: deregister unregistered^M^M
libxl: error: libxl_devi
ce.c:1202:device_hotplug_child_death_cb: script: Device /dev/loop0 is mounted in the privileged domain,^M^M and so cannot be mounted by a guest.^M^M

Quoted 3 lines
Quoted 3 lines

From my understanding, you have mounted /dev/loop0 in Dom0, is that correct? However, we don't support sharing the same mounting point by default (Roger can you confirm).

Fixed. In tiny rootfs, there is no stat. I recompiled busybox with more applets, and all is ok now.

Regards,
Peng.

Quoted 9 lines

It seems like the hotplug script has detected that you have the device already attached to Dom0, can you paste the output of xenstore-ls -fp when this happens?

It could be that there's some garbage in xenstore from a device that hasn't been properly detached.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel