This siteAll blogsLe 17ClémentCCBCuisineLe 3ContactSe connecterS'inscrire
  • All blogs
  • Le 17
  • Clément
  • CCB
  • Cuisine
  • Le 3
  • Contact

  • S'inscrire

Recettes informatiques

  • Page de garde
  • Contact
  • Se connecter
  • Build a Debian package for pdmenu »

Creating a network between 2 virtual machines on Windows with Qemu

Posted by mazet on 24 Mar 2025 in Non catégorisé

Script for starting the first virtual machine

Shell

@ECHO OFF
 
SET SDL_VIDEODRIVER=directx
SET QEMU_AUDIO_DRV=dsound
SET SDL_AUDIODRIVER=dsound
SET QEMU_AUDIO_LOG_TO_MONITOR=1
 
SET CDROM=debian-12.8.0-amd64-netinst.iso
 
START ..\qemu-system-x86_64w.exe -L Bios -device VGA,vgamem_mb=4 ^
-rtc base=localtime,clock=host -smp 2 -m 2G ^
-name "Debian 12" ^
-drive file=debian-12.img,media=disk,cache=writeback ^
-drive file=%CDROM%,media=cdrom,cache=writeback ^
-device e1000,mac=52:54:00:12:34:56,netdev=net0 -netdev user,id=net0 ^
-device e1000,mac=52:54:00:12:34:57,netdev=net1 -netdev socket,id=net1,listen=:1234 ^
-no-acpi -no-hpet -no-reboot

Script for starting the second virtual machine

Shell

@ECHO OFF
 
SET SDL_VIDEODRIVER=directx
SET QEMU_AUDIO_DRV=dsound
SET SDL_AUDIODRIVER=dsound
SET QEMU_AUDIO_LOG_TO_MONITOR=1
 
SET CDROM=debian-12.8.0-amd64-netinst.iso
 
START ..\qemu-system-x86_64w.exe -L Bios -device VGA,vgamem_mb=4 ^
-rtc base=localtime,clock=host -smp 2 -m 2G ^
-name "Debian 12 Lite" ^
-drive file=debian-12-lite.img,media=disk,cache=writeback ^
-drive file=%CDROM%,media=cdrom,cache=writeback ^
-device e1000,mac=52:54:00:12:34:58,netdev=net0 -netdev user,id=net0 ^
-device e1000,mac=52:54:00:12:34:59,netdev=net1 -netdev socket,id=net1,connect=localhost:1234 ^
-no-acpi -no-hpet -no-reboot

On both virtual machines:

  • First network device must be configure in DHCP mode (and get IP 10.0.2.15).
  • Second network device must be configure with static IP (different for each virtual machine).
This entry was posted by mazet and filed under Non catégorisé.

Aucun commentaire pour le moment

Catégories

  • Toutes
  • Non catégorisé
  • Programmation
    • Awk
    • Bash
    • C
    • C++
    • Javascript
    • LaTeX
    • Perl
    • Tcl/Tk
  • Systeme
    • Android
    • Debian
    • Ubuntu

Contenu

  • Creating a network between 2 virtual machines on Windows with Qemu
  • Build a Debian package for pdmenu
  • Extract informations from epub file
  • Connexion PostgreSql / Java par Socket Unix
  • Example of fork and respawn
  • Start SSH daemon on Git portable distribution
  • Create a git mirror
  • Color diff
  • Create on Debian a Minecraft server
  • GIT/HG/SVN on multiple repos simultaneously
  • Convert Comics into CBZ format
  • Random password generator function
  • Convert to camelCase
  • DKIM and SPF
  • Migration from BackupPC 3 (Debian package) to BackupPC 4 (Standalone Installation)
  • Minimal BC for Mingw
  • Diskless Debian cluster
  • Colorize log file
  • Generate certificates with (or without) a certificate authority
  • Install Mercurial (hg) on Android
Mai 2025
Lun Mar Mer Jeu Ven Sam Dim
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
 << <   > >>
  • Accueil
  • Récemment
  • Archives
  • Catégories
  • Derniers commentaires

Rechercher

Flux XML

  • RSS 2.0: Posts
  • Atom: Posts
What is RSS?

©2025 by Laurent Mazet • Contact • Aide • Community software

Bootstrap back-end

Cookies are required to enable core site functionality.