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] Xenstore / blkdev trouble, this time with examples in C

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Xenstore / blkdev trouble, this time with examples in C
From: Jacob Gorm Hansen <jacobg@xxxxxxx>
Date: Fri, 30 Sep 2005 16:14:06 +0200
Cc: Jacob Gorm Hansen <jacobg@xxxxxxx>
Delivery-date: Fri, 30 Sep 2005 14:11:44 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=FBowRflI+9ISS9qJxZdorV81JOykgVdrHuuhw5SUGxblovqJ49U8gUVJ0yDBTpVgOyaS+2JwDkJ2kvush/6M8dAwFlTuVD7rntPviKSrT6f+rCAY1+LQS5IyXRE1vwq1qsUPGAWv9gC9yM3BMf+VOIo/RHxZWsrF+I+Af115+7U=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Reply-to: Jacob Gorm Hansen <jacobg@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
hi,
apparently vm-xs did was not able to write xenstore correctly, here is
a new version of my domain creation script, in C.

        char* keys[] = {
            "/domain/0/backend" , "[]",
            "/domain/0/device" , "[]",
            "/domain/0/domid" , "0",
            "/domain/0/vm" , "0",
            "/domain/0/domain" , "0",
            "/domain/1/device/vbd/769/virtual-device" , "769",
            "/domain/1/device/vbd/769/backend-id" , "0",
            "/domain/1/device/vbd/769/backend" , "/domain/0/backend/vbd/1/769",
            "/domain/0/backend/vbd/1/769/domain" , "ExampleDomain",
            "/domain/0/backend/vbd/1/769/params" , "hda1",
            "/domain/0/backend/vbd/1/769/frontend-id" , "1",
            "/domain/0/backend/vbd/1/769/type" , "phy",
            "/domain/0/backend/vbd/1/769/read-only",
            "/domain/0/backend/vbd/1/769/frontend" , "/domain/1/device/vbd/769",
            "",""
        };

       if (xs != NULL) {
            sprintf(prefix, "/domain/%u", domid);
            sprintf(sdomid, "%u", domid);

            xs_mkdir(xs, "/domain");
            xs_mkdir(xs, prefix);

            if (!xs_introduce_domain(xs, domid,
                         store_mfn, local_store,
                         prefix)) {
                printf("xs_introduce_domain failed!\n");
                exit(errno);
            }

            strcat(prefix, "/id");
            if (!xs_write(xs, prefix,
                      sdomid, strlen(sdomid))) {
                printf("xs_write() failed!\n");
                exit(errno);
            }
            int i;
            for(i=0; ; i+=2)
            {
                char* key = keys[i];
                char* val = keys[i+1];
                printf("key %p\n",key);
                if(!*key) break;
                printf("setting %s to %s\n",key,val);
                xs_write(xs, key, val, strlen(val));
            }

I am getting the following out of domU (with some added debug prints
to see what is going on).

blkfront_probe
scanf dir device/vbd/769 | node virtual-device | fmt %i
read dir device/vbd/769 | node virtual-device
.. read ok.
read dir device/vbd/769 | node backend-id
read dir device/vbd/769 | node backend
read dir /domain/0/backend/vbd/1/769 | node sectors
read dir /domain/0/backend/vbd/1/769 | node sectors
<4>xen_blk: Timeout connecting to device!

Can anyone point out why this is not working. The backend's probe
callback seem to never be activated.

thanks,
Jacob

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Xenstore / blkdev trouble, this time with examples in C, Jacob Gorm Hansen <=