Difference between revisions of "Proxmox: Migrasi VDI VirtualBox ke Proxmox"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "sumber: https://forum.proxmox.com/threads/migrating-virtualbox-vdi-to-proxmox-ve.9672/ ==Find your VM's .vdi file - First we need to locate the VirtualBox hard drive (.vdi)...")
 
 
(14 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
  
==Find your VM's .vdi file - First we need to locate the VirtualBox hard drive (.vdi) file.==
+
==Cari .vdi file==
  
* Open the VirtualBox GUI
+
* Buka VirtualBox GUI
* Click on the VM we want to migrate and click the Settings button
+
* Klik pada VM yang ingin dimigrasi, klik Setting.
* Click on Storage and click the .vdi file listed under IDE Controller
+
* Klik pada Storage & klik .vdi file yang ada pada IDE Controller
* Mouse over the Hard Disk: dropdown list box and note the path to the .vdi file
+
* Mouse over the Hard Disk: dropdown list box catat path .vdi file, biasanya
  
==Convert the .vdi to .img - Next we need to convert the hard drive to a RAW format for ProxMox==
+
~/VirtualBox\ VMs\
  
* On the VirtualBox host open a command prompt
+
==Convert .vdi ke .img==
  
[I]VBoxManage clonehd --format RAW [virtual_harddisk].vdi [virtual_harddisk].img[/I]
+
* Pada mesin VirtualBox buka CLI
  
* This may take a while so be patient. Go get some coffee.
+
VBoxManage clonehd --format RAW [virtual_harddisk].vdi [virtual_harddisk].img
  
==Create a new ProxMox VM - Next we need to create a Proxmox VM to hold our drive image.==
+
* Ini akan membutuhkan waktu, sabar ya :) ...
  
* Open up the Proxmox web interface
+
==Buat ProxMox VM kosong==
* Click on Virtual Machines then click the Create tab
 
* Leave all of the defaults. My Disk space (GB): was set to 32GB and my original .vdi was 20GB. This seems to have worked OK. I'll edit if there are problems down the road.
 
* Note the VMID: number of your new VM (i.e. "106")
 
  
==Upload the .img file - now we need to upload the new /img file to the Proxmox server.==
+
* Buka Proxmox web
 +
* Klik Virtual Machines > Create VM
 +
* Set semua default di VM.
 +
* Misalnya VMID: 998
  
* Start your file transfer softare (wither WinSCP or Filezilla are two good ones).
+
==Upload .img file==
* Transfer the .img file to the /var/lib/vz/images/106 folder (replace 106 with the number you noted from the VMID: field
 
  
==Rename the .img file - now all we need to do is rename the .img file==
+
* ssh ke proxmox
* rename the existing .raw file (for instance vm-106-disk-1.raw) to .old
+
* buat mkdir -p /var/lib/vz/images/998
* rename the .img file to the name of the existing .raw file (for instance vm-106-disk-1.raw)
+
* kembali ke mesin virtualbox
 +
* mv *.img menjadi vm-998-disk-1.raw (misalnya utk VMID: 998)
 +
* scp .raw file ke /var/lib/vz/images/998 (asumsi VMID: 998)
  
==Boot it up!==
+
 
 +
==Hack 998.conf==
 +
 
 +
hack
 +
 
 +
cd /etc/pve/nodes/proxmox1/qemu-server
 +
 
 +
Edit, misalnya
 +
 
 +
vi 998.conf
 +
 
 +
Isinya kira2
 +
 
 +
cores: 1
 +
ide0: local-lvm:vm-998-disk-1,size=32G
 +
ide2: none,media=cdrom
 +
memory: 2048
 +
name: kali-VBOX
 +
net0: e1000=5A:45:05:AF:DC:62,bridge=vmbr0
 +
numa: 0
 +
ostype: other
 +
scsihw: virtio-scsi-pci
 +
smbios1: uuid=db1cc1c2-2c0b-4bce-b57c-18081023b08d
 +
sockets: 1
 +
 
 +
 
 +
Ubah menjadi
 +
 
 +
cores: 1
 +
ide0: local:998/vm-998-disk-1.raw,format=raw,cache=writeback,size=32G
 +
ide2: none,media=cdrom
 +
memory: 2048
 +
name: kali-VBOX
 +
net0: e1000=5A:45:05:AF:DC:62,bridge=vmbr0
 +
numa: 0
 +
ostype: other
 +
scsihw: virtio-scsi-pci
 +
smbios1: uuid=db1cc1c2-2c0b-4bce-b57c-18081023b08d
 +
sockets: 1
 +
 
 +
==Boot it!==
  
  

Latest revision as of 10:02, 1 June 2017

sumber: https://forum.proxmox.com/threads/migrating-virtualbox-vdi-to-proxmox-ve.9672/


Cari .vdi file

  • Buka VirtualBox GUI
  • Klik pada VM yang ingin dimigrasi, klik Setting.
  • Klik pada Storage & klik .vdi file yang ada pada IDE Controller
  • Mouse over the Hard Disk: dropdown list box catat path .vdi file, biasanya
~/VirtualBox\ VMs\

Convert .vdi ke .img

  • Pada mesin VirtualBox buka CLI
VBoxManage clonehd --format RAW [virtual_harddisk].vdi [virtual_harddisk].img
  • Ini akan membutuhkan waktu, sabar ya :) ...

Buat ProxMox VM kosong

  • Buka Proxmox web
  • Klik Virtual Machines > Create VM
  • Set semua default di VM.
  • Misalnya VMID: 998

Upload .img file

  • ssh ke proxmox
  • buat mkdir -p /var/lib/vz/images/998
  • kembali ke mesin virtualbox
  • mv *.img menjadi vm-998-disk-1.raw (misalnya utk VMID: 998)
  • scp .raw file ke /var/lib/vz/images/998 (asumsi VMID: 998)


Hack 998.conf

hack

cd /etc/pve/nodes/proxmox1/qemu-server

Edit, misalnya

vi 998.conf

Isinya kira2

cores: 1
ide0: local-lvm:vm-998-disk-1,size=32G
ide2: none,media=cdrom
memory: 2048
name: kali-VBOX
net0: e1000=5A:45:05:AF:DC:62,bridge=vmbr0
numa: 0
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=db1cc1c2-2c0b-4bce-b57c-18081023b08d
sockets: 1


Ubah menjadi

cores: 1
ide0: local:998/vm-998-disk-1.raw,format=raw,cache=writeback,size=32G
ide2: none,media=cdrom
memory: 2048
name: kali-VBOX
net0: e1000=5A:45:05:AF:DC:62,bridge=vmbr0
numa: 0
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=db1cc1c2-2c0b-4bce-b57c-18081023b08d
sockets: 1

Boot it!

Referensi