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

Re: [libvirt] libvirt XML format.

Thanks for the reply Matt.
I created a Linux Container(container1) using lxc-tools. I created a
Domain(container1_vm) using libvirt and want to mount that container
file system in the created Domain. For that, I created following XML
<domain type='lxc' id='1'>
      <clock offset='utc'/>
  	<filesystem type='mount'>
	  <source dir='/var/lib/lxc/container1/rootfs/rootfs'/> 
	  <target dir='/'/> 
	<console type='pty' />

The above XML worked fine, and domain started.
Now, I created a bridge br0 in the host machine with the IP
I want to assign an IP address[] to the domain, so that the
host machine and domain will ping each other. I tried to assign
'default' network to the domain by adding the following XML block to the
above XML file:
        <interface type='network'>
          <source network='default'/>
But, when I start the domain I got the following error in the virsh

error: Failed to start domain vm1_fedora
error: Failed to add veth0 device to virbr0: No such device

Can you please let me know the XML format for assigning a statis IP
address to the Domain?


-----Original Message-----
From: libvir-list-bounces redhat com
[mailto:libvir-list-bounces redhat com] On Behalf Of Matthew Booth
Sent: Wednesday, February 17, 2010 7:38 PM
To: libvir-list redhat com
Subject: Re: [libvirt] libvirt XML format.

On 17/02/10 12:36, Kumar L Srikanth-B22348 wrote:
> Hi,

Hi Kumar,

> I have some doubts regarding libvirt XML format.
> Can anyone please let me know in detail, what is /<source>/ and 
> /<target>/ tags in the libvirt XML format?

The best documentation is available here:

If that's not enough, could you post an example of what you're trying to
do? Doesn't matter if it's wrong.

> Can I put '/' in the /<target>/ tag or are there any exceptions if I 
> put '/' in that?

The domain XML is a valid XML document. Syntactically, you can put /
anywhere it would be valid in an XML document.

Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490

libvir-list mailing list
libvir-list redhat com

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