From 851eb1d347bfafebaa5ee2c1f346f6ebc1790108 Mon Sep 17 00:00:00 2001 From: wanyaoqi <18528551+wanyaoqi@users.noreply.github.com> Date: Thu, 11 Jan 2024 05:45:32 +0800 Subject: [PATCH] fix(host-deployer): add cmdline vsyscall=emulate on ramfs guest (#19224) deploy fs on older system like centos 6, need emulate vsyscall. otherwise will get error like: Code: Unable to access opcode bytes at 0xffffffffff6003d6. --- pkg/hostman/diskutils/qemu_kvm/driver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/hostman/diskutils/qemu_kvm/driver.go b/pkg/hostman/diskutils/qemu_kvm/driver.go index 9979e31139..80f9fa9e6c 100644 --- a/pkg/hostman/diskutils/qemu_kvm/driver.go +++ b/pkg/hostman/diskutils/qemu_kvm/driver.go @@ -663,6 +663,7 @@ func (d *QemuX86Driver) StartGuest(sshPort, ncpu, memSizeMB int, hugePage bool, } cmd += __("-drive id=ide0-cd0,if=none,media=cdrom,file=%s", DEPLOY_ISO) cmd += __("-device ide-cd,drive=ide0-cd0,bus=ide.1") + cmd += __("-append vsyscall=emulate") log.Infof("start guest %s", cmd) out, err := manager.startQemu(cmd) @@ -739,6 +740,7 @@ func (d *QemuARMDriver) StartGuest(sshPort, ncpu, memSizeMB int, hugePage bool, } cmd += __("-drive if=none,file=%s,id=cd0,media=cdrom", DEPLOY_ISO) cmd += __("-device scsi-cd,drive=cd0,share-rw=true") + cmd += __("-append vsyscall=emulate") log.Infof("start guest %s", cmd) out, err := manager.startQemu(cmd)