wiki:jazz/VirtualBox

VirtualBox on Windows

  • Windows 上怎麼讓 VirtualBox Guest 的 port 穿透到 Host 來 - NAT 底下用 add port forwarding rule (2010-04-21)
    VBoxManage.exe setextradata "Ubuntu 9.04" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
    VBoxManage.exe setextradata "Ubuntu 9.04" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
    VBoxManage.exe setextradata "Ubuntu 9.04" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 8022
    
  • (2012-10-04) 改用以下指令或者介面上的「網路卡」「連接埠轉送」
    vboxmanage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,,22"
    

VirtualBox on Linux

  • [備忘] 把 Windows 變成 Linux 上跑的 VirtualBox Image (2010-07-20)
  • [備忘] 把 Raw Image 變成 Linux 上跑的 VirtualBox Image (2010-07-20)
    • [錯誤作法] 如果給 Raw Image 的話,會出現不是 block device 的訊息。因此要用 losetup 把 image 變成 block device
      jazz@jazzbook:~$ VBoxManage internalcommands createrawvmdk -filename .VirtualBox/HardDisks/A8J.vdi -rawdisk /home/jazz/A8J_WinXP_100823.img 
      Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
      (C) 2005-2010 Oracle Corporation
      All rights reserved.
      
      File '/home/jazz/A8J_WinXP_100823.img' is no block device
      The raw disk vmdk file was not created
      
    • [正確作法]
      jazz@jazzbook:~$ sudo losetup /dev/loop2 /home/jazz/A8J_WinXP_100823.img 
      [sudo] password for jazz: 
      jazz@jazzbook:~$ VBoxManage internalcommands createrawvmdk -filename .VirtualBox/HardDisks/A8J.vdi -rawdisk /dev/loop2
      Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
      (C) 2005-2010 Oracle Corporation
      All rights reserved.
      
      RAW host disk access VMDK file .VirtualBox/HardDisks/A8J.vdi created successfully.
      

Reference

Last modified 12 years ago Last modified on Nov 1, 2012, 10:53:50 PM

Attachments (1)

Download all attachments as: .zip