Skip to content

Commit c63f86b

Browse files
committed
feat: 更新图片引用
1 parent b739e7e commit c63f86b

31 files changed

+182
-85
lines changed

docs/.vitepress/config.ts renamed to docs/.vitepress/config.mts

+83-82
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,104 @@
1-
import { createWriteStream } from 'node:fs'
2-
import { resolve } from 'node:path'
3-
import { SitemapStream } from 'sitemap'
4-
import { defineConfig } from 'vitepress'
1+
import { createWriteStream } from 'node:fs';
2+
import { resolve } from 'node:path';
3+
import { SitemapStream } from 'sitemap';
4+
import { defineConfig } from 'vitepress';
5+
6+
const links: { url: string; lastmod: number }[] = [];
57

6-
const links = []
78
export default defineConfig({
89
lastUpdated: true,
910
lang: 'zh-CN',
1011
transformHtml: (_, id, { pageData }) => {
1112
if (!/[\\/]404\.html$/.test(id)) {
1213
links.push({
1314
url: pageData.relativePath.replace(/\/index\.md$/, '/').replace(/\.md$/, '.html'),
14-
lastmod: pageData.lastUpdated,
15-
})
15+
lastmod: pageData.lastUpdated ?? Date.now(),
16+
});
1617
}
1718
},
1819
buildEnd: async ({ outDir }) => {
1920
const sitemap = new SitemapStream({
2021
hostname: 'https://www.spiritlhl.net/'
21-
})
22-
const writeStream = createWriteStream(resolve(outDir, 'sitemap.xml'))
23-
sitemap.pipe(writeStream)
24-
links.forEach((link) => sitemap.write(link))
25-
sitemap.end()
26-
await new Promise((r) => writeStream.on('finish', r))
22+
});
23+
const writeStream = createWriteStream(resolve(outDir, 'sitemap.xml'));
24+
sitemap.pipe(writeStream);
25+
links.forEach((link) => sitemap.write(link));
26+
sitemap.end();
27+
await new Promise((r) => writeStream.on('finish', r));
2728
},
2829
head: [
29-
['link', { rel: 'icon', href: 'https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png' }],
30+
['link', { rel: 'icon', href: 'https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png' }],
3031
['meta', { name: 'google-site-verification', content: 'wdrGBim_2XmtMrqxivze70saMiPQAiOhpmN3KAWb0Sw' }],
31-
// <meta name="google-site-verification" content="wdrGBim_2XmtMrqxivze70saMiPQAiOhpmN3KAWb0Sw" />
3232
['meta', { name: 'msvalidate.01', content: 'FC9B6B8BEB3D3B56844ADA69766DBB24' }],
33-
// <meta name="msvalidate.01" content="FC9B6B8BEB3D3B56844ADA69766DBB24" />
3433
['script', {
35-
async: true,
3634
src: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5991535488582679",
3735
crossorigin: "anonymous"
3836
}],
3937
],
4038
locales: {
4139
root: {
42-
lang: 'zh-CN',
43-
label: '简体中文',
44-
title: '一键虚拟化项目',
45-
description: '开源、易于使用的服务器虚拟化项目',
46-
link: '/',
47-
themeConfig: {
48-
logo: { src: 'https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png', width: 24, height: 24 },
49-
lastUpdatedText: '上次更新',
50-
editLink: {
51-
pattern: 'https://github.com/oneclickvirt/oneclickvirt.github.io/edit/main/docs/:path',
52-
text: '在GitHub中编辑',
40+
lang: 'zh-CN',
41+
label: '简体中文',
42+
title: '一键虚拟化项目',
43+
description: '开源、易于使用的服务器虚拟化项目',
44+
link: '/',
45+
themeConfig: {
46+
logo: { src: 'https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png' },
47+
lastUpdatedText: '上次更新',
48+
editLink: {
49+
pattern: 'https://github.com/oneclickvirt/oneclickvirt.github.io/edit/main/docs/:path',
50+
text: '在GitHub中编辑',
51+
},
52+
nav: [
53+
{
54+
text: '一键虚拟化',
55+
link: '/',
56+
activeMatch: '^/$|^/guide/'
5357
},
54-
nav: [
55-
{ text: '一键虚拟化',
56-
link: '/',
57-
activeMatch: '^/$|^/guide/'
58-
},
59-
{ text: 'Linux相关项目',
60-
link: '/case/index',
61-
activeMatch: '^/case/'
62-
},
63-
// {
64-
// text: '开发手册',
65-
// link: '/developer/index',
66-
// activeMatch: '^/developer/'
67-
// },
68-
{ text: 'VPS余量监控', link: 'https://spiders.spiritlhl.net/' },
69-
{ text: 'VPS测试存档', link: 'https://beta.spiritlhl.net/' }
70-
],
71-
sidebar: {
72-
'/': getGuideSidebarZhCN(),
73-
'/guide/': getGuideSidebarZhCN(),
74-
'/case/': getCaseSidebarZhCN(),
75-
'/developer/': getDeveloperSidebarZhCN(),
76-
}
77-
}
78-
},
79-
en: {
80-
lang: 'en-US',
81-
label: 'English',
82-
title: 'One Click Virtualization',
83-
description: 'Open source, easy to use server virtualization project',
84-
link: '/en/',
85-
themeConfig: {
86-
logo: { src: 'https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png', width: 24, height: 24 },
87-
lastUpdatedText: 'Last Updated',
88-
editLink: {
89-
text: 'Edit this page on GitHub',
90-
pattern: 'https://github.com/oneclickvirt/oneclickvirt.github.io/edit/main/docs/:path',
58+
{
59+
text: 'Linux相关项目',
60+
link: '/case/index',
61+
activeMatch: '^/case/'
9162
},
92-
nav: [
93-
{ text: 'One Click Virtualization', link: '/en/', activeMatch: '^/en/guide/' },
94-
// { text: 'Development Manual', link: '/en/developer/index', activeMatch: '^/en/developer/' },
95-
{ text: 'VPS Stock Monitor', link: 'https://spiders.spiritlhl.net/' },
96-
{ text: 'VPS Test Archive', link: 'https://beta.spiritlhl.net/' }
97-
],
98-
sidebar: {
99-
'/en/': getGuideSidebarEnUS(),
100-
'/en/guide/': getGuideSidebarEnUS(),
101-
'/en/developer/': getDeveloperSidebarEnUS()
63+
// {
64+
// text: '开发手册',
65+
// link: '/developer/index',
66+
// activeMatch: '^/developer/'
67+
// },
68+
{ text: 'VPS余量监控', link: 'https://spiders.spiritlhl.net/' },
69+
{ text: 'VPS测试存档', link: 'https://beta.spiritlhl.net/' }
70+
],
71+
sidebar: {
72+
'/': getGuideSidebarZhCN(),
73+
'/guide/': getGuideSidebarZhCN(),
74+
'/case/': getCaseSidebarZhCN(),
75+
'/developer/': getDeveloperSidebarZhCN(),
76+
}
77+
}
78+
},
79+
en: {
80+
lang: 'en-US',
81+
label: 'English',
82+
title: 'One Click Virtualization',
83+
description: 'Open source, easy to use server virtualization project',
84+
link: '/en/',
85+
themeConfig: {
86+
logo: { src: 'https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png' },
87+
lastUpdatedText: 'Last Updated',
88+
editLink: {
89+
text: 'Edit this page on GitHub',
90+
pattern: 'https://github.com/oneclickvirt/oneclickvirt.github.io/edit/main/docs/:path',
91+
},
92+
nav: [
93+
{ text: 'One Click Virtualization', link: '/en/', activeMatch: '^/en/guide/' },
94+
// { text: 'Development Manual', link: '/en/developer/index', activeMatch: '^/en/developer/' },
95+
{ text: 'VPS Stock Monitor', link: 'https://spiders.spiritlhl.net/' },
96+
{ text: 'VPS Test Archive', link: 'https://beta.spiritlhl.net/' }
97+
],
98+
sidebar: {
99+
'/en/': getGuideSidebarEnUS(),
100+
'/en/guide/': getGuideSidebarEnUS(),
101+
'/en/developer/': getDeveloperSidebarEnUS()
102102
},
103103
},
104104
},
@@ -117,7 +117,7 @@ export default defineConfig({
117117
copyright: 'Copyright © 2022-present oneclickvirt'
118118
}
119119
}
120-
})
120+
});
121121

122122
function getGuideSidebarZhCN() {
123123
return [
@@ -191,7 +191,7 @@ function getGuideSidebarZhCN() {
191191
{ text: '捐赠', link: '/guide/dashboardq.html' },
192192
]
193193
}
194-
]
194+
];
195195
}
196196

197197
function getCaseSidebarZhCN() {
@@ -210,7 +210,7 @@ function getCaseSidebarZhCN() {
210210
{ text: '9. convoy面板安装脚本', link: '/case/case9.html' }
211211
]
212212
}
213-
]
213+
];
214214
}
215215

216216
function getDeveloperSidebarZhCN() {
@@ -221,7 +221,7 @@ function getDeveloperSidebarZhCN() {
221221
{ text: 'l10n', link: '/developer/l10n.html' }
222222
]
223223
}
224-
]
224+
];
225225
}
226226

227227
function getGuideSidebarEnUS() {
@@ -239,6 +239,7 @@ function getGuideSidebarEnUS() {
239239
{ text: 'PVE main installation', link: '/en/guide/pve/pve_install.html' },
240240
{ text: 'KVM Virtualization', link: '/en/guide/pve/pve_kvm.html' },
241241
{ text: 'LXC Virtualization', link: '/en/guide/pve/pve_lxc.html' },
242+
{ text: 'Windows Virtual Machine', link: '/en/guide/pve/pve_windows.html' },
242243
{ text: 'Custom', link: '/en/guide/pve/pve_custom.html' },
243244
{ text: 'Acknowledgements', link: '/en/guide/pve/pve_thanks.html' },
244245
{ text: 'FAQ', link: '/en/guide/pve/pve_qa.html' }
@@ -295,7 +296,7 @@ function getGuideSidebarEnUS() {
295296
{ text: 'Donation', link: '/guide/dashboardq.html' }
296297
]
297298
}
298-
]
299+
];
299300
}
300301

301302
function getDeveloperSidebarEnUS() {
@@ -306,5 +307,5 @@ function getDeveloperSidebarEnUS() {
306307
{ text: 'l10n', link: '/en/developer/l10n.html' }
307308
]
308309
}
309-
]
310-
}
310+
];
311+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

docs/en/guide/pve/images/net1.png

116 KB
Loading

docs/en/guide/pve/images/net2.png

27.7 KB
Loading

docs/en/guide/pve/images/net3.png

65.3 KB
Loading

docs/en/guide/pve/images/net4.png

174 KB
Loading
44.1 KB
Loading
117 KB
Loading
161 KB
Loading

docs/en/guide/pve/images/readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
暂存图片

docs/en/guide/pve/pve_kvm.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh)
2020

2121
**Commands to set up the testing environment for executing this project are as follows:**
2222

23-
![图片](https://github.com/spiritLHLS/pages/blob/main/pve_kvm_1.png?raw=true)
23+
![图片](images/pve_kvm_1.png)
2424

2525
To perform the above-mentioned query, you only need to use the one-click script below to automatically create a virtual machine. There is no need to manually modify settings on the web interface.
2626

27-
![图片](https://github.com/spiritLHLS/pages/blob/main/pve_kvm_2.png?raw=true)
27+
![图片](images/pve_kvm_2.png)
2828

2929
After creating the virtual machines using the subsequent script as mentioned above, it **may** be necessary to manually modify the settings on the web interface. You will need to disable hardware nested virtualization for each respective virtual machine, as shown in the following diagram.
3030

31-
![图片](https://github.com/spiritLHLS/pages/blob/main/pve_kvm_3.png?raw=true)
31+
![图片](images/pve_kvm_3.png)
3232

3333
Stop the virtual machine before making modifications. After the modifications are done, you can start the machine to use NOVNC. Failure to close it **may** result in bugs that render this virtual machine unusable.
3434

docs/en/guide/pve/pve_windows.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
outline: deep
3+
---
4+
5+
## Using ISO Image with VirtIO for VM Setup
6+
7+
### 1. Download the Image
8+
Before installation, you need to download the image file via `local(pve) --> ISO images --> Download from URL`
9+
10+
For the download link (`URL:`), you can use files from:
11+
https://github.com/ILLKX/Windows-VirtIO
12+
13+
Enter `win.iso` as the `File Name:`
14+
![download](images/432192899-d9453c3b-46cd-4bc1-8c61-4f987b84dbdb.png)
15+
16+
Click `Download`. After downloading is complete, you can see the file size of `win.iso` on the current page, confirming it's in ISO format.
17+
![downloaded](images/432192951-c1dd421b-f516-47eb-a415-f54d56b34945.png)
18+
19+
### 2. Setting Up the Template
20+
Click `Create VM` in the top right corner of the page.
21+
22+
In the `General` window, select `mypool` for `Resource Pool:`, enter `win` for `Name`, then click `Next`.
23+
![general](images/432193100-8ceb8253-1652-4194-bf7d-b64232612eaf.png)
24+
25+
In the `OS` window, select `win.iso` for `ISO image`. For `Guest OS`, select `Microsoft Windows` as the `Type` and choose the appropriate `Version` for your ISO. For example, if you downloaded Windows 2022, select `11/2022`, then click `Next`.
26+
![OS](images/432193274-3704426d-d665-4672-b9f8-50504191eff0.png)
27+
28+
In the `System` window, select `VirtIO-GPU` for `Graphic card`, `q35` for `Machine`, `VirtIO SCSI` for `SCSI Controller`, and `Default (SeaBIOS)` for `BIOS`, then click `Next`.
29+
![system](images/432193298-0badebcb-5755-4ced-86cc-01368748f761.png)
30+
31+
In the `Disk` window, select `Write Back` for `Cache`, enter your desired disk size in `Disk size (GiB)` (generally not less than `20`), and choose the storage location in `Storage`. In this example, only the system disk `local` is available, so `local` is selected. Then click `Next`.
32+
![disk](images/432193391-68f0eeeb-fc9f-4568-8ddf-777caf901345.png)
33+
34+
In the `CPU` window, enter the number of cores needed in `Cores`, then click `Next`.
35+
![cpu](images/432193462-03a2728f-fa88-4884-a0f9-43f8e92f054b.png)
36+
37+
In the `Memory` window, enter the desired memory size in `Memory (MiB)`, then click `Next`.
38+
![memory](images/432193493-d549cae1-7cf1-40f5-9767-a628878520dc.png)
39+
40+
In the `Network` window, select `vmbr1` for `Bridge`, `VirtIO (paravirtualized)` for `Model`, uncheck `Firewall`, then click `Next`.
41+
![Network](images/432193525-695a77d0-cadb-4eab-9c0c-d1cbea3f6d02.png)
42+
43+
In the `Confirm` window, click `Finish`.
44+
![finish](images/432193740-df901161-26b9-43d1-9106-baeb6485568c.png)
45+
46+
### 3. Graphical Installation Configuration
47+
Click on the template you've set up on the left, click `Start` in the upper right corner to start the virtual machine, then click `Console` to enter the `VNC` interface and wait for the operating system to boot.
48+
![console](images/432193821-7c660689-c6bf-47fd-adef-e7bc3b139873.png)
49+
50+
In the VNC, click `Next`, then `Install now`, then `I don't have a product key`, check `Accept license`, click `Next`, and then select `Custom installation`.
51+
![win0](images/432193878-c7283ee4-d5cd-4091-a57f-e9e476468871.png)
52+
![win1](images/432193920-58698c75-97f4-4091-bbaa-a2a435468c28.png)
53+
![win2](images/432193959-c886b28e-8107-469c-9042-8479c46cabaa.png)
54+
![win3](images/432194105-63a1521a-b3fd-40ae-8992-b91046d0f346.png)
55+
![win4](images/432194142-454b13e1-f948-4890-ab24-773afc0919e1.png)
56+
57+
If the image comes with VirtIO drivers, you should be able to see the available system storage disk and its size. Select it and click `Next`.
58+
![win5](images/432194244-228adbbf-4c00-48c0-bd58-94dc1f081369.png)
59+
![win6](images/432194273-9cb29c4c-78eb-49b2-9e1b-0e818bc9ca62.png)
60+
61+
Wait for the system to install. It may restart automatically several times and could take more than 10 minutes.
62+
![win7](images/432194639-ba4370df-ba6d-48fb-9255-e285f2d27377.png)
63+
64+
After installation is complete, you'll be asked to set a password during first login.
65+
![win8](images/432194663-b4a7e456-878a-4829-bda1-05c8a9d6b6a7.png)
66+
67+
Once setup is complete, there's a pop-up box on the left side of the NOVNC page. Click the first button, then follow the login prompt by pressing `Ctrl`+`Alt`+last button to enter the login page.
68+
69+
### 4. Network Initialization
70+
Since the PVE is set up with a static network through this project, you need to manually modify the bound IP address after logging in, rather than using DHCP.
71+
72+
Right-click in the bottom right corner of the desktop and select `Open Network and Internet settings`. In the settings page that appears, click `Change adapter options`.
73+
![win9](images/net1.png)
74+
75+
In the `Network Connections`, select `Ethernet` and click `Change settings of this connection`.
76+
![win10](images/net2.png)
77+
78+
In the popup window, select `Internet Protocol Version 4 (TCP/IPv4)` and click `Properties`.
79+
![win11](images/net3.png)
80+
81+
In the new dialog box, select `Use the following IP address` and enter:
82+
IP address(I): `172.16.1.xxx` (replace xxx with your desired IP, I used 100 for convenience as my vmid is 100)
83+
Subnet mask(U): `255.255.255.0`
84+
Default gateway(D): `172.16.1.1`
85+
86+
Then select `Use the following DNS server addresses` and enter:
87+
```
88+
8.8.8.8
89+
144.144.144.144
90+
```
91+
92+
Click OK in the bottom right corner, and make sure `Validate settings upon exit` is NOT checked.
93+
![win12](images/net4.png)
94+
95+
Click `OK` and `Yes` for any other dialog boxes, and your virtual machine will now have network connectivity.

0 commit comments

Comments
 (0)