MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap
Revision 5 as of 2026-10-10 00:12:20
  • Debian
  • VagrantDebianTrixie64Box

Contents

  1. VagrantDebianTrixie64Box
    1. Install in VM
    2. Test network in VM and update VM
    3. Virtualbox guest additions
    4. vagrant sudoers
    5. UseDNS in SSH
    6. SSH insecure pair
    7. Virtualbox disable audio
    8. Virtualbox first network adapter a NAT one
    9. Create vagrant box

VagrantDebianTrixie64Box

Steps to create vagrant Debian trixie 64 box (Virtualbox) with LVM support.

Install in VM

   1 cd ~
   2 wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-13.7.0-amd64-netinst.iso
   3 # start Virtualbox
   4 # new
   5 # name: debian-trixie-64
   6 # linux debian 64 bit next
   7 # memory size 512 next
   8 # create virtual hard disk 
   9 # create 
  10 # vdi next
  11 # dynamic allocation next 
  12 # 64 GB create
  13 # start
  14 # select startup disk
  15 # add
  16 # open choose debian-13.7.0-amd64-netinst.iso
  17 # start
  18 # graphical install
  19 # low memory mode 
  20 # region europe 
  21 # country portugal 
  22 # keymap portuguese 
  23 # hostname debian
  24 # domain name: <continue>
  25 # root password: vagrant 
  26 # full name new user: vagrant 
  27 # user name for account: vagrant 
  28 # configure clock: Lisbon 
  29 # partition disks, guided, setup lvm 
  30 # select scsi3 sda 68.7 GB 
  31 # partition scheme all files 
  32 # write the changes and configure lvm? yes 
  33 # amount of volume group 68.2 GB 
  34 # write the changes to disk? yes 
  35 # scan extra installation disk? no 
  36 # debian archive mirror country: portugal 
  37 # deb.debian.org 
  38 # proxy continue 
  39 # participate package usage survey? no 
  40 # ssh server, standard sys utilities , continue 
  41 # install GRUB loader in your primary drive ? yes 
  42 # /dev/sda 
  43 # installation complete, continue
  44 # login with root:vagrant 
  45 

Test network in VM and update VM

   1 ping www.google.com
   2 apt update 
   3 apt upgrade  

Virtualbox guest additions

   1 apt install dkms 
   2 apt install build-essential 
   3 apt install linux-headers-$(uname -r) 
   4 # Menu "Devices" followed by "Install Guest Additions". 
   5 mount /dev/cdrom /media/cdrom
   6 cd /media/cdrom
   7 sh ./VBoxLinuxAdditions.run
   8 reboot 

vagrant sudoers

login with root:vagrant

   1 /sbin/usermod -aG sudo vagrant 
   2 visudo # edit sudoers
   3  
   4 vagrant ALL=(ALL) NOPASSWD: ALL
   5 # after saving in visudo
   6 exit 
   7 login vagrant:vagrant 
   8 
   9 sudo bash # should not ask for password 
  10 exit 

UseDNS in SSH

   1 sudo bash 
   2 cd /etc/ssh 
   3 vi sshd_config 
   4 # disable line with "UseDNS" no 
   5 service ssh restart 

SSH insecure pair

   1 mkdir ~/.ssh 
   2 cd ~/.ssh 
   3 wget https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub
   4 mv vagrant.pub authorized_keys
   5 chmod 0600 authorized_keys 
   6 chmod 0700 /home/vagrant/.ssh 
   7 sudo shutdown -h now 

Virtualbox disable audio

setting vm , audio, disable

Virtualbox first network adapter a NAT one

settings vm, network 1, NAT

Create vagrant box

   1 cd /tmp
   2 vagrant package --base debian-trixie-64
   3 /tmp/package.box
   4 package.box
   5  
   6 mkdir /tmp/test
   7 cd /tmp/test
   8 vagrant box add --name my-debbox C:\temp\package.box
   9 vagrant init my-debbox
  10 vagrant up
  11 vagrant ssh # connect to the box
  12 df -h
  13 # /dev/mapper/debian--vg-root   62G  1.4G   58G   3% /
  14 cd /vagrant 
  15 ls 
  16 md5sum package.box
  17 # xxx  package.box
  18 
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01