Skip to content

Instantly share code, notes, and snippets.

@FlorianHeigl
Last active June 8, 2024 15:37
Show Gist options
  • Save FlorianHeigl/2d17797b3e57625f97ea5abb9bfbf26d to your computer and use it in GitHub Desktop.
Save FlorianHeigl/2d17797b3e57625f97ea5abb9bfbf26d to your computer and use it in GitHub Desktop.
Mellanox/NVidia Onyx virtualization commands & howto (Alpine Linux VM)

Useful Onyx CLI commands

Scope:Global

These are entered at the (config) prompt.

job command
check available memory show memory
check available storage space show files system
enable SSH TCP forwarding for VNC access ssh server tcp-forwarding enable
show VM details including VNC Port show virtual-machine host mini detail
open a VNC console to the VM vncviewer -via sshuser@switchip 127.0.0.1:0
download an ISO file to the local SSD virtual-machine volume fetch url https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-virt-3.20.0-x86_64.iso
delete a VM Image no virtual-machine volume file vdisk001.img

Scope

These are entered at the per-VM scope, or need to contain the VM name:

(config virtual-machine host vm-name)

Host in this CLIs sense refers to the virtual host, meaning the VM, not a virtualization host, which in that case of course is the switch. It makes sense as far as the OS is not primarily aimed at this, different i.e. from Juniper NFX

job command
open a serial console to the VM console connect text
start install from given file install cdrom file alpine-virt-3.20.0-x86_64.iso
power off a VM / abort install power off
unmap a VM disk no storage device drive-number 1
virtual-machine host mini interface 1 name vif1
virtual-machine host mini interface 2 name vif2
virtual-machine enable
virtual-machine host mini
virtual-machine host mini arch x86_64
virtual-machine host mini boot auto-power on
virtual-machine host mini comment "mini.oob: tftp-server fallback"
virtual-machine host mini console graphics vnc
virtual-machine host mini console text tty
virtual-machine host mini interface 1 bridge mgmt0
virtual-machine host mini interface 1 macaddr 52:54:00:xx:xx:xx
virtual-machine host mini interface 1 model virtio
virtual-machine host mini interface 2 bridge mgmt1
virtual-machine host mini interface 2 macaddr 52:54:00:xx:xx:xx
virtual-machine host mini interface 2 model virtio
virtual-machine host mini memory 768
virtual-machine host mini storage device bus ide drive-number 1 source pool default file vdisk002.img mode read-write
virtual-machine host mini vcpus count 1
@FlorianHeigl
Copy link
Author

I haven't tried with pre-defining an IP or cloud-init ISO.
But this worked pretty well using the VM install ISO, 88MB installed size.

Note: the volume is allocated as thick (fully provisioned) and the system doesn't expect you to boot from ISO unless for installation.
USB Install is alternatively also supported and even PXE seemed to be available via the VM BIOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment