1.3 Azure Image build error

Hello team,

I have encountered some errors while building an Azure Image for VyOS 1.3 for my Lab environment but I’m unable to troubleshoot the issue and any help would be very appreciated

Note: I’m aware that there’s a supported image from Sentrium but my MSDN subscription credits are not eligible for using it, so that’s why I have decided to pursue this path

The observed behavior is that, after provisioning, several messages are displayed in the console log with the following information:

2022/04/29 17:57:29.945980 ERROR /proc/net/route contains no routes
2022/04/29 17:57:31.956303 ERROR /proc/net/route contains no routes
[ 1082.249001] vyos-config[3150]: Configuration success
2022/04/29 17:57:33.966396 ERROR /proc/net/route contains no routes
2022/04/29 17:57:35.976681 ERROR /proc/net/route contains no routes
2022/04/29 17:57:37.987972 ERROR /proc/net/route contains no routes
[ 1087.280432] vyos-config[3155]: Configuration success
2022/04/29 17:57:39.998626 ERROR /proc/net/route contains no routes
2022/04/29 17:57:42.009282 ERROR /proc/net/route contains no routes
[ 1092.313556] vyos-config[3161]: Configuration success
2022/04/29 17:57:44.019773 ERROR /proc/net/route contains no routes
2022/04/29 17:57:46.030507 ERROR /proc/net/route contains no routes
2022/04/29 17:57:48.041830 ERROR /proc/net/route contains no routes
[ 1097.347696] vyos-config[3166]: Configuration success
2022/04/29 17:57:50.052624 ERROR /proc/net/route contains no routes
2022/04/29 17:57:52.063792 ERROR /proc/net/route contains no routes
[ 1102.379570] vyos-config[3172]: Configuration success

I have found some articles that could help in determining the root cause (most likely a DHCP client issue) but considering that I’m unable to connect to this machine using serial console because credentials specified during deployment are not working (possibly due uncomplete deployment) I can’t figure out the root cause to fix this.

Below is the procedure I have used to create and upload the image, resulting in this error after provisioning:

  1. Built image using the commands below

    # Pull the latest Docker Image
    docker pull vyos/vyos-build:equuleus
    # Cloned latest Branch version
    git clone -b equuleus --single-branch https://github.com/vyos/vyos-build
    # Fixed walinuxagent dependency, replaced by waagent from debian base repository
    ## I expect to file a Phabricator issue and a Repository PR as soon as I get this fixed :)
    sed -i 's/walinuxagent/waagent/' ./tools/cloud-init/azure/vyos-azure.list.chroot
    # Run build process and exit docker container
    cd vyos-build
    docker run --rm -it --privileged -v $(pwd):/vyos -w /vyos vyos/vyos-build:equuleus bash
    ./configure --architecture amd64 --build-by "john@doe.com"
    sudo make azure
  2. Uploaded image to Azure

    # Azure CLI Login
    az login
    az account set --subscription "Subscription Name"
    # Variable definition
    DATE=$(date +%Y%m%d)
    # Disk Creation and Upload
    az disk create -n $DISK -g $RG -l $LOCATION --for-upload --upload-size-bytes "10737418752" --sku standard_lrs --hyper-v-generation V1
    ACCESS=$(az disk grant-access -n $DISK -g $RG --access-level write --duration-in-seconds 86400 --query accessSas -o tsv)
    ~/azcopy/azcopy copy "$PWD/build/VyOS-$DATE.vhd" "$ACCESS" --blob-type PageBlob
    az disk revoke-access -n $DISK -g $RG
    # Image Creation - for easier deployment
    az image create -g $RG -n $DISK --os-type linux --source $(az disk show -g $RG -n $DISK --query id -o tsv)

I have even tried to modify Makefile in order to include 99-debug-user.chroot in Azure build as example of what can be seen in other options but seems to be missing something in my tests.

Any insights would be very appreciated!

Hi Aerahurc,
Are you already run the image you built on azure? Follow you instructions, I can run build image on azure. But I can’t access the server. I can’t ping or ssh login.

hi @echowings ,

That’s exactly the issue I was facing when created this topic.
A possible issue during deployment prevents user creation, as well as IP configuration in the image.

The workaround I have found was creating a custom media, appending the custom-package parameter to ./configure script, install from hyper-v and upload a specialized image to azure.

./configure --architecture amd64 --build-by "john@doe.com" --custom-package waagent
sudo make iso

Unfortunately I had no time to troubleshoot the image creation process and use it from the process I have mentioned above.

makefile removed azure/gce/aws on vyos 1.4. So if we want to run vyos on cloud platform. we just need to debug by ourself.:frowning:

I believe that cloud platform make instructions aren’t there yet because the current stable version is still 1.3. They might add it when it’s near its release.

About the issue, seems to be something related to DHCP client. If you attach a custom boot diagnostics storage you’ll be able to connect to the VM serial port, but the user instructed to be created via VM Provisioning isn’t there as machine wasn’t able to communicate with the autoconfiguration addresses (IDMS).

To troubleshoot this we need support from someone more familiar with the build process or dig a little deeper to understand how to add a debug account, so we can log in to the image via serial console and find the root cause, fixing it in the build process configuration.

Hi Zerahzurc
After deploy the image on azure. and I tried and successed to enable serial console on azure, I got the same error as you show. But I also got some error ,seem like the cloud-init didn’t enable eth0

[   14.786108] cloud-init[769]: Cloud-init v. 22.1-432-g45c1d42e-1~bddeb running 'init-local' at Sun, 19 Jun 2022 10:41:18 +0000. Up 14.06 seconds.
[   14.804186] cloud-init[769]: 2022-06-19 10:41:19,215 - stages.py[ERROR]: Unable to render networking. Network config is likely broken: No available network renderers found. Searched through list: ['netplan', 'eni', 'sysconfig']
[  OK  ] Started Initial cloud-init job (pre-networking).
         Starting Initial cloud-ini… (metadata service crawler)...
[  OK  ] Reached target Network (Pre).
[  OK  ] Reached target Network.
1 Like

Hi zerahzurc
Good news! I finally install vyos on azure successfully without any error.


Great news!
Did you changed anything in cloud-init file to make it work?

Another way to let vyos running on the azure. You can test it for me.