在KVM中安装 DSM 6.1 群晖6.1

  • 本文介绍如何在KVM虚拟机下安装DSM6.1.2
    > 群晖5.2以后系统采用UEFI启动,所以如果用KVM等虚拟机安装时一定打开UEFI选项,在这里测试的结果是,如果用传统方式启动是可以启动的,但是无法启用网络。
    > virt-install --boot uefi

0.准备工作

  • 安装文件需要synoboot.img、DSM_DS3617xs_15132.pat

    boot文件模拟群晖启动相当于引导,pat文件为固件安装包

  • .固件以及启动磁盘文件请在这里寻找
    Nas2x

    本文采用6.1.2

1.UEFI模拟固件请安装ovmf

sudo apt install  ovmf

2.在合适位置创建动态磁盘

qemu-img create -f qcow2 HDD.img 50G

3.请复制以下内容到合适的位置,保存为Synology.xml

不要害怕这么多选项,需要配置的仅仅就几项
机器性能默认为双核1G,网络模式采用的是NAT请根据自己情况做修改

<domain type='kvm'>
  <name>Synology</name>
  <memory unit='KiB'>1024</memory>
  <currentMemory unit='KiB'>1024</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-zesty'>hvm</type>
    <bootmenu enable='yes'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Westmere</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='pclmuldq'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='movbe'/>
    <feature policy='require' name='tsc-deadline'/>
    <feature policy='require' name='rdrand'/>
    <feature policy='require' name='arat'/>
    <feature policy='require' name='tsc_adjust'/>
    <feature policy='require' name='smep'/>
    <feature policy='require' name='erms'/>
    <feature policy='require' name='rdtscp'/>
    <feature policy='require' name='3dnowprefetch'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='群晖磁盘位置'/>
      <target dev='sda' bus='sata'/>
      <address type='drive' controller='1' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='群晖启动盘位置'/>
      <target dev='sdb' bus='usb'/>
      <boot order='1'/>
      <address type='usb' bus='0' port='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='sata' index='1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
   <interface type='network'>
      <mac address='00:13:12:2c:a7:36'/>
      <source network='default'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>
    <video>
      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

4.创建虚拟机、并开机

virsh define Synology.xml
virsh start Synology

5.开始安装

使用浏览器访问
http://find.synology.com
上传固件安装即可

相关推荐

2 条评论

  1. greydog

    按照上面操作 进不了启动界面 bios提示找不懂启动盘

    • Andrew

      重点看一下是不是uefi启动的,还有镜像是否是uefi的

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

微信扫一扫,分享到朋友圈

在KVM中安装 DSM 6.1 群晖6.1
返回顶部

显示

忘记密码?

显示

显示

获取验证码

Close