Day: October 8, 2021

VM setup in TrueNAS

VM setup in TrueNAS

Setup Bridge Network for HOST

If the VM interface created on physical interface, the VM will not be able to access host, which can not use any services provided by TrueNAS.

To fix this issue, Bridge Network is necessary to be used in host. To migrate physical network to bridge network, following steps required.

Note: complete all steps before click on Test Changes

  • Remove IP address from physical interface (bond0)
  • Create a bridge interface called br0, attach physical interface (bond0)
  • Add IP on bridge interface
  • Click on Test Changes
  • Wait till the IP address reachable again
  • Then Make change permanently by click the same button again.

Create VM

Select CPU Passthru should be faster.
Select vio devices for hard disk and network.

Download driver from Fedora

Download both storage driver and network driver from following website.
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.139-1/virtio-win-0.1.139.iso

Load driver to detect hard disk

Select driver CD and point to \viostor\w10\amd64 folder for storage device driver.

Update driver after installation

For network card driver, update using driver CD.

References

10 Easy Steps To Install Windows 10 on Linux KVM – KVM Windows

Remove empty directories recursively

Remove empty directories recursively

Use find command

Use following command can remove empty directories which may have empty directories in them. The -depth will sort the output according to the depth of directories.

find . -type d -depth -exec rmdir {} \;

Note: Just ignore error due to directory not empty

Use rmdir command

First, need to know how deep of your directory, then can run following command

rmdir */*/*/*
rmdir */*/*
rmdir */*
rmdir *

Note: This can cause too many arguments error or command line too long error for large directory.

Markdown Cheat Sheet

Markdown Cheat Sheet

Special characters

Element Markdown Syntax
Ampersand (&) &
Backtick (`) `

Basic Syntax

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Blockquote > blockquote
Ordered List 1. First item
2. Second item
3. Third item
Unordered List - First item
- Second item
- Third item
Code `code`
Horizontal Rule ---
Link [title](https://www.example.com)
Image ![alt text](image.jpg)

Extended Syntax

Element Markdown Syntax
Table | Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
Fenced Code Block ```
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
```
Footnote Here's a sentence with a footnote. [^1]

[^1]: This is the footnote.

Heading ID ### My Great Heading {#custom-id}
Definition List term<br>: definition
Strikethrough ~~The world is flat.~~
Task List - [x] Write the press release
- [ ] Update the website
- [ ] Contact the media

References

Markdown Syntax
Markdown Cheat Sheet