WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Fix xm block/network-attach command for inactive managed dom

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Fix xm block/network-attach command for inactive managed domain
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Wed, 04 Jul 2007 16:55:37 +0900
Delivery-date: Wed, 04 Jul 2007 00:54:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

When I tested xm block-attach command to a inactive managed domain, 
I saw the following error message.  But information of the VBD 
was shown by xm list command. 

# xm list vm1
Name                                        ID   Mem VCPUs      State   Time(s)
vm1                                              256     2                 0.0
# xm block-attach vm1 phy:/dev/hdb hdb w
Error: int argument required
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode> [BackDomain]

Create a new virtual block device.
# xm list --long vm1
(domain
 <<snip>>
    (device
        (vbd
            (uuid 9cefc28e-5c05-1fab-68c9-5834bd569bef)
            (bootable 0)
            (driver paravirtualised)
            (dev hdb)
            (uname phy:/dev/hdb)
            (mode w)
        )
    )
)


I examined xm block-attach command to remove the error message, 
so that I found a few problem.

 1. The cause of the error message is because deviceClass.createDevice() 
    was called for the inactive managed domain. 

 2. Xm network-attach command has a similar problem.  The error 
    message is as follows. 
    Error: (22, 'Invalid argument, while reading 
None/device-misc/vif/nextDeviceID')

 3. After the error message, I restarted xend. 
    Then the attached VBD by xm block-attach command was removed 
    from information of xm list command.  I think that the cause 
    is because managed_config_save() was not called for the 
    managed domain when xm block-attach command was executed. 


Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,
 Kan

Attachment: xm_block_attach.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>