Skip to content

Commit 066958d

Browse files
committed
first commit
0 parents  commit 066958d

File tree

7 files changed

+306
-0
lines changed

7 files changed

+306
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/public
2+
.hugo_build.lock
3+
/resources/**
4+
*.cast

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "themes/PaperMod"]
2+
path = themes/PaperMod
3+
url = https://github.com/adityatelange/hugo-PaperMod.git

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
serve:
2+
hugo --quiet version
3+
(sleep 1 ; xdg-open localhost:1313) >/dev/null 2>&1 &
4+
hugo server --noHTTPCache --buildDrafts

archetypes/default.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
date: {{ .Date }}
4+
draft: true
5+
description: Brief description
6+
categories:
7+
- Category 1
8+
- Category 2
9+
tags:
10+
- tag 1
11+
- tag 2
12+
math: false
13+
author: "Me"
14+
type: "post"
15+
layout: "post"
16+
slug: "my-slug"
17+
aliases:
18+
- "/alias-1/"
19+
- "/alias-2/"
20+
image: "/images/my-image.jpg"
21+
images:
22+
- image: "/images/my-image-1.jpg"
23+
alt: "Alternative text for image 1"
24+
- image: "/images/my-image-2.jpg"
25+
alt: "Alternative text for image 2"
26+
cover:
27+
hidden: false # hide everywhere but not in structured data
28+
image: "covers/image.png"
29+
alt:
30+
caption:
31+
relative: true
32+
---
33+
34+
35+
36+
<!--more-->

content/posts/ova2qcow2.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: "Ova2qcow2"
3+
date: 2024-02-22T20:30:33Z
4+
draft: true
5+
description: Converting a VirtualBox VM image (ova) to QEMU VM image (qcow2)
6+
categories:
7+
- Virtualizing
8+
tags:
9+
- VM
10+
math: false
11+
author: "Me"
12+
type: "post"
13+
layout: "post"
14+
cover:
15+
hidden: false # hide everywhere but not in structured data
16+
alt:
17+
caption:
18+
relative: true
19+
---
20+
21+
22+
23+
<!--more-->
24+
25+
# Ova2qcow2
26+
27+
## Introduction
28+
29+
In this tutorial, you will learn how to convert a VirtualBox image to QEMU image
30+
31+
## Requirements
32+
33+
Packages:
34+
- qemu-img
35+
- tar
36+
37+
## Tutorial
38+
39+
### Create temporary directory to extract ova image
40+
41+
```sh
42+
temp_dir="$(mktemp --directory)"
43+
tar -xvf your_virtual_machine.ova --directory="$temp_dir"
44+
```
45+
46+
Your temp_dir should look like this:
47+
48+
```sh
49+
$ ls "$temp_dir"
50+
your_virtual_machine-disk001.vmdk your_virtual_machine.mf your_virtual_machine.ovf
51+
```
52+
53+
### Convert to Qcow2 using qemu-img tool
54+
55+
```sh
56+
qemu-img convert -f vmdk -O qcow2 "$temp_dir/your_virtual_machine-disk001.vmdk" destination_image.qcow2
57+
```
58+
59+
This process should take a while...
60+
61+
And you are done, you should find the image at the destination you provided
62+
63+
You can delete everything under the temporary directory
64+
65+
```sh
66+
rm -r "$temp_dir"
67+
unset temp_dir
68+
```
69+
70+
## Conclusion
71+
72+
To summarize everything, I wrote a shell script that given a ova file as first
73+
argument and qcow2 destination file path as second argument, it will produce the
74+
image you want.
75+
76+
Something like this:
77+
78+
```sh
79+
#!/bin/sh
80+
set -e
81+
82+
usage() {
83+
echo "Usage: $(basename "$0") <ova file> <qcow2 file>"
84+
exit 1
85+
}
86+
87+
[ "$#" -ne 2 ] && usage
88+
89+
set -x
90+
91+
ova_file="$1"
92+
qcow2_file="$2"
93+
temp_dir="$(mktemp --directory)"
94+
tar -xvf "$ova_file" --directory="$temp_dir"
95+
qemu-img convert \
96+
-f vmdk \
97+
-O qcow2 \
98+
"$(ls "$temp_dir"/*-disk001.vmdk)" \
99+
"$qcow2_file"
100+
rm -r "$temp_dir"
101+
unset temp_dir
102+
```
103+
104+
also can be found at https://github.com/ShellTux/ConvertOva2Qcow2

hugo.yaml

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
baseURL:
2+
languageCode: pt-PT
3+
title: Luís Góis Blog
4+
paginate: 5
5+
theme: ["PaperMod"]
6+
7+
enableRobotsTXT: true
8+
buildDrafts: false
9+
buildFuture: false
10+
buildExpired: false
11+
12+
minify:
13+
disableXML: true
14+
minifyOutput: true
15+
16+
params:
17+
# env: production # to enable google analytics, opengraph, twitter-cards and schema.
18+
title: ExampleSite
19+
description: "ExampleSite description"
20+
keywords: [Blog, Portfolio, PaperMod]
21+
author: ["Me"]
22+
images: ["<link or path of image for opengraph, twitter-cards>"]
23+
DateFormat: "January 2, 2006"
24+
defaultTheme: auto # dark, light
25+
disableThemeToggle: false
26+
27+
ShowReadingTime: true
28+
ShowShareButtons: false
29+
ShowPostNavLinks: true
30+
ShowBreadCrumbs: true
31+
ShowCodeCopyButtons: true
32+
ShowWordCount: true
33+
ShowRssButtonInSectionTermList: true
34+
UseHugoToc: false
35+
disableSpecial1stPost: false
36+
disableScrollToTop: false
37+
comments: false
38+
hidemeta: false
39+
hideSummary: false
40+
showtoc: true
41+
tocopen: true
42+
43+
assets:
44+
# disableHLJS: true # to disable highlight.js
45+
# disableFingerprinting: true
46+
favicon: "<link / abs url>"
47+
favicon16x16: "<link / abs url>"
48+
favicon32x32: "<link / abs url>"
49+
apple_touch_icon: "<link / abs url>"
50+
safari_pinned_tab: "<link / abs url>"
51+
52+
label:
53+
text: "Home"
54+
icon: /apple-touch-icon.png
55+
iconHeight: 35
56+
57+
# profile-mode
58+
profileMode:
59+
enabled: true # needs to be explicitly set
60+
title: "Welcome \U0001F44B"
61+
subtitle: &profilesubtitle >
62+
"This is the website of **Luís Góis**,
63+
currently finishing **Bachelor's Degree in Informatics Engineering
64+
at the University of Coimbra**,
65+
and I document and share my learning progress."
66+
imageUrl: "https://avatars.githubusercontent.com/u/115948079?v=4"
67+
imageWidth: 120
68+
imageHeight: 120
69+
imageTitle: "Profile Picture"
70+
buttons:
71+
- name: Posts
72+
url: posts
73+
- name: Tags
74+
url: tags
75+
76+
# home-info mode
77+
homeInfoParams:
78+
Title: "Hi there \U0001F44B"
79+
Content: *profilesubtitle
80+
81+
socialIcons:
82+
- name: github
83+
url: "https://github.com/ShellTux"
84+
85+
analytics:
86+
google:
87+
SiteVerificationTag: "XYZabc"
88+
bing:
89+
SiteVerificationTag: "XYZabc"
90+
yandex:
91+
SiteVerificationTag: "XYZabc"
92+
93+
cover:
94+
hidden: false # hide everywhere but not in structured data
95+
hiddenInList: true # hide on list pages and home
96+
hiddenInSingle: true # hide on single page
97+
98+
editPost:
99+
URL: "https://github.com/ShellTux/blog/content"
100+
Text: "Suggest Changes" # edit text
101+
appendFilePath: true # to append file path to Edit link
102+
103+
# for search
104+
# https://fusejs.io/api/options.html
105+
params:
106+
fuseOpts:
107+
isCaseSensitive: false
108+
shouldSort: true
109+
location: 0
110+
distance: 1000
111+
threshold: 0.4
112+
minMatchCharLength: 0
113+
keys: ["title", "permalink", "summary", "content"]
114+
menu:
115+
main:
116+
- identifier: about
117+
name: About
118+
url: /about/
119+
weight: 1
120+
- identifier: categories
121+
name: Categories
122+
url: /categories/
123+
weight: 10
124+
- identifier: tags
125+
name: Tags
126+
url: /tags/
127+
weight: 20
128+
- identifier: repo
129+
name: Repo
130+
url: &repo_url https://github.com/ShellTux/blog
131+
weight: 30
132+
- identifier: posts
133+
name: Posts
134+
url: /posts/
135+
weight: 5
136+
- identifier: search
137+
name: 🔎
138+
url: /search/
139+
weight: 100
140+
# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
141+
pygmentsUseClasses: true
142+
markup:
143+
highlight:
144+
noClasses: false
145+
# anchorLineNos: true
146+
# codeFences: true
147+
# guessSyntax: true
148+
# lineNos: true
149+
# style: monokai
150+
outputs:
151+
home:
152+
- HTML
153+
- RSS
154+
- JSON # is necessary

themes/PaperMod

Submodule PaperMod added at d6cd6d9

0 commit comments

Comments
 (0)