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

[Xen-API] VM.create


  • To: xen-api@xxxxxxxxxxxxxxxxxxx
  • From: "Michał Krysiński" <rozbudowywowywacz@xxxxxxxxx>
  • Date: Fri, 4 Jul 2008 15:38:00 +0200
  • Delivery-date: Fri, 04 Jul 2008 06:38:05 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=lmKFf5m09Whw6X4n+ZSayg087zta7iu6ELRBm7gZhCMuyk6X3EO0UjZE+H1+ANk2WZ yeZUVoGQ9FiVrUCVeCjQZ4Hxmlz9fMU0l3x1kiYMhBLHsfbalvtRgn5eY1dmn6J2Q6Ex Abru4lys/rfMNB65Q+MNP6SL/uxSEssZfkcRI=
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

Hello,
I'm working on a project involving the dynamic management of Xen domains. I'm using the open source version of Xen (3.2), LVM for storage and Java bindings. I was able to list running VMs by calling VM.getAllRecords(connection). The next thing I'm trying to do is to create a new VM. It's not a problem with the command line tool xm:.

xm create myConfig -c

here are the contents of the config file:

name="debianGuest"
memory=256
kernel="/boot/vmlinuz-2.6.24-18-xen"
ramdisk="/boot/initrd.img-2.6.24-18-xen"
vif=['bridge=eth0']
disk=['phy:/dev/xen-disks/debianGuestRoot,sda1,w','phy:/dev/xen-disks/debianGuestSwap,sda2,w']
root="/dev/sda1 ro"

How am I supposed to do the same thing with Java calls (the problem is with the disk part, other arguments seem rather straighforward)?
       
       VDI.Record vdirec = new VDI.Record();
        vdirec.location = "phy:/dev/xen-disks/debianGuestRoot";
        vdirec.nameLabel = "debianGuestRoot";
        try {
            VDI.create(c,vdirec);
            //fails: [HANDLE_INVALID, SR, OpaqueRef:NULL]
        } catch ...
       
Should I create an SR or introduce the partition storing LVM images to Xen somehow? (SR.introduce fails: MESSAGE_METHOD_UNKNOWN)

Regards, Michał Krysiński
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.