Install kLWC on Ubuntu 22.04 LTS
Use this topic to understand how to deploy the kLWC VM in an Ubuntu 22.04 LTS environment.
These steps are specific to Ubuntu 22.04 LTS. Commands and behavior may differ for other Linux distributions. Refer to the Linux documentation for distribution-specific variations.
To install the kLWC VM in your Ubuntu 22.04 LTS environment:
- Log in to the Ubuntu host system using your username and password.
-
Create a working directory for the kLWC Manager script.
root@server2:~# mkdir /opt/klwc root@server2:~# cd /opt/klwc root@server2:/opt/klwc# ls root@server2:/opt/klwc# scp root@<remote-server-ip>:Downloads/klwc-manager.sh . root@server2:/opt/klwc# chown -R 4000:4000 /opt/klwc root@server2:/opt/klwc# chmod +x klwc-manager.sh
Note:The kLWC Manager can be placed in any directory. In this example, the file is placed in
/opt/klwc. -
Run the kLWC Manager setup.
./klwc-manager.sh -setup
During setup, the required dependencies and missing packages are installed, user permissions configured, required commands verified, and directory structure is created.Note:-
Run this step as the root user or with sudo.
- If KVM is installed during setup, reboot the host system before proceeding.
After setup is complete, your directory should look like:
root@server2:/opt/klwc# ls -l total 140 drwxr-xr-x 3 klwcuser klwcuser 4096 Jul 24 11:51 config -rwxrwxr-x 1 klwcuser klwcuser 123907 Jul 24 11:49 klwc-manager.sh drwxr-xr-x 2 klwcuser klwcuser 4096 Jul 24 11:53 packages
-
-
Switch to the kLWC user.
If setup was performed as root, switch to the user that will manage kLWC:
su - <klwc-user> cd /opt/klwc
-
Upload the kLWC package.
Copy the kLWC
.tgzpackage you received from HPE into thepackagesdirectory.Use this command to copy:
scp root@<remote-server-ip>:/Downloads/klwc/KLWC<serial>-klwc-<version>.tgz packages
To verify:
ls -l packages
Note:Ensure correct ownership and read permissions for the user running kLWC Manager.
-
Create a kLWC instance.
Run the following command to create a new kLWC instance:
klwc-manager.sh -create
Then, enter an instance name.
Note:Instance names cannot be changed directly after creation.
Use
-renameoption to rename the instance. Do not manually rename instance directories.The kLWC Manager prompts you to configure the following: package file, linux bridge interface names(int, ext, cap), IP configuration, proxy settings (if required).
Note:Ensure that the specified Linux bridge interfaces already exist.
Sample configuration:
Current Configuration: Package File: KLWC<serial-number>-klwc-<version>.tgz Internal Interface: int0 External Interface: ext0 Captive Interface: cap0 Internal Type: STATIC Internal Address: 1*.*.*.2 Internal Prefix: 24 Internal Gateway: 1*.*.*.1 Internal DNS: 10.1.10.1 Internal v6 Type: NONE Internal v6 Address: Internal v6 Prefix: Internal v6 Gateway: Internal v6 DNS: External Type: STATIC External Address: 1*.*.*.3 External Prefix: 24 External Gateway: 1*.*.**.4 External DNS: 1*.*.**.4 Captive Type: STATIC Captive Address: 10.1.30.2 Captive Prefix: 24 Captive Gateway: 10.**.30.* Captive DNS: 10.*.30.** Proxy Address: Proxy Port: Proxy Username: Proxy Password:
-
Confirm configuration.
After entering values, type
confirmto proceed with deployment.If you need to modify any setting, enter the setting name. Type 'confirm' to proceed with the current configuration. Modify setting (or 'confirm'): confirm
Trouble:You may run into the following error on this step or any of the subsequent steps:
ERROR: Unable to run command using sudo: find. Please fix sudo permissions and try again.To resolve, verify sudo permissions for the user and ensure required commands are allowed for the user.
-
Deploy and Start the VM.
After confirmation, the package is extracted,
.qcow2image is prepared, params image is created, and the VM is launched using KVM.Sample output:
Server KLWC-00001 started successfully
-
Verify the installation.
The kLWC VM should now be up and running.Issue this command to check the VM status:
virsh list
-
Manage kLWC instances.
Use the kLWC Manager for ongoing operations:
./klwc-manager.shNow that the instance is up and running, additional instances can be created with other package files.Other options in the kLWC manager can be used to stop, start, update, clean, and restart the VM.Common commands:
-list— List instances-start— Start VM-stop— Stop VM-status— Check status-logs— View logs-restart— Restart VM
-
(Optional) Verify instance files.
After deployment, the instance directory should contain the following files:
Instance_<name>/ ├── <name>-params.json ├── klwc_<name>.qcow2 ├── params.env.tmpl ├── params.img
Trouble: If there are any issues with this installation process,-
Review the logs using:
./klwc-manager.sh -logs -live <instance_name>
- Verify system requirements
- Check network bridge configuration
- Validate permissions and sudo access
For further assistance, contact Juniper TAC.
-