On 11/16/11 06:16, Preethi Ramesh wrote:


I'm a Libvirt newbie and I'd really appreciate it if someone could answer my doubts. I'm using Libvirt's Java API.
My doubts:

1.Currently, I'm able to create a VM on Ubuntu 11.04 using Libvirt functions domainCreateLinux() and domainDefineXML(). Apart fromt the boolean return status of these operations and running the virsh list command, is there any way to SSH in (login) to the newly created VMs  and run applications on them? I tried running virsh console but nothing comes up. Also I tried fixing the XML file to accommodate the console operation(link) but that was unsuccessful too.


The route command on the host will show the newly added routes for the VM. Also, tail your syslog file & you will see messages about every 15 min. from dnsmasq w/ the IP adder. of the VM.


Hand editing the XML file is not recommended, usually won't work, try the 'virsh edit' command, that will make sure that the edited stuff gets saved properly & gets communicated to the VM's.



2. If yes, how can I get the IP of the VM created?

3. Is there any function to create image files(in any format qcow or qcow2) using Libvirt API? Right now, I'm using a shell script which creates the image from it's iso.

Thanks in advance
P Ramesh
 

_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users


-- 

	William A. Mahaffey III

 ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                           -- Gen. George S. Patton Jr.