# \*\*\*Tips\*\*\* UnRaid Tips

**URL:** <https://forum.hhf.technology/t/tips-unraid-tips/63>\
**Category:** Tutorials\
**Created:** [October 18, 2023, 6:30pm UTC](https://forum.hhf.technology/t/tips-unraid-tips/63 "2023-10-18T18:30:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hhf.technoloy](https://forum.hhf.technology/user_avatar/forum.hhf.technology/hhf.technoloy/32/68_2.png) [@hhf.technoloy](https://forum.hhf.technology/u/hhf.technoloy)\
**Post date:** [October 18, 2023, 6:30pm UTC](https://forum.hhf.technology/t/tips-unraid-tips/63/1 "2023-10-18T18:30:00Z")

</div>

## Network

I prefer to bond multiple network interfaces for redundancy, however viewing and configuring the bond interface can be a bit tricky.

### Bonding mode: active-backup

Multiple network links can be bonded using “active-backup” mode so that if one NIC goes down, another will take its place. This mode does not require a managed switch, however it has trouble prioritizing one interface over another. For example if you have a 1 Gbps NIC and a 10 Gbps NIC, unRAID is not smart enough to prefer the 10 Gbps NIC.

#### Viewing Network Interface Status

View overall bond status:  
cat /proc/net/bonding/bond0  
Get the active NIC:

```auto
cat /sys/class/net/bond0/bonding/active_slave

```

Set the active NIC: (replace `eth0` with the desired interface name)

```auto
echo eth0 > /sys/class/net/bond0/bonding/active_slave

```

#### Setting a Primary Interface

At the time of this writing, unRAID’s GUI does not provide the ability to set the primary interface, however it is possible to do via the command line. The primary interface will be preferred as long as it is online, according to [https://wiki.linuxfoundation.org/networking/bonding#Switch\_Configuration](https://wiki.linuxfoundation.org/networking/bonding#Switch_Configuration)

Bonding configuration can be found in `/sys/class/net/bond0/bonding`

One of the “files” here is called `primary`. To set the primary, use: (replace `eth0` with the desired interface name)

```auto
echo eth0 > /sys/class/net/bond0/bonding/primary

```

After setting the primary interface, you can check the active NIC to verify that it worked.

**This setting is lost when the server reboots.**

To make this setting “stick” between server reboots, install the “User Scripts” plugin and create a script that runs the command at array startup.

## CPU Pinning

To run a VM without core pinning, you must edit the VM in XML VIEW and follow these steps:

1. Set the desired number of cores in the `vcpu` element: `<vcpu placement='static'>6</vcpu>`.
2. Delete the `cputune` element.
3. Ensure that the CPU topology is compatible with the chosen number of cores. E.g.

```auto
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='3' threads='2'/>
    …
  </cpu>

```

Tip: If you edit the VM using the GUI, your core count will get reduced to 1 and you’ll need to edit the XML again.  
Tip: If you try `<vcpu placement='auto'` and the VM won’t start because of something NUMAD, change `placement` back to `static` and delete the `numatune` element.

## Miscellaneous

### Trial Expiration

When the unRAID trial expires, unRAID remains fully functional until the next time you want to start the pool (at which point you must license it).

## Disk Debugging

### List Disks

> **[Unraid Docs](https://docs.unraid.net/)**
>
> Welcome to the official Unraid documentation! This comprehensive resource is designed to help you get the most out of your Unraid server, whether you're setting up your first system or managing a complex homelab environment.

```auto
ls -l /dev/disk/by-id

```

### List PCI Devices (SATA Controllers, etc)

```auto
lspci

```

## Migrating Virtual Machines from VMware ESXi

These instructions are for converting a single-disk ESXi VM to an unraid VM.

1. Create an NFS share in unraid (e.g. `/mnt/user/esxishare/`), and mount it in ESXi. The command `showmount -e 127.0.0.1` may help (in unraid terminal) to give you the full absolute path of the share.
2. Shut down a VM in ESXi.
3. Delete all the VM’s snapshots (optional. I didn’t test with a VM that has snapshots).
4. Using ESXi’s file manager GUI, move the VM’s folder to the NFS share on the unraid server.
5. In unraid terminal, make a directory for your VM image to be kept permanently.

```auto
mkdir /mnt/user/vm/virtualmachines/VirtualMachineName

```

1. In unraid terminal, convert the vmdk disk image (`-f vmdk`) to raw (`-O raw`) thin provisioned (`-o preallocation=off`) and put it in your new directory:

```auto
qemu-img convert -p -f vmdk -O raw -o preallocation=off /mnt/user/esxishare/VirtualMachineName/VirtualMachineName.vmdk /mnt/user/vm/virtualmachines/VirtualMachineName/VirtualMachineName.img

```

1. In unraid GUI, create a new VM (with the same name you used when creating the directory above), and add the `.img` file from above as an existing disk. To make the VM bootable, it may be necessary to use SeaBIOS instead of OVMF BIOS, and/or change the Machine type.

## Resizing raw disks

The following example command adds 100 gigabytes (`+100G`) to the available size of a raw (`-f raw`) disk image:

```auto
qemu-img resize -f raw /mnt/user/vm/virtualmachines/VirtualMachineName/DiskName.img +100G

```

You can check the current virtual size via:

```auto
qemu-img info /mnt/user/vm/virtualmachines/VirtualMachineName/DiskName.img

```

It is also possible to do a resize operation with an additional size of 0. You might want to do this if you forgot to specify the format, like in the following:

```auto
> qemu-img resize /mnt/user/vm/virtualmachines/VirtualMachineName/DiskName.img +100G
WARNING: Image format was not specified for '/mnt/user/vm/virtualmachines/VirtualMachineName/DiskName.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Image resized.
> qemu-img resize -f raw /mnt/user/vm/virtualmachines/VirtualMachineName/DiskName.img +0G
Image resized.

```
