mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #19000 from wanyaoqi/automated-cherry-pick-of-#18999-upstream-release-3.11
Automated cherry pick of #18999: fix(host-deployer): udpate yunionos, reduce yunionos memsize
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v3.10.8-20231215.0-vm as yunionos
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.4.3
|
||||
|
||||
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
@@ -5,5 +6,11 @@ MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
ENV TZ UTC
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
RUN mkdir -p /yunionos/x86_64
|
||||
RUN mkdir -p /yunionos/aarch64
|
||||
COPY --from=yunionos /yunionos/x86_64/initramfs /yunionos/x86_64/initramfs
|
||||
COPY --from=yunionos /yunionos/x86_64/kernel /yunionos/x86_64/kernel
|
||||
COPY --from=yunionos /yunionos/aarch64/kernel /yunionos/aarch64/kernel
|
||||
COPY --from=yunionos /yunionos/aarch64/initramfs /yunionos/aarch64/initramfs
|
||||
|
||||
ADD ./_output/centos-build/bin/host-deployer /opt/yunion/bin/host-deployer
|
||||
|
||||
@@ -264,7 +264,7 @@ func (d *QemuKvmDriver) Connect(guestDesc *apis.GuestDesc) error {
|
||||
func (d *QemuKvmDriver) connect(guestDesc *apis.GuestDesc) error {
|
||||
var (
|
||||
ncpu = 2
|
||||
memSizeMB = 1024 // yunionos acquire least 1g mem
|
||||
memSizeMB = 256
|
||||
disks = make([]string, 0)
|
||||
)
|
||||
|
||||
@@ -610,6 +610,7 @@ func (d *QemuX86Driver) StartGuest(sshPort, ncpu, memSizeMB int, hugePage bool,
|
||||
|
||||
cmd += __("-initrd %s", manager.GetX86InitrdPath())
|
||||
cmd += __("-kernel %s", manager.GetX86KernelPath())
|
||||
cmd += __("-append rootfstype=ramfs")
|
||||
cmd += __("-device VGA")
|
||||
cmd += __("-device virtio-serial-pci")
|
||||
cmd += __("-netdev user,id=hostnet0,hostfwd=tcp::%d-:22", sshPort)
|
||||
@@ -687,6 +688,7 @@ func (d *QemuARMDriver) StartGuest(sshPort, ncpu, memSizeMB int, hugePage bool,
|
||||
cmd += __("-m %dM", memSizeMB)
|
||||
cmd += __("-initrd %s", manager.GetARMInitrdPath())
|
||||
cmd += __("-kernel %s", manager.GetARMKernelPath())
|
||||
cmd += __("-append rootfstype=ramfs")
|
||||
if manager.runOnHost() {
|
||||
cmd += __("-drive if=pflash,format=raw,unit=0,file=/opt/cloud/contrib/OVMF.fd,readonly=on")
|
||||
} else {
|
||||
|
||||
@@ -41,7 +41,7 @@ type SDeployOptions struct {
|
||||
|
||||
DeployAction string `help:"local deploy action"`
|
||||
DeployParams string `help:"params for deploy action"`
|
||||
DeployConcurrent int `help:"qemu-kvm deploy driver concurrent" default:"3"`
|
||||
DeployConcurrent int `help:"qemu-kvm deploy driver concurrent" default:"5"`
|
||||
}
|
||||
|
||||
var DeployOption SDeployOptions
|
||||
|
||||
Reference in New Issue
Block a user