swapon_device


Description:

[ Version ( since = "1.0.66" ) ]
public bool swapon_device (string device) throws Error

enable swap on device

This command enables the libguestfs appliance to use the swap device or partition named device. The increased memory is made available for all commands, for example those run using command or sh.

Note that you should not swap to existing guest swap partitions unless you know what you are doing. They may contain hibernation information, or other information that the guest doesn't want you to trash. You also risk leaking information about the host to the guest this way. Instead, attach a new host device to the guest and swap on that.

Parameters:

this

A GuestfsSession object

Returns:

true on success, false on error