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] Using the C library

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Using the C library
From: marconi@xxxxxxx
Date: Fri, 18 Jun 2004 18:26:38 -0300
Delivery-date: Fri, 18 Jun 2004 22:31:42 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Internet Messaging Program (IMP) 3.2.1
I made some progress. But not the way I think it should be...

There goes the code:

#include <xc.h>

int main()
{
  int xc_handle;
  int mem_kb = 16384;
  char name[32] = "Maquina virtual";
  u64 domid;
  xc_vbdextent_t extent;

  extent.real_device = 0x0300;
  extent.start_sector = 53319798;
  extent.nr_sectors = 1188746;

  xc_handle = xc_interface_open();

  xc_domain_create(xc_handle, mem_kb, name, &domid);
  xc_linux_build(xc_handle,domid,"/boot/xenolinux.gz","","root=/dev/hda3 ro 
ip=169.254.1.1:::::eth0:off");
  xc_vbd_create(xc_handle,domid,0x0303,0);
  xc_vbd_setextents(xc_handle,domid,0x0303,1,&extent);
  xc_domain_start(xc_handle,domid);
}

With the xen_read_console, I see the system booting correctly. The problem is 
that the real_device I'm using is hda. Becouse 0x0307 with start_sector 0 
didn't 
work. So, I made fdisk -lu /dev/hda and got the starting sector of hda7. It 
will 
be painfull to do it like this, because of the final complexity (this is just a 
starting test).

The other problem is that I didn't figure out how to setup the networking.

PS: In the previeus message, I said the wrong partitions... What I really want 
is phy:hda7,hda3.

Thanks!

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel