[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Unable to add disk on ARM64



Hi Julien, Roger

On Fri, Aug 12, 2016 at 04:57:06PM +0200, Roger Pau Monné wrote:
>On Fri, Aug 12, 2016 at 03:00:34PM +0200, Julien Grall wrote:
>> On 12/08/2016 14:24, Peng Fan wrote:
>> > Hi,
>> 
>> Hello Peng,
>> 
>> I have CCed Roger who is more familiar than me with the hotplug scripts.
>> 
>> > 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
>> 
>> 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.

>
>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.
> 
>It could be that there's some garbage in xenstore from a device that hasn't 
>been properly detached.
>
>Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.