Difference between revisions of "GSP Virtualisation with Xen"
From PDP/Grid Wiki
Jump to navigationJump to search| Line 187: | Line 187: | ||
|   xe vdi-create sm-config:type=raw sr-uuid={SR_UUID} name-label="My Raw LVM VDI" virtual-size={size}GiB type=user |   xe vdi-create sm-config:type=raw sr-uuid={SR_UUID} name-label="My Raw LVM VDI" virtual-size={size}GiB type=user | ||
| # rescan the contents on the SR on the management console. You should see it now. | # rescan the contents on the SR on the management console. You should see it now. | ||
| + | # plug the new VDI on a control domain (preferably the pool master) where you can see it | ||
| + | ## find the control domain with <tt>xe vm-list</tt>, and note the UUID | ||
| + | ## create an autodetect VBD, and note the UUID you'll get | ||
| + |  xe vbd-create vm-uuid=''UUID-of-control-domain'' device=autodetect vdi-uuid=''UUID-of-your-new-VDI'' | ||
| + | : plug the VBD into the control domain | ||
| + |  xe vbd-plug uuid=''UUID-of-your-VBD-out-of-the-previous-step'' | ||
| + | : write the stuff to /dev/xvdXXX (look at the size the find the proper one) | ||
| # copy the contenhts of the raw image into the LV - use a broker host if the old and new server cannot see eachother: | # copy the contenhts of the raw image into the LV - use a broker host if the old and new server cannot see eachother: | ||
|   [salado]# ssh -A root@keerder "dd if=/vm/mach/images/rooier.img" | ssh root@vms-piet-15.inst.ipmi.nikhef.nl "dd of=/dev/VG_XenStorage-e5d0e83a-7e70-3d28-31ab-ed98bfb68368/LV-77510e53-1725-4b16-8ef2-4d20bebfcb21" |   [salado]# ssh -A root@keerder "dd if=/vm/mach/images/rooier.img" | ssh root@vms-piet-15.inst.ipmi.nikhef.nl "dd of=/dev/VG_XenStorage-e5d0e83a-7e70-3d28-31ab-ed98bfb68368/LV-77510e53-1725-4b16-8ef2-4d20bebfcb21" | ||
| + | # unplug the device and remove the VBD (but NOT the VDI!) | ||
| + |  xe vbd-unplug uuid=''UUID-of-your-VBD-out-of-the-previous-3b'' | ||
| + |  xe vbd-destroy uuid=''UUID-of-your-VBD-out-of-the-previous-3b'' | ||
| # create a VM that has this VDI as its local disk, and start it. | # create a VM that has this VDI as its local disk, and start it. | ||
