Hi Jordan, The API associateIpAddress does not work for advanced zones with security groups.
In advanced zones with security groups, all Ips are public. You can use the API "listPublicIpAddresses" to get a list of IPs. https://cloudstack.apache.org/api/apidocs-4.17/apis/listPublicIpAddresses.html *forvirtualnetwork = false (for shared networks)* *allocatedonly = false (list all IPs including Free Ips, you can use state=Free instead)* *networkid = <id of the shared network>* -Wei On Wed, 8 Feb 2023 at 08:36, jordan j <[email protected]> wrote: > Hello everyone, > > Has anyone used Packer to build images on CS? > I decided to try it out but it looks like it needs a public IP to access > the VM console and push the initial ISO installation config. > > Unfortunately the setup I am working with does not create a public network > (by design - ACS 4.17.2 Advanced Zone + Security Groups). > So when Packer does queue the API with associateIpAddress > < > https://cloudstack.apache.org/api/apidocs-4.17/apis/associateIpAddress.html > > > to > get public IP - error "Insufficient address capacity" is returned as none > is found. > > Moreover the SSVMs use one of the guest networks (For example > 172.20.0.0/24) > to get an IP and use it for public services. The Console SVM uses guest IP > (172.20.0.10) as an access point when the console is requested from GUI and > it works. > > However when I put that IP in Packer config as a public ip so it does not > do a search query the following error is received - "Error retrieving UUID > of IP address 172.20.0.10". I suppose that happens because the guest IP is > not listed as public in the ACS Database. > > Is there a way to list a guest ip manually as a public? > Do you know of any workaround for using a Packer with a config without > public IPs? > > Regards, > Jordan >
