Set up Fedora 12 (64-bit) Virtual Machine in HVM Mode on Xen (cont'd)


4. Start a virtual machine in HVM mode
a) Configure the VM start file "vm.run" as the following:
name="10.0.0.200"
vcpus=2
memory=2048
disk=['file:/lhome/xen/tinyos-hvm/vmdisk0,xvda,w']
device_model='/usr/lib64/xen/bin/qemu-dm'
vif=['type=ioemu, bridge=xenbr0']
kernel="/usr/lib/xen/boot/hvmloader"
builder='hvm'
on_reboot='restart'
on_crash='restart'
vnc=1
vnclisten="0.0.0.0"
vncconsole=1
b) Start the VM:
# xm create -c vm.run

5. Connect to the VM using VNC viewer to do the VM configuration stated in here

6. Add a USB device to the VM in HVM mode
# yum install usbutils
a) The following configuration keeps a USB device attached to the VM during its lifetime, check its vendor and product ID in the physical host:
# lsusb
Add two lines "usb=1" and "usbdevice=['host:vendor-id:product-id']" in "vm.run", then start the VM
b) The following configuration adds/deletes a USB device to the VM in run time, check its vendor and product ID in the physical host:
# lsusb
Add two lines "monitor=1", "sdl=1" and change VNC option to be "vnc=0" in "vm.run", then start the VM
# usb_add host:vendor-id:product-id
# usb_del host:vendor-id:product-id


Note: details about configuring devices can be accessed at /etc/xen/xmexample.hvm

Free Web Hosting