Hi all,
not sure where to find this info
Every so often my server is rebooted (wife clips the plug, power outage etc..) and when this happens I have to go and rerun all the attach-disk commands and do a vgchange on my guest.
Is there some way of saving the current used config so this automatically happens in the future?
Virsh - Auto attach disk at boot
Re: Virsh - Auto attach disk at boot
Do your virsh attach-disk commands but use --config to affect the xml it uses to start it up next time. Or use virsh edit to edit the xml and add the disks there.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 58
- Joined: 2015/04/11 04:59:25
- Location: United Kingdom
Re: Virsh - Auto attach disk at boot
Attach a disk image to a guest's CD-ROM drive:
Disk attached successfully
Code: Select all
# virsh attach-disk <GuestName> sample.iso hdc --type cdrom --mode readonly
Re: Virsh - Auto attach disk at boot
Thanks Trevor,TrevorH wrote:Do your virsh attach-disk commands but use --config to affect the xml it uses to start it up next time. Or use virsh edit to edit the xml and add the disks there.
I saw this in the docs with a <config file> marker and didn't know which file to put there. It worked without the filename, and so I suspect this has done the trick