[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: [libvirt] Using Xen config files

I'm still having problems with this.  I've dug around and found errors in
the qemu-dm log.

When I try to start the VM with libvirt, the error I'm getting is:
"xs_read(/vm/414e73de-cf1e-487c-87e0-d4ebf7a23576/rtc/timeoffset): read

I did a xenstore-ls on the /vm/414e73de-cf1e-487c-87e0-d4ebf7a23576
directory and sure enough, rtc/timeoffset is not there.  When I start the VM
with the Xen config file I used to generate the XML the rtc/timeoffset is
there (timeoffset is set to "0").

Is there a way to set that in the XML?  I didn't see it in the online XML

I'm using a slightly different XML description than I had originally so I've
included here (along with the Xen Config file)


const char* foo = 
"<domain type='xen'>"
    "<boot dev='hd'/>"
"<clock sync='localtime'/>"
	"<disk type='block'>"
	    "<source dev='/dev/vgvms/LinuxVM'/>"
	    "<target dev='hda'/>"
    "<interface type='ioemu'>"
        "<mac address='7A:AB:D0:01:82:98'/>"
    "<input type='tablet' bus='usb'/>"
    "<graphics type='sdl' password=''/>"
    "<serial type='pty'/>"
//serial = "pty" 

int main (int argc, char** argv) 
    virConnectPtr con;      /* connection to the Xen hypervisor */
    virDomainPtr  domain;


    con = virConnectOpen ("xen:///");
    if (!con) {
        virErrorPtr err = virGetLastError ();
        printf ("virConnectOpen failed: %s\n",
        return -1;

    domain = virDomainDefineXML (con, foo);
    if (!domain) {
        virErrorPtr err = virConnGetLastError (con);
        printf ("virDomainDefineXML failed: %s\n",

    } else {
        if (virDomainCreate (domain) < 0) {
            virErrorPtr err = virConnGetLastError (con);
            printf ("virDomainCreate failed: %s\n",
        } else {
            virDomainInfo info = {0};
            virDomainGetInfo (domain, &info);
            printf ("state = %d\n", info.state);
            getchar ();

    virConnectClose (con);
    return 0;

# Automatically generated xen config file
name = "LinuxVM"
builder = "hvm"
memory = "500"
disk = [ 'phy:/dev/vgvms/LinuxVM,hda,w', ]
vif = [ 'type=ioemu, mac=7A:AB:D0:01:82:98', ]
uuid = "414e73de-cf1e-487c-87e0-d4ebf7a23576"
device_model = "/usr/lib/xen/bin/qemu-dm"
kernel = "/usr/lib/xen/boot/hvmloader"





serial = "pty" 
on_reboot   = 'restart'
on_crash    = 'restart'

> -----Original Message-----
> From: Daniel P. Berrange [mailto:berrange redhat com] 
> Sent: Wednesday, August 20, 2008 1:05 PM
> To: Richard W.M. Jones
> Cc: Matthew Donovan; libvir-list redhat com
> Subject: Re: [libvirt] Using Xen config files
> On Wed, Aug 20, 2008 at 04:44:04PM +0100, Richard W.M. Jones wrote:
> > On Wed, Aug 20, 2008 at 11:35:17AM -0400, Matthew Donovan wrote:
> > 
> > It certainly looks OK, and it seems like the domain should run after
> > virDomainCreate.  Have you tried adding a delay of 30 
> seconds just to
> > check if the domain is starting up slowly?
> Yep, that debug suggests the libvirt part of creation has 
> completed OK.
> I think if anything is going wrong, its going to be in XenD's 
> arena. I'd
> recommend looking in /var/log/xen for any further hints of trouble
> Daniel
> -- 
> |: Red Hat, Engineering, London   -o-   
> http://people.redhat.com/berrange/ :|
> |: http://libvirt.org  -o-  http://virt-manager.org  -o-  
> http://ovirt.org :|
> |: http://autobuild.org       -o-         
> http://search.cpan.org/~danberr/ :|
> |: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF 
> F742 7D3B 9505 :|

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]