[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] Adding disk image file to existing DomU VM



Thank you Kristofer for your suggestions.

I tried out the same and the following is the outcome...


01HW159658:~ # xm block-list 1
Vdev  BE handle state evt-ch ring-ref BE-path
768    0    0     4      10     522   /local/domain/0/backend/vbd/1/768

01HW159658:~ # xm block-attach 1 tap:aio:/etc/xen/vmpartitions/addon1
/dev/xvda3 w 0
Error: Device 51715 (vbd) could not be connected. Hotplug scripts not
working.

01HW159658:~ # xm block-list 1
Vdev  BE handle state evt-ch ring-ref BE-path
768    0    0     4      10     522   /local/domain/0/backend/vbd/1/768
51715    0    0     3      11     686   /local/domain/0/backend/vbd/1/51715

xen-hotplug.log
*****************************************************************
export
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:.
+++
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:.
+++ export LANG=POSIX
+++ LANG=POSIX
++++ set
++++ grep '^LC_'
++++ cut -d= -f1
+++ unset
+++ trap sigerr ERR
+++ log debug add XENBUS_PATH=backend/vbd/1/51715
+++ local level=debug
+++ shift
+++ logger -p daemon.debug -- /etc/xen/scripts/block: add
XENBUS_PATH=backend/vbd/1/51715
++ findCommand add
++ for arg in '"$@"'
++ expr index add =
++ command=add
++ return
++ '[' add '!=' add ']'
++ XENBUS_PATH=backend/vbd/1/51715
++ xenstore_read_default backend/vbd/1/51715/type MISSING
++ xenstore-read backend/vbd/1/51715/type
+ t=tap
+ case "$command" in
++ xenstore_read_default backend/vbd/1/51715/physical-device MISSING
++ xenstore-read backend/vbd/1/51715/physical-device
++ echo MISSING
+ phys=MISSING
+ '[' MISSING '!=' MISSING ']'
++ xenstore_read backend/vbd/1/51715/params
+++ xenstore-read backend/vbd/1/51715/params
++ local v=aio:/etc/xen/vmpartitions/addon1
++ '[' aio:/etc/xen/vmpartitions/addon1 '!=' '' ']'
++ echo aio:/etc/xen/vmpartitions/addon1
+ p=aio:/etc/xen/vmpartitions/addon1
++ xenstore_read backend/vbd/1/51715/mode
+++ xenstore-read backend/vbd/1/51715/mode
++ local v=w
++ '[' w '!=' '' ']'
++ echo w
+ mode=w
+ case $t in
+ '[' -x /etc/xen/scripts/block-tap ']'

*****************************************************************

xend.log
*****************************************************************

[2009-02-02 13:19:39 xend] DEBUG (DevController:103) DevController: writing
{'virtual-device': '768', 'backend-id': '0', 'state': '1', 'backend':
'/local/domain/0/backend/vbd/1/768'} to /local/domain/1/device/vbd/768.
[2009-02-02 13:19:39 xend] DEBUG (DevController:105) DevController: writing
{'domain': 'SAP', 'frontend': '/local/domain/1/device/vbd/768', 'dev':
'hda', 'state': '1', 'params': '/var/lib/xen/images/SAP/hda', 'mode': 'w',
'frontend-id': '1', 'type': 'file'} to /local/domain/0/backend/vbd/1/768.
[2009-02-02 13:19:39 xend] DEBUG (DevController:103) DevController: writing
{'backend-id': '0', 'mac': '00:16:3e:51:a0:cf', 'handle': '0', 'state': '1',
'backend': '/local/domain/0/backend/vif/1/0'} to
/local/domain/1/device/vif/0.
[2009-02-02 13:19:39 xend] DEBUG (DevController:105) DevController: writing
{'mac': '00:16:3e:51:a0:cf', 'state': '1', 'handle': '0', 'script':
'/etc/xen/scripts/vif-bridge', 'frontend-id': '1', 'domain': 'SAP',
'frontend': '/local/domain/1/device/vif/0'} to
/local/domain/0/backend/vif/1/0.
[2009-02-02 13:19:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:675) Storing
VM details: {'ssidref': '0', 'uuid': '2216fc15-99ea-a6d3-ad81-718f235a0c7b',
'on_reboot': 'restart', 'start_time': '1233580779.23', 'on_poweroff':
'destroy', 'name': 'SAP', 'vcpus': '2', 'vcpu_avail': '3', 'memory': '4096',
'on_crash': 'restart', 'image': "(linux (kernel
/var/lib/xen/tmp/vmlinuz.ZN3UHb) (ramdisk /var/lib/xen/tmp/initrd.C0B5Dk)
(vcpus 2) (args ' TERM=xterm'))", 'maxmem': '4096'}
[2009-02-02 13:19:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:700) Storing
domain details: {'console/ring-ref': '1665189', 'console/port': '2', 'name':
'SAP', 'console/limit': '1048576', 'vm':
'/vm/2216fc15-99ea-a6d3-ad81-718f235a0c7b', 'domid': '1',
'cpu/0/availability': 'online', 'memory/target': '4194304',
'store/ring-ref': '1665190', 'cpu/1/availability': 'online', 'store/port':
'1'}
[2009-02-02 13:19:39 xend] DEBUG (DevController:132) Waiting for devices
vif.
[2009-02-02 13:19:39 xend] DEBUG (DevController:138) Waiting for 0.
[2009-02-02 13:19:39 xend.XendDomainInfo] DEBUG (XendDomainInfo:881)
XendDomainInfo.handleShutdownWatch
[2009-02-02 13:19:39 xend] DEBUG (DevController:403) hotplugStatusCallback
/local/domain/0/backend/vif/1/0/hotplug-status.
[2009-02-02 13:19:39 xend] DEBUG (DevController:403) hotplugStatusCallback
/local/domain/0/backend/vif/1/0/hotplug-status.
[2009-02-02 13:19:39 xend] DEBUG (DevController:417) hotplugStatusCallback
1.
[2009-02-02 13:19:39 xend] DEBUG (DevController:132) Waiting for devices
usb.
[2009-02-02 13:19:39 xend] DEBUG (DevController:132) Waiting for devices
vbd.
[2009-02-02 13:19:39 xend] DEBUG (DevController:138) Waiting for 768.
[2009-02-02 13:19:39 xend] DEBUG (DevController:403) hotplugStatusCallback
/local/domain/0/backend/vbd/1/768/hotplug-status.
[2009-02-02 13:19:39 xend] DEBUG (DevController:417) hotplugStatusCallback
1.
[2009-02-02 13:19:39 xend] DEBUG (DevController:132) Waiting for devices
irq.
[2009-02-02 13:19:39 xend] DEBUG (DevController:132) Waiting for devices
pci.
[2009-02-02 13:19:39 xend] DEBUG (DevController:132) Waiting for devices
ioports.
[2009-02-02 13:19:39 xend] DEBUG (DevController:132) Waiting for devices
vtpm.
[2009-02-02 13:19:39 xend] INFO (XendDomain:363) Domain SAP (1) unpaused.
[2009-02-03 11:25:24 xend] DEBUG (blkif:24) exception looking up device
number for /dev/xvda3: [Errno 2] No such file or directory: '/dev/xvda3'
[2009-02-03 11:25:24 xend] DEBUG (DevController:103) DevController: writing
{'virtual-device': '51715', 'backend-id': '0', 'state': '1', 'backend':
'/local/domain/0/backend/vbd/1/51715'} to /local/domain/1/device/vbd/51715.
[2009-02-03 11:25:24 xend] DEBUG (DevController:105) DevController: writing
{'domain': 'SAP', 'frontend': '/local/domain/1/device/vbd/51715', 'dev':
'/dev/xvda3', 'state': '1', 'params': 'aio:/etc/xen/vmpartitions/addon1',
'mode': 'w', 'frontend-id': '1', 'type': 'tap'} to
/local/domain/0/backend/vbd/1/51715.
[2009-02-03 11:25:24 xend] DEBUG (DevController:138) Waiting for 51715.
[2009-02-03 11:25:24 xend] DEBUG (DevController:403) hotplugStatusCallback
/local/domain/0/backend/vbd/1/51715/hotplug-status.







Kristofer-3 wrote:
> 
> You can use "xm block-attach".
> 
> xm block-attach <Domain> <BackDev> <FrontDev> <Mode>
> 
> That will hot-add it to a running domU so you don't need to restart it.
> 
> You will also need to add it to your config file for the domain so it is
> attached upon the next boot of the domU.
> 
> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of sundaju
> Sent: Tuesday, January 20, 2009 8:13 AM
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] Adding disk image file to existing DomU VM
> 
> 
> How can we add a new disk image file to an existing DomU virtual machine
> which is already configured and running?
> 
> We already have the VM running with 20GB partition mapped to a disk image
> file.
> 
> We have created a new disk image file of 150GB size and we want this file
> to
> be available as another file system on the DomU host.
> 
> Please advise.
> 
> Sundar
> -- 
> View this message in context:
> http://www.nabble.com/Adding-disk-image-file-to-existing-DomU-VM-tp2156381
> 4p21563814.html
> Sent from the Xen - User mailing list archive at Nabble.com.
> 
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-disk-image-file-to-existing-DomU-VM-tp21563814p21866458.html
Sent from the Xen - User mailing list archive at Nabble.com.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.