mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-15 01:00:27 +00:00
fix: xfce session crash, 10gb disk with resize on boot
This commit is contained in:
parent
eb9d2a76df
commit
99ad3b4cf8
2 changed files with 4 additions and 0 deletions
|
|
@ -69,6 +69,9 @@ func (d *Daemon) CreateMachine(ctx context.Context, req contracthost.CreateMachi
|
|||
if err := cloneDiskFile(artifact.RootFSPath, systemVolumePath, d.config.DiskCloneMode); err != nil {
|
||||
return nil, fmt.Errorf("clone rootfs for %q: %w", req.MachineID, err)
|
||||
}
|
||||
if err := os.Truncate(systemVolumePath, defaultGuestDiskSizeBytes); err != nil {
|
||||
return nil, fmt.Errorf("expand system volume for %q: %w", req.MachineID, err)
|
||||
}
|
||||
removeSystemVolumeOnFailure := true
|
||||
defer func() {
|
||||
if !removeSystemVolumeOnFailure {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ const (
|
|||
defaultGuestKernelArgsNoPCI = defaultGuestKernelArgs + " pci=off"
|
||||
defaultGuestMemoryMiB = int64(3072)
|
||||
defaultGuestVCPUs = int64(2)
|
||||
defaultGuestDiskSizeBytes = int64(10 * 1024 * 1024 * 1024) // 10 GB
|
||||
defaultSSHPort = uint16(2222)
|
||||
defaultVNCPort = uint16(6080)
|
||||
defaultCopyBufferSize = 1024 * 1024
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue