question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues with waagent.conf and swap

See original GitHub issue

I am currently trying to set-up swap on my Ubuntu 16 VM. I am following the standard procedure and have set waagent.conf accordingly:

ResourceDisk.Format=y
ResourceDisk.Filesystem=ext4
ResourceDisk.MountPoint=/mnt/resource
ResourceDisk.EnableSwap=y
ResourceDisk.SwapSizeMB=64000

Just restarting the service does nothing. After rebooting, if I instantly type free -m I can see the swap. But a moment later it is gone. When I re-check waagent.conf also ResourceDisk.Format is set to no automatically: ResourceDisk.Format=n.

On my other vms it works flawlessly. The only difference is, that on this VM I have an encrypted disk, lsblk output:

sdb                                        8:16   0   678G  0 disk
└─sdb1                                     8:17   0   678G  0 part
  └─xxx                                  253:1    0   678G  0 crypt /mnt/resource

Any ideas?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
psingercommented, Aug 24, 2018

@hglkrijger @ejarvi It partly explains what happens, but I am still not sure how to enable swap then.

0reactions
hglkrijgercommented, Aug 22, 2018

@psinger let us know if that does not answer your question.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swap file is not re-created after a Linux VM restarts
Resolution. To resolve this problem, follow these steps: Disable resource disk formatting and swap configuration within waagent configuration ...
Read more >
[WALA][RHEL-7]waagent fails to create swapfile if fstype is ext3
Prepare a RHEL7.3 VM on Azure. Set the following lines in the /etc/waagent.conf: ResourceDisk.Format=y ResourceDisk.Filesystem=ext3 ResourceDisk.EnableSwap=y ...
Read more >
Error retrieving swap info from /proc/swaps on RSA ...
Issue. RSA NetWitness host that is deployed in Azure platform shows /var/log/messages ... Update /etc/waagent.conf with below parameters and save it:
Read more >
how to fix swap issues in azure vm - nixdrafts
Save the configuration before change as standard practice of servers administrators. #cp –p /etc/waagent.conf /etc/waagent.conf.$date # cat /etc ...
Read more >
Mount point changes and Non-standard SWAP disk creation ...
The issue we have seen is that the changes work but only till you restart. ... Step 4 - Edit the /etc/waagent.conf file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found