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

Re: [Xen-devel] xc_domain_create

To: "Shaun R." <mailinglists@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xc_domain_create
From: "Geoffrey Lefebvre" <geoffrey@xxxxxxxxx>
Date: Sun, 31 Aug 2008 13:46:06 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 31 Aug 2008 13:46:31 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=L03U2WFekw17UoIQiid4W3VXCoJJThssWzb4Msflfic=; b=Ej3G0Z4k8OeH4lRMMjX1Vgw6NrQSQzi1YPNRDwJa+bKP6lcozgItU7cZkgH/qWPs+e 0HmwCnjmkTrfw2Uvk2HL9AZQga9x1QKJ+fYSXMS2llwA2QK0xjRz5eEENDVBBzgWSy9S 3yd4OjUupS3ILGcosaOqr/CNu5Z68s5bFLIG0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=k0RDihi1SBsVVUEYVFQTwcZcYpjm8KOIw7GvwKeL4iTi/gGjt70ycpimRxgKb7v352 Rt7cJnn0KyrGQuUyuUdnvoswKdEnj4tlNZX73dRs5dRPhCGzBLJUyXnul14Jjwzx/nqN jBR2pXLlNoZGNqFKrmL7Oae+nkuEldkzB+5/U=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <g9eku4$mov$1@xxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <g9eku4$mov$1@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Interesting coincidence. I was just working on something similar. Here
is example code that I just cooked up to start a mini-os domain. Not
the best code since many things are hardcoded but it seems to work on
a mini-os domain with no devices apart from the xen emergency console.
Getting the devices going and adding the proper entries in xenstore
are left as an exercise to the reader :).

Also, there is no support for mem ballooning, you have to reserve some
memory when booting xen.

Hopefully this helps you a bit.

cheers,

geoffrey

On Sun, Aug 31, 2008 at 10:37 AM, Shaun R.
<mailinglists@xxxxxxxxxxxxxxxx> wrote:
> Can anybody show me a basic example of using this function to create a
> domain with the following config...
>
> ---------------------------------------------------------------------------------------------------
> kernel="/boot/vmlinux-2.6.16.29-11774"
> memory=256
> name="user1"
> vif=[ 'vifname=user1.0' , 'mac=FE:FD:CC:0F:87:45' ]
> dhcp=""
> disk=[
> 'tap:aio:/home/user1/disks/root_fs.img,sda1,w','tap:aio:/home/user1/disks/swap.img,sdb1,w'
> ]
> root="/dev/sda1 ro"
> extra=""
> ip="10.0.0.2"
> netmask="255.255.255.248"
> gateway="10.0.0.1"
> dhcp=""
> nfs_server=""
> --------------------------------------------------------------------------------------------------
>
> the xenctrl.h file shows this
>
> int xc_domain_create(int xc_handle,
>                    uint32_t ssidref,
>                    xen_domain_handle_t handle,
>                    uint32_t flags,
>                    uint32_t *pdomid);
>
>
> looks like i need to generate a ssidref, how can i do that?
>
> xen_domain_handle_t handle i assume is what gets set with the domain info i
> just created?
>
> I dont understand the flags, looking at other code it looks like this is
> where i need to pass all the config data but i'm unsure how.
>
> pdomid, not sure what this is for.
>
> If anybody can show me a basic example that would get me started in the
> right direction it would be much appreciated.
>
>
> ~Shaun
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

Attachment: sample.c
Description: Text document

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