.... I have a 64-bit CentOS 5.6 VM running on a 64-bit FC14 host.
Actually, I *HAD* a 64-bit CentOS 5.6 VM :-) .... After a read of the
virt-install man page, I concluded that I could lose the current VM (but
*NOT* its HDD image) & recreate it fairly easily w/ the right combo of
arguments to virt-install. The proceedings:
[root@Q6600:/etc, Mon Aug 15, 04:30 PM] 1163 # virsh list
Id Name State
----------------------------------
1 CentOS-5.6-64bitVM running
[root@Q6600:/etc, Mon Aug 15, 04:30 PM] 1164 # virsh destroy
CentOS-5.6-64bitVM
Domain CentOS-5.6-64bitVM destroyed
[root@Q6600:/etc, Mon Aug 15, 04:30 PM] 1165 # virsh list
Id Name State
----------------------------------
[root@Q6600:/etc, Mon Aug 15, 04:30 PM] 1166 # virsh undefine
CentOS-5.6-64bitVM
Domain CentOS-5.6-64bitVM has been undefined
[root@Q6600:/etc, Mon Aug 15, 04:30 PM] 1167 # virsh list
Id Name State
----------------------------------
[root@Q6600:/etc, Mon Aug 15, 04:31 PM] 1169 # virt-install -n
CentOS-5.6-64bitVM -r 2048 --arch=x86_64 --cpu core2duo,disable=vmx
--vcpus=2,maxvcpus=2,sockets=1,cores=2,threads=1 --os-type=linux
--os-variant=rhel5 --import --disk
path=/home/VMs/CentOS.5.6-64bit-VM/disk.img,format=raw --autostart
--prompt
This will overwrite the existing path
'/home/VMs/CentOS.5.6-64bit-VM/disk.img'
Do you really want to use this disk (yes or no)
no
What would you like to use as the disk (file path)?
quit
How large would you like the disk (quit) to be (in gigabytes)?
^CInstallation aborted at user request
[root@Q6600:/etc, Mon Aug 15, 04:31 PM] 1170 #
i.e. I chickened out at the ominous-sounding message about wiping out my
hard-won disk image .... I thought (from the man-page) that the
'--import' command would skip any attempts at installing anything,
define the VM from the arguments supplied, & boot it from the
already-prepped disk image .... Am I right here ? If not, is there a
recommended way to re-create my VM (mostly) from the extant disk image
w/o having to redo whatever initialization I have done so far (setup a
user, install compilers & dev.env., install Intel compiler, etc.) ?
Also, is there a recommended way for the host to copy that disk image
somewhere so I can try to reuse it if my future attempts at re-creation
don't pan out ? TIA ....
--
William A. Mahaffey III
----------------------------------------------------------------------
"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
Show replies by date