Skip to content

Instantly share code, notes, and snippets.

@fdoliv
Last active March 6, 2021 17:00
Show Gist options
  • Save fdoliv/36eef50ec78261a08e54ac90e1124716 to your computer and use it in GitHub Desktop.
Save fdoliv/36eef50ec78261a08e54ac90e1124716 to your computer and use it in GitHub Desktop.

Passo 1: can convert your VDI disk image to a RAW disk VBoxManage clonehd centos6.vdi centos6.img -format RAW

Passo 2: Refer to the centos6.vbox file, and create the configuration file for Xen VM. You can do this manually or create a shell script that would extract the necessary fields and parse them into Xen configuration file.

  cat /etc/xen/centos6
  name = "centos6"
  uuid = "f220932f-8750-4f5b-b220-8050210e9835"
  memory = 1024
  vcpus = 1
  bootloader = "/usr/bin/pygrub"
  on_poweroff = "destroy"
  on_reboot = "restart"
  on_crash = "restart"
  disk = [ "file:/var/lib/xen/images/centos6.img,xvda,w" ]
  vif = [ "mac=00:16:3e:46:e6:fb,bridge=xenbr0" ]
  extra="console=hvc0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment