PVE虚拟机相关操作

1,586 阅读2分钟

01磁盘管理

1.删除磁盘

pve 删除磁盘目录 | Proxmox VE ——佛西博客

//查看磁盘文件

vi /etc/pve/storage.cfg





//删除挂在磁盘

cd /etc/systemd/system







//默认配置

dir: local

        path /var/lib/vz

        content iso,vztmpl,backup



lvmthin: local-lvm

        thinpool data

        vgname pve

        content rootdir,images

2.加载磁盘

//检查所有磁盘

mkdir -p  /data/

echo "/dev/sdb  /data ext4 errors=remount-ro 0 1"  >>/etc/fstab

mount -a

df -h





[root@Temp ~]# df -h

Filesystem               Size  Used Avail Use% Mounted on

/dev/mapper/centos-root   36G  3.1G   33G   9% /

devtmpfs                  16G     0   16G   0% /dev

tmpfs                     16G     0   16G   0% /dev/shm

tmpfs                     16G  8.6M   16G   1% /run

tmpfs                     16G     0   16G   0% /sys/fs/cgroup

/dev/mapper/centos-home   18G   33M   18G   1% /home

/dev/sda1               1014M  192M  823M  19% /boot

tmpfs                    3.2G     0  3.2G   0% /run/user/0

/dev/sdb                 493G   73M  467G   1% /data







//加载磁盘

/dev/sdb                 493G   73M  467G   1% /data

02黑群辉安装

镜像准备

3617/61 是高配对CPU有要求

Uefi 引导

不支持在 Docs 外粘贴 block

不支持在 Docs 外粘贴 block

3615/52 对配置要求较低

用传统引导

系统

不支持在 Docs 外粘贴 block

引导:

不支持在 Docs 外粘贴 block

5.2 可以使用的配置

03PVEos虚拟机导入img 教程

wp.gxnas.com/11213.html

把电脑上的DS918_7.0.1.img点鼠标左键不松开,拖到MobaXterm的左边如下图的空白位置,再松开鼠标左键;


SSH拷贝灌注img文件

在MobaXterm的右边黑色区域,输入以下命令转换群晖引导盘,使它变成PVE虚拟机的格式(命令别照搬,100为第4步骤显示的VM ID):

qm importdisk 101 XPEnoboot_DS3615xs_5.2-5967.1.img local-lvm 

// 100 是虚拟机的ID、 

//DS918_7.0.1.img 是镜像名字 

//local-lvm   是默认分区





//命令

qm importdisk 101 openwrt.img local-lvm 



qm importdisk 100 synoboot.img local-lvm 



挂载img100虚拟机上

PVE 硬件配置

以下为我的操作示例

//导入img磁盘

qm importdisk 101 synoboot.img local-lvm





Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.

root@pve:~# qm importdisk 101 synoboot.img local-lvm

importing disk 'synoboot.img' to VM 101 ...

  Rounding up size to full physical extent 52.00 MiB

  Logical volume "vm-101-disk-0" created.

transferred 0.0 B of 50.0 MiB (0.00%)

transferred 2.0 MiB of 50.0 MiB (4.00%)

transferred 4.0 MiB of 50.0 MiB (8.00%)

transferred 6.0 MiB of 50.0 MiB (12.00%)

transferred 8.0 MiB of 50.0 MiB (16.00%)

transferred 10.0 MiB of 50.0 MiB (20.00%)

transferred 12.0 MiB of 50.0 MiB (24.00%)

transferred 14.0 MiB of 50.0 MiB (28.00%)

transferred 16.0 MiB of 50.0 MiB (32.00%)

transferred 18.0 MiB of 50.0 MiB (36.00%)

transferred 20.0 MiB of 50.0 MiB (40.00%)

transferred 22.0 MiB of 50.0 MiB (44.00%)

transferred 24.0 MiB of 50.0 MiB (48.00%)

transferred 26.0 MiB of 50.0 MiB (52.00%)

transferred 28.0 MiB of 50.0 MiB (56.00%)

transferred 30.0 MiB of 50.0 MiB (60.00%)

transferred 32.0 MiB of 50.0 MiB (64.00%)

transferred 34.0 MiB of 50.0 MiB (68.00%)

transferred 36.0 MiB of 50.0 MiB (72.00%)

transferred 38.0 MiB of 50.0 MiB (76.00%)

transferred 40.0 MiB of 50.0 MiB (80.00%)

transferred 42.0 MiB of 50.0 MiB (84.00%)

transferred 44.0 MiB of 50.0 MiB (88.00%)

transferred 46.0 MiB of 50.0 MiB (92.00%)

transferred 48.0 MiB of 50.0 MiB (96.00%)

transferred 50.0 MiB of 50.0 MiB (100.00%)

transferred 50.0 MiB of 50.0 MiB (100.00%)

Successfully imported disk as 'unused0:local-lvm:vm-101-disk-0'

root@pve:~#