Xen on Debian: Difference between revisions
Jump to navigation
Jump to search
Created page with "Welcome! This guide was written to introduce beginners to basic Xen Project concepts and allow you to get started with Xen Project with no prior knowledge. Some prior Linux e..." |
|||
| (6 intermediate revisions by the same user not shown) | |||
| Line 409: | Line 409: | ||
--dhcp \ | --dhcp \ | ||
--pygrub \ | --pygrub \ | ||
--dist= | --dist=stretch \ | ||
--password=Passw0rd | |||
xen-create-image --hostname=tutorial-pv-guest \ | |||
--size=2Gb \ | |||
--swap=128Mb \ | |||
--memory=512mb \ | |||
--vcpus=1 \ | |||
--dir=/home/xen \ | |||
--image=sparse \ | |||
--dhcp \ | |||
--pygrub \ | |||
--dist=stretch \ | |||
--password=Passw0rd | |||
This command instructs xen-create-image (the primary binary of the xen-tools toolkit) to create a guest domain with 512MB of memory, 2 vcpus, using storage from the vg0 volume group we created, use DHCP for networking, pygrub to extract the kernel from the image when booted and lastly we specify that we want to deploy a Debian Wheezy operating system. | This command instructs xen-create-image (the primary binary of the xen-tools toolkit) to create a guest domain with 512MB of memory, 2 vcpus, using storage from the vg0 volume group we created, use DHCP for networking, pygrub to extract the kernel from the image when booted and lastly we specify that we want to deploy a Debian Wheezy operating system. | ||
| Line 466: | Line 480: | ||
lvcreate -nwindows -L20G vg0 | lvcreate -nwindows -L20G vg0 | ||
or for an image file | |||
dd if=/dev/zero of=/home/xen/xenwin10.img bs=1024k seek=30000 count=0 | |||
Next open a new file with your text editor of choice: | Next open a new file with your text editor of choice: | ||
| Line 473: | Line 491: | ||
Paste the config below into the file and save it, NOTE this assumes your Windows iso is located in /root/ with the filename windows.iso and that you're using Squeeze (for Wheezy change the kernel line to a xen-4.1 instead of xen-4.0 folder). In Debian Jessie, please use 'qemu-xen' rather than 'qemu-xen-traditional'. | Paste the config below into the file and save it, NOTE this assumes your Windows iso is located in /root/ with the filename windows.iso and that you're using Squeeze (for Wheezy change the kernel line to a xen-4.1 instead of xen-4.0 folder). In Debian Jessie, please use 'qemu-xen' rather than 'qemu-xen-traditional'. | ||
kernel = "/usr/lib/xen-4. | #kernel = "/usr/lib/xen-4.8/boot/hvmloader" | ||
builder='hvm' | builder='hvm' | ||
memory = 4096 | memory = 4096 | ||
name = "windows" | |||
name = " | |||
vif = ['bridge=xenbr0'] | vif = ['bridge=xenbr0'] | ||
disk = ['phy:/dev/vg0/windows,hda,w','file:/root/windows.iso,hdc:cdrom,r'] | disk = ['phy:/dev/vg0/windows,hda,w','file:/root/windows.iso,hdc:cdrom,r'] | ||
or | |||
disk = [ 'file:/home/xen/xenwin10.img,hda,w', 'file:/root/windows.iso,hdc:cdrom,r' ] | |||
acpi = 1 | acpi = 1 | ||
device_model_version = 'qemu-xen' | |||
device_model_version = 'qemu-xen | boot="dc" | ||
boot=" | |||
sdl=0 | sdl=0 | ||
serial='pty' | serial='pty' | ||
usbdevice='tablet' | |||
vnc=1 | vnc=1 | ||
vnclisten="" | vncconsole=1 | ||
vncpasswd="" | vnclisten="10.0.1.10" | ||
vncpasswd="Passw0rd" | |||
Start the guest following the following section (Start a GUI guest) and proceed with Windows' installation. | Start the guest following the following section (Start a GUI guest) and proceed with Windows' installation. | ||