This article provides steps to install/launch a vSRX on a KVM/Ubuntu server using virt-Install
1) Upload a qcow image to the below location.
root@kvm-server:/var/lib/libvirt/images# ls -ltrtotal 2798680-rwxr-xr-x 1 root root 1019805696 Apr 14 17:03 junos-vsrx3-x86-64-24.2R2.18_vsrx2.qcow2-rwxr-xr-x 1 root root 1028849664 Apr 14 17:03 junos-vsrx3-x86-64-24.2R2.18_vsrx1.qcow2-rw-r--r-- 1 root root 817168384 Apr 14 17:21 junos-vsrx3-x86-64-24.2R2.18_vsrx3.qcow2
2) Use the below virt-install command to install vSRX.
virt-install --name Test5 --ram 8196 --cpu SandyBridge --vcpus=5 --arch=x86_64 --disk path=/var/lib/libvirt/images/junos-vsrx3-x86-64-24.2R2.18_vsrx5.qcow2,size=18,size=16,device=disk,bus=virtio,format=qcow2 --os-type linux --os-variant ubuntu20.04 --import --network=network:control,model=virtio --import
--name Test5: Set the name of the vsrx
--name Test5
--ram 8196 : Allocates RAM. I have allocated 8GB RAM.
--ram 8196
--vcpus 5: Assign virtual CPUs. I have assigned 5 vCPU's
--vcpus 5
--cpu SandyBridge,+vmx,-invtsc: Specify the CPU model and flags. Adapt this to match your host's capabilities and the vSRX requirements.
--cpu SandyBridge,+vmx,-invtsc
--disk path=/path/to/vsrx_image.qcow2,size=16,bus=ide,format=qcow2: Specify the disk image
--disk path=/path/to/vsrx_image.qcow2,size=16,bus=ide,format=qcow2
Replace /path/to/vsrx_image.qcow2 with the actual path to the vSRX image. size=16 sets the disk size to 16GB.
/path/to/vsrx_image.qcow2
size=16
--os-type linux: Specify the operating system type as Linux.
--os-type linux
--os-variant rhel7: Specify the Linux variant as RHEL 7.
--os-variant rhel7
--import: Indicates that the VM is being created from an existing image.
--import
--network network:control,model=virtio: Connect the VM to a virtual network.
--network network:control,model=virtio
network:control refers to a network defined in the host.We can also assign it to a default network or any other netrworks created on the host.
network:control
model=virtio specifies the network interface model.
model=virtio
v1