From: Masaki Kanno Subject: Re: Fix xm block/network-attach command for inactivemanaged domain Date: Thu, 05 Jul 2007 11:39:10 +0900 Message-ID: <3FC7BEADAAC8ACkanno.masaki@jp.fujitsu.com> References: <3CC7BE10B54337kanno.masaki@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <3CC7BE10B54337kanno.masaki@jp.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >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 [BackDomain] > >Create a new virtual block device. ># xm list --long vm1 >(domain > <> > (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. Oops, I forgot important explanation to you. This patch solves the problems. BTW, I found a few problem about xm block/network-detach command too. I'm going to fix the problems too. Best regards, Kan >Signed-off-by: Masaki Kanno > >Best regards, > Kan > > >-------------------------------text/plain------------------------------- >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel