|
|
|
|
|
|
|
|
|
|
xen-api
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>
|
- [Xen-API] VM.create,
Michał Krysiński <=
|
|
|
|
|