Use virtio drive interface for passthrough
This commit is contained in:
parent
598234d161
commit
b9c645f92b
2 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ func (fm *FileManager) Lsblk() ([]byte, error) {
|
|||
return nil, errors.Wrap(err, "dial vm ssh")
|
||||
}
|
||||
|
||||
ret, err := sshutil.RunSSHCmd(fm.vm.ctx, sc, "lsblk -o NAME,SIZE,FSTYPE,LABEL -e 7,11,2,253")
|
||||
ret, err := sshutil.RunSSHCmd(fm.vm.ctx, sc, "lsblk -o NAME,SIZE,FSTYPE,LABEL -e 7,11,2")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "run lsblk")
|
||||
}
|
||||
|
|
|
|||
2
vm/vm.go
2
vm/vm.go
|
|
@ -232,7 +232,7 @@ func NewVM(logger *slog.Logger, cfg VMConfig) (*VM, error) {
|
|||
}
|
||||
}
|
||||
|
||||
cmdArgs = append(cmdArgs, "-drive", "file="+shellescape.Quote(strings.ReplaceAll(dev.Path, "\\", "/"))+",format=raw,cache=none")
|
||||
cmdArgs = append(cmdArgs, "-drive", "file="+shellescape.Quote(strings.ReplaceAll(dev.Path, "\\", "/"))+",format=raw,if=virtio,cache=none")
|
||||
}
|
||||
|
||||
// We're not using clean `cdromImagePath` here because it is set to "."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue