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-api

[Xen-API] VM.create

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] VM.create
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=R0xqXEhp8t5IexzoUbQSMQoevJTP37za3/fR0lGfUxI=; b=sKGX4DDXvxdIht2S5FIa6uxaUCQkODUTek93ngWx/HuZ7b0VAx86P1/k3gp9U/EUhp jJPNrcyGBtT30HkdAuhV2Yr42mFPpx1v8NwiDlEnEWuX6xrxwqbrFiU1Vbv3gsKOa7Eo yiK6WUEeAVCymLqov83Xd65EVAhHoIKwnQzE4=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>