<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4; background-color: rgb(255, 255, 255);">
Hi ,</p>
<p style="margin: 0px 0px 1em;"><font color="#404040" face="Verdana,Helvetica,Arial,sans-serif"><span style="font-size: 12px; line-height: 16px;">I</span></font><span style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 1.4; background-color: rgb(255, 254, 254);"> was
trying to make libvirt work with </span><font color="#404040" face="Verdana,Helvetica,Arial,sans-serif"><span style="font-size: 12px; line-height: 16px;">containers, so </span></font><span style="background-color: rgb(255, 255, 255); color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 1.4;">I
created the container with lxc-create and then used the virsh define command to define the container xml file, but it gives me the error shown at the end:</span></p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4; background-color: rgb(255, 255, 255);">
root@/scripts#lxc-create -t ubuntu -n cn-name</p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4; background-color: rgb(255, 255, 255);">
root@/scripts# virsh -c lxc:// define cn.xml<br>
error: Failed to define domain from cn.xml<br>
error: operation failed: domain ‘cn-name’ already exists with uuid 42e4d176-eddb-42a2-95f2-2d6448b787c3</p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4; background-color: rgb(255, 255, 255);">
Any idea why?</p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4; background-color: rgb(255, 255, 255);">
If I destroy the container created with lxc-create, then virsh -c lxc:// define cn.xml works fine.</p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4;">
<span style="background-color: rgb(255, 254, 254);">However, then no rootfs is created for the container in /var/lib/lxc/cn-name/.</span></p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4;">
<span style="background-color: rgb(254, 253, 253);">How to get around this problem?</span></p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4;">
<span style="background-color: rgb(254, 253, 253);"><br>
</span></p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4;">
<span style="background-color: rgb(253, 252, 252);">Thanks</span></p>
<p style="color: rgb(64, 64, 64); font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px 0px 1em; line-height: 1.4;">
<span style="background-color: rgb(252, 251, 251);">Anjali</span></p>
</body>
</html>