daviftorres commented on issue #8109:
URL: https://github.com/apache/cloudstack/issues/8109#issuecomment-3049967042

   > lternatively, try with CMK CLI tool without _rootdis_
   
   Hey @sureshanaparti , I did not set to overwrite root disk size: 
   
   <img width="221" height="50" alt="Image" 
src="https://github.com/user-attachments/assets/b87df34b-b61f-4059-aedf-2fd773f832f5";
 />
   
   I also tried using CloudMonkey without setting this option. It always 
happens!
   
   For the image of template, I followed 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Template+creation 
but I had to make a few modifications because this is over a decade old and 
things changes since.
   
   First, I tried to create a minimal Ubuntu 24.04 image myself:
   
   ```
   sudo mkdir -p /var/lib/libvirt/lxc/ubuntu-24.04-amd64
   sudo apt update && sudo apt install debootstrap -y
   sudo debootstrap --variant=minbase noble 
/var/lib/libvirt/lxc/ubuntu-24.04-amd64 http://archive.ubuntu.com/ubuntu
   sudo chroot /var/lib/libvirt/lxc/ubuntu-24.04-amd64 /bin/bash
   ```
   
   ```
           apt update && apt install net-tools cloud-init nano -y
           exit
   ```
   
   ```
   sudo rm -rf 
/var/lib/libvirt/lxc/ubuntu-24.04-amd64/var/cache/apt/archives/*.deb
   sudo rm -rf /var/lib/libvirt/lxc/ubuntu-24.04-amd64/tmp/*
   cd /var/lib/libvirt/lxc/ubuntu-24.04-amd64
   sudo tar --numeric-owner -czf /var/lib/libvirt/lxc/ubuntu-24.04-amd64.tar.gz 
.
   ```
   
   Then, I tried to pull with `lxd` and package the image:
   
   ```
   sudo lxd init
   lxc launch ubuntu
   lxc list
   lxc stop <image_name>
   cd /var/snap/lxd/common/lxd/containers/<image_name>/rootfs/
   tar --numeric-owner -czf /tmp/ubuntu.tar.gz .
   ```
   
   Finaly, I tried to find online old images that were packed as `.tar.gz` 
because in http://images.linuxcontainers.org/images/ the default format is 
`.tar.zx` and we cannot upload or register from URL with this extension. Here 
is what I tried:
   
   Ubuntu 22.04 
https://partner-images.canonical.com/oci/jammy/current/ubuntu-jammy-oci-amd64-root.tar.gz
   
   Ubuntu 20.04 
https://partner-images.canonical.com/oci/focal/current/ubuntu-focal-oci-amd64-root.tar.gz
   
   Ubuntu 14.04 
https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-root.tar.gz
   
   Debian 11 
https://ru.archive.ubuntu.com/mirrors/download.proxmox.com/images/system/debian-11-standard_11.3-0_amd64.tar.gz
   
   Reflections:
   
   It seams not to be the case of an issue with the image (new or old, manually 
crafted or official). It looks like an issue with CloudStack Manager when 
processing the request because nothing happens on the CS-Agent of the LXC Host.
   
   ```
   apilog.log:2025-07-07 19:25:06,931 INFO  [a.c.c.a.ApiServlet] 
(qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) (logid:7f89734d) (userId=2 
accountId=2 sessionId=<redacted>) <redacted> -- GET 
zoneid=5566dfa3-5259-438b-9f9a-2ea4568247b0&boottype=BIOS&bootmode=LEGACY&dynamicscalingenabled=false&iothreadsenabled=false&templateid=1b0cc66f-2140-45f0-92cc-1285b702ed93&rootdisksize=10&startvm=true&serviceofferingid=56ba40f3-5951-4deb-8b28-fa08c11d0207&affinitygroupids=&iptonetworklist[0].networkid=bd4bf2a2-051f-4f3c-8d44-11d2fd4e523d&keypairs=&account=admin&domainid=81c929c6-380a-11f0-a15d-525400e0a405&command=deployVirtualMachine&response=json&sessionkey=<redacted>
 431 Hypervisor LXC does not support rootdisksize override
   management-server.log:2025-07-07 19:25:06,816 DEBUG [c.c.a.ApiServlet] 
(qtp1404565079-386:[ctx-7c8192eb]) (logid:7f89734d) found ip <redacted> in 
header X-Forwarded-For
   management-server.log:2025-07-07 19:25:06,818 DEBUG [c.c.a.ApiServlet] 
(qtp1404565079-386:[ctx-7c8192eb]) (logid:7f89734d) ===START===  <redacted> -- 
GET  
zoneid=5566dfa3-5259-438b-9f9a-2ea4568247b0&boottype=BIOS&bootmode=LEGACY&dynamicscalingenabled=false&iothreadsenabled=false&templateid=1b0cc66f-2140-45f0-92cc-1285b702ed93&rootdisksize=10&startvm=true&serviceofferingid=56ba40f3-5951-4deb-8b28-fa08c11d0207&affinitygroupids=&iptonetworklist[0].networkid=bd4bf2a2-051f-4f3c-8d44-11d2fd4e523d&keypairs=&account=admin&domainid=81c929c6-380a-11f0-a15d-525400e0a405&command=deployVirtualMachine&response=json&sessionkey=<redacted>
   management-server.log:2025-07-07 19:25:06,818 DEBUG [c.c.a.ApiServlet] 
(qtp1404565079-386:[ctx-7c8192eb]) (logid:7f89734d) Two factor authentication 
is already verified for the user 2, so skipping
   management-server.log:2025-07-07 19:25:06,834 DEBUG [c.c.a.ApiServer] 
(qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) (logid:7f89734d) CIDRs from 
which account 'Account 
[{"accountName":"admin","id":2,"uuid":"dcc60ea7-380a-11f0-a15d-525400e0a405"}]' 
is allowed to perform API calls: 0.0.0.0/0,::/0
   management-server.log:2025-07-07 19:25:06,840 INFO  
[o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp1404565079-386:[ctx-7c8192eb, 
ctx-9b5fb8b1]) (logid:7f89734d) Account for user id 
dcc74073-380a-11f0-a15d-525400e0a405 is Root Admin or Domain Admin, all APIs 
are allowed.
   management-server.log:2025-07-07 19:25:06,840 DEBUG 
[o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp1404565079-386:[ctx-7c8192eb, 
ctx-9b5fb8b1]) (logid:7f89734d) RoleService is enabled. We will use it instead 
of StaticRoleBasedAPIAccessChecker.
   management-server.log:2025-07-07 19:25:06,840 DEBUG 
[o.a.c.r.ApiRateLimitServiceImpl] (qtp1404565079-386:[ctx-7c8192eb, 
ctx-9b5fb8b1]) (logid:7f89734d) API rate limiting is disabled. We will not use 
ApiRateLimitService.
   management-server.log:2025-07-07 19:25:06,869 DEBUG 
[c.c.u.AccountManagerImpl] (qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) 
(logid:7f89734d) Account [Account 
[{"accountName":"admin","id":2,"uuid":"dcc60ea7-380a-11f0-a15d-525400e0a405"}]] 
has access to resource.
   management-server.log:2025-07-07 19:25:06,872 DEBUG 
[c.c.u.AccountManagerImpl] (qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) 
(logid:7f89734d) Account [Account 
[{"accountName":"admin","id":2,"uuid":"dcc60ea7-380a-11f0-a15d-525400e0a405"}]] 
has access to resource.
   management-server.log:2025-07-07 19:25:06,892 DEBUG 
[o.a.c.u.UserDataManagerImpl] (qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) 
(logid:7f89734d) Null/empty base64 encoded user data set
   management-server.log:2025-07-07 19:25:06,902 DEBUG 
[c.c.u.AccountManagerImpl] (qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) 
(logid:7f89734d) Access granted to Account 
[{"accountName":"admin","id":2,"uuid":"dcc60ea7-380a-11f0-a15d-525400e0a405"}] 
to Service offering {"id":1,"name":"Small 
Instance","uuid":"56ba40f3-5951-4deb-8b28-fa08c11d0207"}. by 
AffinityGroupAccessChecker
   management-server.log:2025-07-07 19:25:06,903 DEBUG 
[c.c.u.AccountManagerImpl] (qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) 
(logid:7f89734d) Access granted to Account 
[{"accountName":"admin","id":2,"uuid":"dcc60ea7-380a-11f0-a15d-525400e0a405"}] 
to null by AffinityGroupAccessChecker
   management-server.log:2025-07-07 19:25:06,908 INFO  [c.c.n.NetworkModelImpl] 
(qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) (logid:7f89734d) Checking 
permission for account Account 
[{"accountName":"admin","id":2,"uuid":"dcc60ea7-380a-11f0-a15d-525400e0a405"}] 
on network Network {"id": 215, "name": "lxc-lan", "uuid": 
"bd4bf2a2-051f-4f3c-8d44-11d2fd4e523d", "networkofferingid": 10}
   management-server.log:2025-07-07 19:25:06,929 INFO  [c.c.a.ApiServer] 
(qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) (logid:7f89734d) Hypervisor 
LXC does not support rootdisksize override
   management-server.log:2025-07-07 19:25:06,931 DEBUG [c.c.a.ApiServlet] 
(qtp1404565079-386:[ctx-7c8192eb, ctx-9b5fb8b1]) (logid:7f89734d) ===END===  
<redacted> -- GET  
zoneid=5566dfa3-5259-438b-9f9a-2ea4568247b0&boottype=BIOS&bootmode=LEGACY&dynamicscalingenabled=false&iothreadsenabled=false&templateid=1b0cc66f-2140-45f0-92cc-1285b702ed93&rootdisksize=10&startvm=true&serviceofferingid=56ba40f3-5951-4deb-8b28-fa08c11d0207&affinitygroupids=&iptonetworklist[0].networkid=bd4bf2a2-051f-4f3c-8d44-11d2fd4e523d&keypairs=&account=admin&domainid=81c929c6-380a-11f0-a15d-525400e0a405&command=deployVirtualMachine&response=json&sessionkey=<redacted>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to