<div dir="ltr">Thank you Fajar and <span style="font-size:12.800000190734863px">Stéphane for clearing this all up. My migrations are working perfectly using LXD and the "correct" set of commands/tools for LXD.</span><div><span style="font-size:12.800000190734863px"><br></span><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">Regards, Gabriel</span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 24, 2017 at 8:17 AM, Stéphane Graber <span dir="ltr"><<a href="mailto:stgraber@ubuntu.com" target="_blank">stgraber@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The problem here is that you're mixing LXC and LXD containers.<br>
<br>
The list of containers you showed camed from "lxc-ls" which is the LXC<br>
command line tool.<br>
<br>
You then went on to use those container names with "lxc profile" which<br>
is the LXD command line tool. Since those containers aren't managed by<br>
LXD, you can't assign profiles to them.<br>
<br>
<br>
<br>
Unless you're in the middle of switching from LXC to LXD, you really<br>
shouldn't have both set of tools installed as this leads to this kind of<br>
confusion.<br>
<br>
Stéphane<br>
<span class=""><br>
On Fri, Mar 24, 2017 at 08:10:50AM +0200, Gabriel Marais wrote:<br>
> Thanks for the reply. It seems like none of the commands work:-<br>
><br>
> lxc profile assign<br>
> lxc profile apply<br>
><br>
> I am going to setup my (test) pre-production environment today and take<br>
> another look at the profiles again on that environment.<br>
><br>
><br>
> Regards, Gabriel<br>
><br>
> On Wed, Mar 22, 2017 at 2:03 PM, Jamie Brown <<a href="mailto:Jamie.Brown@mpec.co.uk">Jamie.Brown@mpec.co.uk</a>> wrote:<br>
><br>
> > This may not be the answer but I think the client commands for applying<br>
> > profiles have changed, so depending on your version it could be that you<br>
> > need to use one of;<br>
> ><br>
> ><br>
> ><br>
> > lxc profile assign [<remote>:]<container> <profiles><br>
> ><br>
> > lxc profile add [<remote>:]<container> <profile><br>
> ><br>
> > lxc profile remove [<remote>:]<container> <profile><br>
> ><br>
> ><br>
> ><br>
> > Rather than lxc profile apply.<br>
> ><br>
> ><br>
> ><br>
</span>> > *From: *lxc-users <<a href="mailto:lxc-users-bounces@lists.linuxcontainers.org">lxc-users-bounces@lists.<wbr>linuxcontainers.org</a>> on behalf<br>
> > of Gabriel Marais <<a href="mailto:gabriel.j.marais@gmail.com">gabriel.j.marais@gmail.com</a>><br>
> > *Reply-To: *LXC users mailing-list <<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a>><br>
> > *Date: *Wednesday, 22 March 2017 at 11:50<br>
> > *To: *"<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a>" <lxc-users@lists.<br>
> > <a href="http://linuxcontainers.org" rel="noreferrer" target="_blank">linuxcontainers.org</a>><br>
> > *Subject: *[lxc-users] Profile Assignment Error<br>
<span class="">> ><br>
> ><br>
> ><br>
> > Hi Guys<br>
> ><br>
> ><br>
> ><br>
> > I am having an issue assigning a profile to a container. Below my steps:-<br>
> ><br>
> ><br>
> ><br>
> > 1. List Profiles<br>
> ><br>
</span>> > [13:43:12] root@vm-server-01:*~* # lxc profile list<br>
<span class="">> ><br>
> > +---------+---------+<br>
> ><br>
> > |  NAME   | USED BY |<br>
> ><br>
> > +---------+---------+<br>
> ><br>
> > | default | 0       |<br>
> ><br>
> > +---------+---------+<br>
> ><br>
> > | docker  | 0       |<br>
> ><br>
> > +---------+---------+<br>
> ><br>
> ><br>
> ><br>
> > 2. Create a new Profile<br>
> ><br>
</span>> > [13:43:18] root@vm-server-01:*~* # lxc profile create migratetest<br>
> ><br>
> > Profile migratetest created<br>
> ><br>
> ><br>
> ><br>
> > [13:46:47] root@vm-server-01:*~* # lxc profile list<br>
<span class="">> ><br>
> > +-------------+---------+<br>
> ><br>
> > |    NAME     | USED BY |<br>
> ><br>
> > +-------------+---------+<br>
> ><br>
> > | default     | 0       |<br>
> ><br>
> > +-------------+---------+<br>
> ><br>
> > | docker      | 0       |<br>
> ><br>
> > +-------------+---------+<br>
> ><br>
> > | migratetest | 0       |<br>
> ><br>
> > +-------------+---------+<br>
> ><br>
> ><br>
> ><br>
</span>> > [13:48:47] root@vm-server-01:*~* # lxc-ls --fancy<br>
<span class="">> ><br>
> > NAME        STATE   AUTOSTART GROUPS IPV4 IPV6<br>
> ><br>
> > paulus-test STOPPED 0         -      -    -<br>
> ><br>
> > snappy_1604 STOPPED 0         -      -    -<br>
> ><br>
> > ubuntu_1404 STOPPED 0         -      -    -<br>
> ><br>
> > ubuntu_1604 STOPPED 0         -      -    -<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > 3. Link the container to the profile<br>
> ><br>
</span>> > [13:45:21] root@vm-server-01:*~* # lxc profile apply ubuntu_1404<br>
<div class="HOEnZb"><div class="h5">> > migratetest --debug<br>
> ><br>
> > DBUG[03-22|13:46:47] Raw response: {"type":"sync","status":"<br>
> > Success","status_code":200,"<wbr>operation":"","error_code":0,"<br>
> > error":"","metadata":{"config"<wbr>:{"core.trust_password":true,"<br>
> > images.auto_update_cached":"<wbr>false","images.auto_update_<br>
> > interval":"24","images.remote_<wbr>cache_expiry":"5"},"api_<br>
> > extensions":["storage_zfs_<wbr>remove_snapshots","container_<br>
> > host_shutdown_timeout","<wbr>container_syscall_filtering","<br>
> > auth_pki","container_last_<wbr>used_at","etag","patch","usb_<br>
> > devices","https_allowed_<wbr>credentials","image_<wbr>compression_algorithm","<br>
> > directory_manipulation","<wbr>container_cpu_time","storage_<br>
> > zfs_use_refquota","storage_<wbr>lvm_mount_options","network","<br>
> > profile_usedby","container_<wbr>push","container_exec_<wbr>recording","certificate_<br>
> > update","container_exec_<wbr>signal_handling","gpu_devices"<br>
> > ,"container_image_properties",<wbr>"migration_progress","id_map",<br>
> > "network_firewall_filtering","<wbr>network_routes","storage","<br>
> > file_delete","file_append","<wbr>network_dhcp_expiry","storage_<br>
> > lvm_vg_rename","storage_lvm_<wbr>thinpool_rename","network_<br>
> > vlan","image_create_aliases","<wbr>container_stateless_copy"],"<br>
> > api_status":"stable","api_<wbr>version":"1.0","auth":"<wbr>trusted","public":false,"<br>
> > environment":{"addresses":[],"<wbr>architectures":["x86_64","<br>
> > i686"],"certificate":"-----<wbr>BEGIN CERTIFICATE-----\<wbr>nMIIFXjCCA0agAwIBAgIQE9+<br>
> > oSwckHm0nytRugNyHnTANBgkqhkiG9<wbr>w0BAQsFADA6\<wbr>nMRwwGgYDVQQKExNsaW51eGNvbnRha<br>
> > W5lcnMub3JnMRowGAYDVQQDDBFyb29<wbr>0QHZt\<wbr>nLXNlcnZlci0wMTAeFw0xNzAzMjIwO<br>
> > TI3NTJaFw0yNzAzMjAwOTI3NTJaMDo<wbr>xHDAa\<wbr>nBgNVBAoTE2xpbnV4Y29udGFpbmVyc<br>
> > y5vcmcxGjAYBgNVBAMMEXJvb3RAdm0<wbr>tc2Vy\<wbr>ndmVyLTAxMIICIjANBgkqhkiG9w0BA<br>
> > QEFAAOCAg8AMIICCgKCAgEArHikisF<wbr>du0cq\nsgZw+n1jhyLf/C8H+<br>
> > ANs5eWHxStqSY/wShQSY7mujVLhvu/<wbr>mM/awGmbeqISwGskN\<wbr>nsVBC7fkCqWf3vf/<br>
> > n6FlzOWwD1x3FSGqYfAbO+<wbr>uXFQxsYA6BZQiUjhtEb/4Ks2ok2\<wbr>nil/<br>
> > t5IfBaEtIO25ES4jw2U1pytOd63Eu2<wbr>5B9wMmX4k/vj5n/Nk/<wbr>PQgVkz3VHNCXm\<br>
> > nqDMnH0rOCPjP8Tr1ZYMruVxZ9Q1GF<wbr>R+BGvomDKzLYRmJJnToJJMmva+qmv+<wbr>Mg3Md\<br>
> > nS9L1WXTd7S888SVNQm6lK5R/<wbr>NPkKkEkA92Z926pVI3irpL9dfvLxO+<br>
> > 5ph2rjppZO\n3+UO+g4MIfZbznA9+<wbr>FF9Sac7/<wbr>qymmRUkqZMvWyBRWOSYhRcEMrpCBIn<br>
> > 8xJPLbtmL\n1vEC2C/<wbr>OSDDrwvAb29nWjg6AkXX+<wbr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wbr>BD9pTUKtj6kTXQ4C5\<br>
> > nqddYtOOd3sLOX0LroX1s8bjCe7qik<wbr>RKGb3VbAQMhuGPK+xNQ/6Yy+<wbr>TLij70j1HI1\<br>
> > ngHuAUrxfsIbRzKXUq7m2KMopedcRH<wbr>eeWgGsAbI45F4w2QFBTtFz+<wbr>9i3NMixtLL3a\<br>
> > nD7lR6v71VjhuGeUecCY8XZmq1DQsc<wbr>OgKPdqCX+<wbr>LV2lQ82JdTACk4G5aAP0RnwG3k\nm/<br>
> > UgEHt84g+<wbr>L1gHDkKS1N4EhekK8tGiLXebJnuRYT<wbr>lG/4A==\n-----END<br>
> > CERTIFICATE-----\n","<wbr>certificate_fingerprint":"","<br>
> > driver":"lxc","driver_version"<wbr>:"2.0.7","kernel":"Linux","<br>
> > kernel_architecture":"x86_64",<wbr>"kernel_version":"4.4.0-62-<br>
> > generic","server":"lxd","<wbr>server_pid":1555,"server_<br>
> > version":"2.12","storage":"","<wbr>storage_version":""}}}<br>
> ><br>
> ><br>
> ><br>
> > DBUG[03-22|13:46:47] Raw response: {"error":"not<br>
> > found","error_code":404,"type"<wbr>:"error"}<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > Even with the container started, I get the same error. Can someone perhaps<br>
> > point me in the right direction?<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > Thanks, Gabriel<br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > lxc-users mailing list<br>
> > <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
> > <a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br>
> ><br>
<br>
> ______________________________<wbr>_________________<br>
> lxc-users mailing list<br>
> <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
> <a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Stéphane Graber<br>
Ubuntu developer<br>
<a href="http://www.ubuntu.com" rel="noreferrer" target="_blank">http://www.ubuntu.com</a><br>
</font></span><br>______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br></blockquote></div><br></div>