Ask Your Question
1

glance/nova boot virtual machine with specific parameters?

asked 2014-05-27 07:47:45 -0500

Pernikovka gravatar image

glance/nova How to boot virtual machine with specific parameters? when I want to run non-standard OS and need to specify for example serial port, no-graphic etc.. ?

for example something like: qemu-system-x86_64 -cpu kvm64 --enable-kvm -nographic -m 3072 -hda hda.vmdk \ -netdev tap,ifname=tap1,id=net10 -device e1000,netdev=net10,mac=52:54:00:22:01:10 \ -serial telnet::$30001,server,nowait &

need to translate this to "nova boot....."

I know how to add image to glance with properties but still have problem with boot instance.

Thx in advance Jirka

edit retag flag offensive close merge delete

Comments

Kickstart file taking part in preparing qcow2 image for glance upload usually cares about specific parameters . View for instance http://openstack.redhat.com/Creating_...
$ yum install -y appliance-tools
$ appliance-creator -c fedora-20-cloud.ks -n f20-cloud_openstack -f qcow2
Link for *.ks file is right above command lines.

lang en_US.UTF-8
keyboard us
timezone --utc Etc/UTC

auth --useshadow --enablemd5
selinux --enforcing
rootpw --lock --iscrypted locked

firewall --disabled

bootloader --timeout=1 --append="console=ttyS0,115200n8 console=tty0" extlinux

network --bootproto=dhcp --device=eth0 --onboot=on
services --enabled=network,sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final
dbaxps gravatar imagedbaxps ( 2014-05-27 08:09:29 -0500 )edit

ok but this is just for red hat installation. but will check kickstart option it's good idea....

Pernikovka gravatar imagePernikovka ( 2014-05-28 11:17:58 -0500 )edit

I don't think kickstart will be the solution here as I need to gove some parameters to KVM/hypervisor not to virtual machine. basically I need to say to KVM for example. connect serial port and provide it on specifi TCP port for telnet.

like -serial telnet::30001 in case when I'm calling directly kvm

Pernikovka gravatar imagePernikovka ( 2014-05-28 11:26:55 -0500 )edit

Yes you are right but when you run OS which doesn't support pty there is no way to access virtual serial port. like in kvm -serial telnet::$30001,server,nowait &

Pernikovka gravatar imagePernikovka ( 2014-06-11 07:04:48 -0500 )edit

how is this right, I am looking for same answer specifically nographic option, how would a ks file works here? please explain little bit more, thanks in advance,

EricD gravatar imageEricD ( 2014-08-16 01:03:28 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-05-27 09:05:51 -0500

dbaxps gravatar image

updated 2014-06-11 07:19:55 -0500

Kickstart file taking part in preparing qcow2 image for glance upload usually cares about specific parameters . View for instance http://openstack.redhat.com/Creating_.. .

  $ yum install -y appliance-tools
  $ appliance-creator -c fedora-20-cloud.ks -n f20-cloud_openstack -f qcow2
   Link for *.ks file is right above command lines.
  Sample  at mentioned link :-
  lang en_US.UTF-8
  keyboard us
  timezone --utc Etc/UTC

  auth --useshadow --enablemd5
  selinux --enforcing
  rootpw --lock --iscrypted locked
  firewall --disabled
  bootloader --timeout=1 --append="console=ttyS0,115200n8 console=tty0" extlinux
  network --bootproto=dhcp --device=eth0 --onboot=on
  services --enabled=network,sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final

Horizon will provide VNC console , when you upload QCOW2 image via glance and will launch cloud instance based on this glance image. You can further setup Light Weight X on your cloud instance.
$ sudo apt-get ( yum ) install xorg fluxbox xterm
edit flag offensive delete link more

Comments

I know how to setup OS to send output to console, but don't know how to connect this to SPICE/VNC. Till now just PTY works..

Pernikovka gravatar imagePernikovka ( 2014-06-10 19:01:24 -0500 )edit

Horizon will provide VNC console , when you upload QCOW2 image via glance and will launch cloud instance based on this glance image. You can further setup Light Weight X on your cloud instance.
$ sudo apt-get ( yum ) install xorg fluxbox xterm

dbaxps gravatar imagedbaxps ( 2014-06-10 21:40:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2014-05-27 07:47:45 -0500

Seen: 838 times

Last updated: Jun 11 '14