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