Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
vms:ipfire [2015/03/31 03:26] admin [Create the IPFire Virtual Hard Disk] |
vms:ipfire [2015/03/31 18:25] admin |
||
---|---|---|---|
Line 42: | Line 42: | ||
<code> | <code> | ||
- | > zcat ipfire-2.17.1gb-ext4-scon.i586-full-core87.img.gz > /run/sr-mount/2f93b6d9-9904-dbfc-afba-d4ba190fca3d/ipfire | + | > zcat ipfire-2.17.1gb-ext4-scon.i586-full-core87.img.gz > /opt/xen/X-Local-VMS/ipfire |
- | > fallocate -l 8G /opt/xen/X-Local-XVA/ipfire | + | > fallocate -l 4G /opt/xen/X-Local-VMS/ipfire |
</code> | </code> | ||
If we were to use LVM VDIs, we'd use: | If we were to use LVM VDIs, we'd use: | ||
<code> | <code> | ||
- | > lvcreate -L 8G -n ipfire vg0 | + | > lvcreate -L 4G -n ipfire vg0 |
> zcat ipfire-2.17.1gb-ext4-scon.i586-full-core87.img.gz > /dev/vg0/ipfire | > zcat ipfire-2.17.1gb-ext4-scon.i586-full-core87.img.gz > /dev/vg0/ipfire | ||
</code> | </code> | ||
+ | |||
---- | ---- | ||
+ | ==== Create VM configuration file ==== | ||
+ | ---- | ||
+ | By convention, Xen VMs configuration files should end in .cfg, but to help differentiate Paravirts and HVMs, we'll use the .hvm suffix. Thus we'll create //**/opt/xen/X-Local-VMS/ipfire.hvm**// | ||
+ | |||
+ | To get more details about the configuration's options, you can refer to [[http://wiki.ipfire.org/en/virtualization/xen/discussion_-_building_hvm_virtual_on_debian_xen_4.1#create_the_configuration_file|the original article this procedure is inspired from]]. | ||
+ | |||
+ | <code> | ||
+ | > nano /opt/xen/X-Local-VMS/ipfire.hvm | ||
+ | |||
+ | kernel="hvmloader" | ||
+ | builder='hvm' | ||
+ | device_model='qemu-dm' | ||
+ | memory = 512 # adjust this as needed, though 512M is enough for most purposes | ||
+ | name = "ipfire" | ||
+ | vcpus=1 # adjust as needed, though a single processor is fine | ||
+ | |||
+ | # this is the heart of the matter, setting up the correct network interfaces | ||
+ | # the bridge should match your configuration (must be defined to Xen) | ||
+ | # the mac address must be unique in YOUR network | ||
+ | # vifname simply allows you to find the interface from the DOM0 using ifconfig | ||
+ | vif = [ | ||
+ | 'mac=00:17:3e:be:b1:1a, bridge=xenbr0,vifname=fw_red', ## Red | ||
+ | 'mac=00:17:3e:be:b1:1b, bridge=xenbr1,vifname=fw_orange', ## Orange | ||
+ | 'mac=00:17:3e:be:b1:1c, bridge=xenbr2,vifname=fw_green', ## Green | ||
+ | 'mac=00:17:3e:be:b1:1d, bridge=xenbr3,vifname=fw_blue', ## Blue | ||
+ | ] | ||
+ | |||
+ | # points to the storage used for this DOMU | ||
+ | disk = [ | ||
+ | 'phy:/dev/vg0/ipfire,hda,w', | ||
+ | ] | ||
+ | |||
+ | |||
+ | localtime=0 # take time from server clock | ||
+ | serial='pty' # allow us to connect from xl console | ||
+ | boot="c" | ||
+ | sdl=0 | ||
+ | acpi=1 | ||
+ | apic=1 | ||
+ | pae=1 | ||
+ | usbdevice='tablet' | ||
+ | # do not use VNC since console is redirected to DOM0 | ||
+ | #vnc=1 | ||
+ | #vncdisplay=1 | ||
+ | </code> | ||
==== STOP ==== | ==== STOP ==== | ||
++++ Deprecated method (click to see) | | ++++ Deprecated method (click to see) | |