I'm trying to have it so that a non-installation DVD/CD-ROM is mounted in my KVM guest after the installation is complete. I'm not using the CD/DVD for installation, I'm using kickstart via http. I've tried a few variations(commas, no commas, quotes) on the virt-install syntax below but I generally get the same type of usage message. I haven't found any examples for this on my www searches.
Code:
[root@supportvm ~]# virt-install --name=test1 --network network=example.org --ram=1024 --vcpus=2 --disk type='file',device='cdrom',driver name='qmeu',type='raw',source file='/home/user/isos/generic-dvd.iso',target dev='hda',bus='ide',readonly --disk path=/var/lib/libvirt/images/test1.img,size=9 --graphics=none --location=http://10.1.101.153/rhel70iso --os-type=linux --os-variant=rhel7 --extra-args='console=tty0 console=ttyS0,115200n8 serial ks=http://10.1.101.153/kickstart/test1-ks.cfg geoloc=0'
usage: virt-install --name NAME --ram RAM STORAGE INSTALL [options]
virt-install: error: unrecognized arguments: device=cdrom,driver name=qmeu type=raw,source file=/home/user/isos/generic-dvd.iso target dev=hda bus=ide readonly
When I manually add the CD-ROM storage device here is what my guest xml file looks like afterwords:
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/user/isos/generic-dvd.iso'/>
<target dev='hda' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
My test1-ks.cfg works in that I get an entry added to my /etc/fstab
%post
echo "/dev/sr0 /media iso9660 defaults,ro 0 0" >> /etc/fstab
%end
# virt-install --version
1.2.1
Is there a way to incorporate the XML elements into my virt-install command?